Related Articles

3 users responded in this post

Subscribe to this post comment rss or trackback url
User Gravatar
efreak said in September 22nd, 2005 at 8:41 am

I’m not sure how to test external devices, but if anyone can figure that out, you can. I used this to test my laptop battery, and found out that they both were toast (they were used, so I had no idea):

http://www.macworld.com/2005/06/secrets/julyosxhints/index1.php

Examine your battery\u2019s lifeline

Ever wish you could get more information about the state of your laptop\u2019s battery? 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 ioreg -l | more . You\u2019ll see data on everything from CPUs to peripherals.

Buried deep in the output is information about your battery\u2019s overall health and current charge, but it\u2019s 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:

ioreg -w0 -l | grep Capacity

The -w0 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:

| | | “IOBatteryInfo” = ({“Capacity”=3971,”Amperage” =18446744073709550895,”Cycle Count”=61,”Current”=2160, “Voltage”=11370,”Flags”=4,”AbsoluteMaxCapacity”=4200})

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\u2019s original highest-charge value).

As your battery ages, the Capacity value will slowly decline in relation to AbsoluteMaxCapacity \u2014the 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\u2019s useful life. Studies indicate that PowerBook-style batteries have a useful life of between 300 and 500 cycles.

User Gravatar
dante8 said in September 22nd, 2005 at 9:24 am

I’m going with the low tech “play it until it croaks” method. Interesting stuff though… I may have to play with that command on my MythTV and see how all the components are faring. :)

User Gravatar
wyoming_1 said in September 22nd, 2005 at 6:21 pm

So is there a PC equivalent to this? Anyone?

Leave A Reply

 Username (Required)

 Email Address (Remains Private)

 Website (Optional)