I have a laptop with Ubuntu 10.04 and would like to know if there's a way to get persistent battery charge data. The current setup erases the battery charge data (available visually via gnome battery icon in top menu bar) on every reboot. If I can discover where this info is stored I could sample it with cron and build a history file.

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

On my laptop I can find the data in /proc/acpi/battery/BAT1/state.

$ cat /proc/acpi/battery/BAT1/state
present:                 yes
capacity state:          ok
charging state:          charged
present rate:            0 mA
remaining capacity:      4290 mAh
present voltage:         12541 mV
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.