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