Merge from vendor branch NCURSES:
[dragonfly.git] / usr.sbin / battd / battd.1
1 .\" Copyright (c) 2005 The DragonFly Project.  All rights reserved.
2 .\"
3 .\" This code is derived from software contributed to The DragonFly Project
4 .\" by Maxime Labelle. 
5 .\" 
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in
14 .\"    the documentation and/or other materials provided with the
15 .\"    distribution.
16 .\" 3. Neither the name of The DragonFly Project nor the names of its
17 .\"    contributors may be used to endorse or promote products derived
18 .\"    from this software without specific, prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
24 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\" $DragonFly: src/usr.sbin/battd/Attic/battd.1,v 1.3 2005/02/26 11:33:47 asmodai Exp $ 
34
35 .Dd January 31, 2005
36 .Dt BATTD 1
37 .Os
38 .Sh NAME
39 .Nm battd
40 .Nd Battery status monitoring daemon 
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl hEdT
44 .Op Fl p Ar percentage
45 .Op Fl t Ar minutes
46 .Op Fl s Ar status
47 .Op Fl f Ar device
48 .Op Fl c Ar seconds
49 .Sh DESCRIPTION
50 The
51 .Nm
52 daemon monitors the status of the battery or batteries present in the system.
53 The daemon will alert all users on the system and may execute a supplied
54 command once a particular criteria has been met. The criterias are based
55 on the percentage remaining, the time remaining and the status of the battery. 
56 .Pp
57 The options are as follows:
58 .Bl -tag -width indent
59 .It Fl c Ar seconds
60 Interval in seconds for checking the battery status. Default is
61 .Ar 30
62 seconds.
63 .It Fl d
64 Start
65 .Nm
66 in debug mode.
67 .It Fl e Ar command
68 Execute
69 .Ar command
70 once condition has been met.
71 .It Fl E 
72 Execute command only once after a condition has been met.
73 .It Fl f Ar device
74 Specifies a different device path to be used. Default is 
75 .Ar /dev/apm .
76 .It Fl h 
77 Print
78 .Nm 
79 command line usage and exit.
80 .It Fl p Ar percent
81 Alert the user when the remaining battery life has reached approximately
82 .Ar percent .
83 .It Fl s Ar status
84 Alert the user when the remaining battery has reached a given status. The status specified can either be 
85 .Ar high
86
87 .Ar low
88 or 
89 .Ar critical .
90 .It Fl t Ar minutes
91 Alert the user when the remaining battery time has reached approximately
92 .Ar minutes.
93 .It Fl T
94 Use as default along with percentage default alert. This will alert you once
95 the system has roughly 10 minutes remaining.
96 .El
97 .Pp
98 By default,
99 .Nm
100 will alert users once the battery or batteries have roughly 10% of power remaining.
101 .Pp
102 .Sh EXAMPLES
103 .Bl -tag -width indent
104 .It Li "battd -p 50 -s low"
105 Alert users when the battery percentage has reached 50% and once again when the status
106 reaches low.
107 .It Li "battd -t 15"
108 Alert users when the battery has 15 minutes worth of power remaining.
109 .It Li "battd -p 30 -e program -c 10"
110 Alert users when the battery percentage has reached 50% and execute the command 'program'.
111 Increase the interval between checking the battery to 10 seconds.
112 .El
113 .Sh SEE ALSO
114 .Xr zzz 4 ,
115 .Xr viapm 4 ,
116 .Xr apm 8 ,
117 .Xr apmd 8 ,
118 .Xr syslogd 8
119 .Sh HISTORY
120 The
121 .Nm
122 command first appeared in
123 .Dx 1.1 .
124 .Sh AUTHORS
125 .An Liam J. Foy Aq liamfoy@dragonflybsd.org
126 .Pp
127 Man page contributions by:
128 .An Maxime Labelle Aq mlabelle@vt220.com
129 .An Sarunas Vancevicius Aq svan@redbrick.dcu.ie