You Are Here: Home » Articles » Linux » OS » Tips & Tricks

Linux tip: get useful information about your Laptop’s battery health and status

By Debjit on October 14th, 2009 
Advertisement

laptop batteryLinux provides you with the proc filesystem which you can make use of to get some very useful information about the current status and health of your Laptop's battery. Although there are many tools available which can do this thing for you but it is always better to get the info right from your system files. In this article we will tell how you can get useful information about your Laptop's battery health and status in Linux.

The Proc file system has various information about your computer's current state. In the proc file system there exists an entry for the battery on the laptop. We are going to make use of the same for getting this useful battery health and status information. All the battery related information in Linux is stored in the /proc/acpi/battery folder. There will be many more folders in there corresponding to the number of batteries attached on to you laptop. for eg. if you laptop has one battery then you will find a BAT0 folder.

Battery Health

Enter this command in the terminal:

cat /proc/acpi/battery/BAT0/info

You can then see useful information regarding your battery's health as shown below. In the screen shot you will find entries for design acpacity and last full capacity. This generally gives you the so as to how well your battery gets charged.

battery health in linux

Battery Status

You can also check the current state of your battery using the following command:

cat /proc/acpi/battery/BAT0/state

Now you can se how long will the battery last and at what rate is it getting discharged. You can also see whether your laptop is connected to AC power or operating on battery.

battery state in Linux

Advertisement







Linux tip: get useful information about your Laptop’s battery health and status was originally published on Digitizor.com on October 14, 2009 - 3:32 pm (Indian Standard Time)