batteryalert
Package: WA2L/edrc 1.5.57
Section: General Commands (1)
Updated: 13 October 2024
Index
Return to Main Contents
NAME
batteryalert - monitor battery capacity and alert to terminals on low charge
SYNOPSIS
root user:
-
edrc/bin/batteryalert
[
-h
|
-s
|
-i
|
-a
]
non-root user:
-
edrc/bin/batteryalert
-h
|
-i
|
-a
AVAILABILITY
WA2L/edrc
DESCRIPTION
the
batteryalert
command runs in the background,
monitors the power supply battery capacity and alerts (using
wall)
to all terminals on low charge.
OPTIONS
-
-
start
batteryalert
background process.
- -h
-
usage.
- -s
-
stop
batteryalert
background process.
- -i
-
print
battery and
batteryalert
information.
- -a
-
check if battery capacity id below threshold
and discharging.
If so the exit status is
8.
ENVIRONMENT
- $BATTERYALERT_THRESHOLD
-
battery charge threshold in %.
The default threshold is
20
percent.
- $BATTERYALERT_INTERVAL
-
battery charge check interval in seconds.
The default interval is
120
seconds.
EXIT STATUS
- 0
-
no error.
- 1
-
no battery information found.
- 2
-
operating system not supported.
- 4
-
usage printed.
- 6
-
cannot stop
batteryalert.
- 7
-
batteryalert
not running.
- 8
-
batteryalert
is in ALERT state (when using
-a).
FILES
- /sys/class/power_supply/BAT*/capacity
-
current battery charge level.
- /sys/class/power_supply/BAT*/status
-
status
(Charging/Discharging)
of the battery.
- edrc/var/settings/batteryalert.threshold
-
holds the battery alert threshold during
batteryalert
run if not default.
EXAMPLES
-
SEE ALSO
edrcintro(1),
edrcinit(1m),
acpi(1),
wall(1)
NOTES
A service handler
(WA2Ledrc.batteryalert)
for
edrcinit(1m)
is provided.
BUGS
The first battery found is used for alerting and information
display.
AUTHOR
batteryalert was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2024
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 13:46:05 GMT, March 16, 2025