Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .