Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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