I just replaced the battery in the 2005 ibook G4 today, great to return to the days of 4 hours of use. I decided I’d like to monitor the life of the battery and so wrote a quick cron job script to log the battery capacity every day. I also have installed this on my main laptop which still gives me 3 hours after 18 months of use.
#!/bin/sh# batterylogger.sh : Log battery capacity to a file#date >> ~/batteryCapacityLog.logsystem_profiler SPPowerDataType | grep “charge capacity” >> ~/batteryCapacityLog.log
chmod 755 batterylogger.shcp batterylogger.sh /usr/local/bin/
10 5 * * * /usr/local/bin/batterylogger.sh
Wed Nov 11 20:03:26 GMT 2009Full charge capacity (mAh): 4859