Check Battery State in Ubuntu

If you use Laptop and Ubuntu, you can check whether your current battery status is in good condition of need a replacement. Just type this command in your shell:

cat /proc/acpi/battery/BAT1/info

Depending on your hadware config, you’ll see result like this :

present:                 yes
design capacity:         6600 mAh
last full capacity:      6600 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 660 mAh
design capacity low:     198 mAh
capacity granularity 1:  264 mAh
capacity granularity 2:  3780 mAh
model number:            Primary
serial number:
battery type:            Lion
OEM info:                Hewlett-Packard

If last full capacity is lower than design capacity than your battery is slowly going to it’s end.

Author: Arief Bayu Purwanto

Hello, my name is Arief Bayu Purwanto, a 24 years old father of a beautiful daughter. Interested in online programming, linux, games, and reading. Currently working on kapanlagi.com as junior developer. I live in a relatively quite and cool place called Malang. I'm available for some freelance stuff as well as some consulting job. You can see my portofolio for some previous task I've finished and some other information related to my capability. Btw, I'm plurking here.

  • Wow, 6600 mAh, bisa tahan berapa jam tuh ya :). Kalo yg 5200 mAh di macbook bisa tahan 4-5 jam-an, berarti setidaknya ini bisa 6 jam. Keren.

  • Wow, 6600 mAh, bisa tahan berapa jam tuh ya :). Kalo yg 5200 mAh di macbook bisa tahan 4-5 jam-an, berarti setidaknya ini bisa 6 jam. Keren.

  • Sayangnya… hanya kuat sekitar 2 setengah jam.
    Mungkin faktor processor.

  • Sayangnya… hanya kuat sekitar 2 setengah jam.
    Mungkin faktor processor.

  • jiggleo

    I tried this using Hardy Heron and it said the file or directory didn’t exist. any hints for Hardy?

    silent:

    Hmm… I don’t have any issue in Hardy, even I don’t change the script from Gutsy to Hardy. Maybe you have different device. Try to look/explore your /proc/acpi. Maybe you’ll find the exact path to your battery status.

  • jiggleo

    I tried this using Hardy Heron and it said the file or directory didn’t exist. any hints for Hardy?

    silent:Hmm… I don’t have any issue in Hardy, even I don’t change the script from Gutsy to Hardy. Maybe you have different device. Try to look/explore your /proc/acpi. Maybe you’ll find the exact path to your battery status.

  • MrCrussell

    On my Lenovo T61p the battery is listed as BAT0 not BAT1 – I suggest going to /proc/acpi/battery then doing a tab-complete.

    silent:Hahaha, that’s funny. How do I tab-completefrom script:D

  • MrCrussell

    On my Lenovo T61p the battery is listed as BAT0 not BAT1 – I suggest going to /proc/acpi/battery then doing a tab-complete.

    silent:

    Hahaha, that’s funny. How do I tab-completefrom script:D