Linux 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.
Enter this command in the terminal:
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.
You can also check the current state of your battery using the following command:
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.