LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Battery Meter (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/battery-meter-193064/)

uveraser 06-13-2004 03:30 PM

Battery Meter
 
Hi,
I don't have a very good battery, and consequently have to keep a very close watch on the remaining battery life (as a percentage, not just a time). Even if I had a good battery, this would be helpful. The only battery meter I have seen for linux is the one built into KDE. Does anybody know of any other meters? Preferably I would like one which runs in the console and has support for dual batteries.

Thanks
Simon

chop 06-14-2004 09:35 AM

hi!
i got a new laptop on monday, and a friend with the same model made a batterymeter in bash.
url: home.4th-age.com/batterymon

i don't know if it works with more than one battery, but try :)

priller 06-16-2004 03:35 AM

I just wrote a simple script

Code:

more /proc/acpi/battery/BAT1/state
called it bat and put it in /bin so typing bat gives details of the charge left in the battery. Dont know how you'd do it though with apm.

uveraser 06-22-2004 07:09 AM

Thanks guys,
Don't currently have ACPI (working on it).

The script from 'chop' didn't work (can't for the life of me think why), but I used some of the code to write my own script (isn't open source great :D), which, after much messing, did work.
No idea whether it works with dual batteries, as I don't have dual batteries (YET!).

Strangely, I seem to get different codes for some things- here's a good one- according to the definitions given in chops script my battery is high and low at the same time.

Does anybody know where I can find the official definitions for the codes in /proc/apm?


All times are GMT -5. The time now is 05:04 PM.