March 17, 2003

PowerBook Battery and Mac OS X 10.2.4

Today I've read an article on MacOSXHints mentioning about the effect of 10.2.4 on powerbook batteries. Some people claimed that it corrupts the LiON battery. The article provided a bash script (below) that checks the battery capacity.


#!/bin/bash

[ -x /usr/sbin/ioreg ] && \
/usr/sbin/ioreg -p IODeviceTree -n "battery" -w 0 | \
sed -ne '/| *{/,/| *}/ {
s/^[ |]*//g
/^[{}]/!p
}' | \
awk '/Battery/ {
gsub("[{}()\"]","", $3)
gsub(","," ",$3)
split($3,ct," ")
# extract flag value and convert to hex
sub("Flags=","",ct[2])
str=sprintf("Flags=%d/0x%03x",ct[2],ct[2])
sub("Flags=[0-9]*",str,$3)
# get max and current charge levels
sub(".*=","",ct[4])
sub(".*=","",ct[5])
printf("%s [%.1f%%]\n",tolower($3),100*ct[5]/ct[4])
}'

# EOF

My output for one of my battery was


voltage=16850 flags=7/0x007 amperage=1200 capacity=4270 current=4188 [98.1%]

The capacity and current is in mAH. It was relatively in par with another person who ran the script and got

voltage=11928 flags=4/0x004 amperage=1023 capacity=4192 current=3692 [88.1%]

And he got his iBook 800 running for 5 hours usually.


I also saw a link to a summary on how to improve your laptop battery life here
Note to self: Check the other battery capacity.

Posted by zoo at March 17, 2003 05:40 PM
Comments

nice site

Posted by: penis enlargement on March 9, 2004 11:46 AM

Erase this message and you'll never see it again. ( - Phentermine) http://www.phentermine-information.us 55.1650781258108

Posted by: Phentermine on May 14, 2004 07:01 PM
Post a comment