[ltp] Re: UPS signals for shutdown

Axel Braun linux-thinkpad@linux-thinkpad.org
Sun, 16 Mar 2008 16:07:07 +0100


Helmut Hullen wrote:

> when the battery goes low it sends some signals. Can I use these signals
> for a controlled shutdown?

Hm....kpowersave allows you to set the levels and actions what to do...but I
assume thats not what you are looking for.

Maybe the settings in /proc/acpi/battery/BAT0 can give you a hint?

axel@z60m:~> cat /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mW
remaining capacity:      48250 mWh
present voltage:         12500 mV

axel@z60m:~> cat /proc/acpi/battery/BAT0/alarm
alarm:                   5790 mWh

Best,
Axel
-- 
Linux on a ThinkPad: www.axxite.com/brn