A Tale of Two Batteries
We all know that laptop batteries lose some of their capacity over time. Apple generally warrants them for a year, if I remember correctly, but after that you’re on your own if the battery barely holds a charge. But how do you get real info on your battery, other than doing time comparisons?
Luckily the Mac provides some fairly detailed info. There’s an application called coconutBattery that will display this for you, but personally I prefer to grab it from the command line (the same way coconutBattery gets its info).
I have an alias set up, called “battery”:
$ alias battery=’ioreg -w0 -l | grep Capacity | cut -d ” ” -f 17-50’
This just sets it up so when you type “battery”, it asks the mac to list off a bunch of info and looks for the lines talking about “Capacity” (and then strips off some extra whitespace).
So here are two examples, from different batteries:
$ battery
“CurrentCapacity” = 4388
“LegacyBatteryInfo” = {“Capacity”=4388,”Voltage”=12583,”Flags”=5,”Current”=4388,”Amperage”=131,”Cycle Count”=152}
“DesignCapacity” = 5500
“MaxCapacity” = 4388
$ battery
“CurrentCapacity” = 1608
“LegacyBatteryInfo” = {“Capacity”=1925,”Voltage”=12260,”Flags”=7,”Current”=1608,”Amperage”=12,”Cycle Count”=102}
“DesignCapacity” = 5500
“MaxCapacity” = 1925
Basically this shows the current capacity (charge), max capacity, and the capacity the battery was designed for. The LegacyBatteryInfo line has some other useful info, like flags that tell whether the power cord is plugged in, if the battery is currently charging, and the number of complete recharge cycles the battery has effectively been through.
What’s interesting here is to see that the first battery is still doing pretty well — it currently can store about 80% of its original charge (4388/5500). That’s after 152 cycles (and approximately a year of use). The other battery is a pathetic example, which holds 35% of what it originally could have, after only 102 cycles (and being used less than the other battery over the course of the year). Personally I’d call it a manufacturing defect, but unfortunately being a bit more than a year old, Apple won’t take responsibility for it.