header

Torsten Curdt’s weblog

Battery Statistics

An easy way of finding out about the health of your MacBook/MacBookPro battery is to use this little command line.

$ ioreg -w0 -l | grep Capacity
"CurrentCapacity" = 5259
"LegacyBatteryInfo" = {"Capacity"=5279,"Voltage"=12596,"Flags"=7,"Current"=5259,"Amperage"=267,"Cycle Count"=48}
"DesignCapacity" = 5500
"MaxCapacity" = 5279

MaxCapacity is the current capacity your battery can still hold on a full charge. DesignCapacity was the original capacity. So if the difference gets too big your battery is probably end of life and ready to be replaced. Most likely the related Cycle Count is high then as well.

It would actually be a neat little project to collect this information over time with RRDTool. If you are OK to shell out a few bucks there already is a software called ibat that seems to do this.

Update: There is also a freeware tool called coconutbattery that shows this information in a nice UI.

4 Responses to “Battery Statistics”

  1. Pierre-Arnaud Marcelot said, on 27. July 2008 at 13:39

    Interesting command line. Thanks Torsten!

    Here are the results on my MBP:
    $ ioreg -w0 -l | grep Capacity
    “CurrentCapacity” = 2579
    “LegacyBatteryInfo” = {”Capacity”=2649,”Voltage”=12410,”Flags”=5,”Current”=2579,”Amperage”=0,”Cycle Count”=172}
    “DesignCapacity” = 5500
    “MaxCapacity” = 2649

    These statistics confirm my feeling that my battery lasts only half the time than when I got it, one year and 7 months ago.

  2. Henning Schmiedehausen said, on 27. July 2008 at 14:36

    iStat Pro displays this information, too. And my first generation MacBook Pro with once replaced battery (remember the “we need to replace your battery” recall?) is still at 85% health after 148 cycles.

  3. Aaron Wagner said, on 27. July 2008 at 18:34

    Very interesting. My wife was concerned about how she should charge/discharge her new macbook and I wasn’t sure.

    I ran this command for her, but the results don’t make sense. How could her MaxCapacity be higher than the DesignCapacity?

    She’s had the laptop for about seven months and it’s been on almost 24/7 since then. I was really surprised by these results. It doesn’t seem right, but I know nothing about how this stuff works.

    “CurrentCapacity” = 4804
    “LegacyBatteryInfo” = {”Capacity”=5167,”Voltage”=12269,”Flags”=4,”Current”=4804,”Amperage”=18446744073709550419,”Cycle Count”=142}
    “DesignCapacity” = 5020
    “MaxCapacity” = 5167

  4. tcurdt said, on 27. July 2008 at 18:57

    @Aaron: That’s indeed very strange!

    My suggestion: contact the author of ibat. I am expecting he might have some clue. And then let us know! :)

Leave a Reply

Please copy the string BFh8A1 to the field below: