2008-11-06

Monitoring your Laptop Battery from the Command Line


Monitoring your Laptop Battery from the Command Line(1)


Introduction


Laptop users learn something very quickly: always keep an eye on how much charge your


battery has. If you don't, you just might run out of juice in the middle of work.


Most window managers -- like KDE, GNOME, and Xfce -- come with good battery monitors. But


if you use a window manager that doesn't, or if you want a little more accuracy, you can turn to


the command line to help.


Using acpi


Just about every Linux distribution supports ACPI (the Advanced Configuration and Power


Interface). It's a fancy name for the way in which a computer manages and configures devices


and its power supply. Of course, Linux includes a command line utility for using ACPI called ...


well, acpi.


Open a terminal and run the command acpi. This command returns how many minutes of power


the battery has left, as well as the percentage of power it has -- for example, 9%. Useful, but


what if you want more information?


If that's the case, then run the command acpi -V. This command displays the same information


as the one above, but with a few extras like whether the AC adapter is plugged in and the


temperature at which your laptop is running. If you're plugged in, running acpi -V also displays


how many minutes are left until the battery is at 100% power.


Looking at IBAM


IBAM is billed as "the Intelligent Battery Monitor". To run it, open a terminal and type the


command ibam. You'll see the number of hours and/or minutes of battery life you have left, and


if you're charging the battery, how much longer it will be before the battery is fully charged.


No comments:

 
My Zimbio
Top Stories