kernel/syscons - Fix excessive cpu latency during scrolling
[dragonfly.git] / usr.sbin / battd / battd.8
CommitLineData
31c19c2a
LF
1.\" Copyright (c) 2005 The DragonFly Project. All rights reserved.
2.\"
3.\" This code is derived from software contributed to The DragonFly Project
1bf4b486
SW
4.\" by Maxime Labelle.
5.\"
31c19c2a
LF
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
1bf4b486 9.\"
31c19c2a
LF
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.\"
c65d676d 33.Dd April 6, 2009
fd5819c4 34.Dt BATTD 8
31c19c2a
LF
35.Os
36.Sh NAME
37.Nm battd
1bf4b486 38.Nd Battery status monitoring daemon
31c19c2a
LF
39.Sh SYNOPSIS
40.Nm
a57da6de
SW
41.Op Fl dEhT
42.Op Fl c Ar seconds
43.Op Fl e Ar command
44.Op Fl f Ar device
c65d676d 45.Op Fl p Ar percent
31c19c2a 46.Op Fl s Ar status
a57da6de 47.Op Fl t Ar minutes
31c19c2a
LF
48.Sh DESCRIPTION
49The
50.Nm
51daemon monitors the status of the battery or batteries present in the system.
52The daemon will alert all users on the system and may execute a supplied
c65d676d
TN
53command once a particular criterion has been met.
54The criteria are based
1bf4b486 55on the percentage remaining, the time remaining and the status of the battery.
31c19c2a
LF
56.Pp
57The options are as follows:
58.Bl -tag -width indent
59.It Fl c Ar seconds
c65d676d
TN
60Interval in seconds for checking the battery status.
61Default is
31c19c2a
LF
62.Ar 30
63seconds.
64.It Fl d
a57da6de 65Start in debug mode (works when
31c19c2a 66.Nm
a57da6de
SW
67is compiled with
68.Fl DDEBUG ) .
31c19c2a
LF
69.It Fl e Ar command
70Execute
71.Ar command
72once condition has been met.
1bf4b486 73.It Fl E
31c19c2a
LF
74Execute command only once after a condition has been met.
75.It Fl f Ar device
c65d676d
TN
76Specifies a different device path to be used.
77Default is
f1481abe 78.Pa /dev/apm .
1bf4b486 79.It Fl h
31c19c2a 80Print
1bf4b486 81.Nm
31c19c2a
LF
82command line usage and exit.
83.It Fl p Ar percent
c65d676d 84Alert users when the remaining battery life has reached approximately
31c19c2a 85.Ar percent .
c65d676d
TN
86Default is
87.Ar 10 .
88A value of
89.Ar 0
90turns this alert off.
31c19c2a 91.It Fl s Ar status
c65d676d
TN
92Alert users when the remaining battery has reached a given status.
93The status specified can either be
94.Ar high ,
31c19c2a 95.Ar low
1bf4b486 96or
31c19c2a
LF
97.Ar critical .
98.It Fl t Ar minutes
c65d676d 99Alert users when the remaining battery time has reached approximately
f60c028d 100.Ar minutes .
31c19c2a 101.It Fl T
c65d676d
TN
102Alert users when the system has approximately 10 minutes remaining battery time,
103but don't execute command
104.Pq Fl e
105on this alert.
31c19c2a 106.El
31c19c2a 107.Sh EXAMPLES
c65d676d
TN
108.Dl "battd -p 50 -s low"
109Alert users when the battery percentage has reached 50% and
110once again when the status reaches
111.Ar low .
112.Pp
113.Dl "battd -t 15 -c 10"
114Alert users when the battery has 15 minutes worth of power remaining
115and once again when battery percentage has reached 10%.
116Decrease the interval between checking the battery to 10 seconds.
117.Pp
118.Dl "battd -Tt4 -p0 -Ee \*q/sbin/shutdown -p +2 Battery_Low\*q"
119Alert users when the battery has 10 minutes worth power remaining and
120alert again when 4 minutes is remaining and then execute the given
121.Xr shutdown 8
122command once.
123(User will have to
124.Xr kill 1
125the
126.Xr shutdown 8
127process, if AC power is connected to system and shutdown isn't wanted.)
31c19c2a 128.Sh SEE ALSO
31c19c2a
LF
129.Xr viapm 4 ,
130.Xr apm 8 ,
131.Xr apmd 8 ,
d54ec6cb
SW
132.Xr syslogd 8 ,
133.Xr zzz 8
31c19c2a
LF
134.Sh HISTORY
135The
136.Nm
9b1e0897
JR
137command first appeared in
138.Dx 1.1 .
31c19c2a 139.Sh AUTHORS
e65bc1c3 140.An Liam J. Foy Aq Mt liamfoy@dragonflybsd.org
31c19c2a
LF
141.Pp
142Man page contributions by:
e65bc1c3
FF
143.An Maxime Labelle Aq Mt mlabelle@vt220.com
144.An Sarunas Vancevicius Aq Mt svan@redbrick.dcu.ie