The Unix command ioreg displays the contents of the I/O Kit registry, which contains a ton of information about your machine. Open Terminal (/Applications/Utilities) and type
. You’ll see data on everything from CPUs to peripherals.
Buried deep in the output is information about your battery’s overall health and current charge, but it’s not easy to find on your own. Instead, let the Unix search tool grep do all the hard work for you. Just use this command:
flag tells ioreg not to truncate the output lines, and the -l flag is the list command, which is what actually generates the output. The pipe symbol (| ) then sends the output to grep , which searches for any line containing the word Capacity . The output will look something like this:
What does it all mean? The values you care about are Cycle Count (the number of times the battery has gone through a discharge-charge cycle), Current (the current charge in the battery), Capacity (the highest charge the battery can hold), and AbsoluteMaxCapacity (the battery’s original highest-charge value).
As your battery ages, the Capacity value will slowly decline in relation to AbsoluteMaxCapacity —the battery is losing its ability to take a full charge. If a battery is giving you very short usage cycles, you may need to replace it. You can find out by checking the Capacity value. The Cycle Count value shows what remains of your battery’s useful life. Studies indicate that PowerBook-style batteries have a useful life of between 300 and 500 cycles.