Freelancer's Playground! New knowledges every now and then

25Jul/078

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.

  • http://permagnus.com/ Oskar Syahbana

    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.

  • http://permagnus.com Oskar Syahbana

    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.

  • http://bayu.freelancer.web.id/ Arief Bayu Purwanto

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

  • http://bayu.freelancer.web.id Arief Bayu Purwanto

    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