Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Use new power management features' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Use new power management features
Authored by: barrysharp on May 23, '05 05:32:11PM

I was curious to find out just how much battery charge life was being saved by this "Reduce the brightness..." when in Battery setting.

My computer is a Ti 1GHz PB approx 1.5 years old and with original battery.

Starting at a battery charge level of 96% and with Battery only with "Reduce the brightness..." box checked I monitored the pmset -g ps output until battery strength arrived at 85%. The result was

At 85% remaining battery life was 4:44.

I then reconnected the A/C and charged the battery back to 95% and repeated the test with the "Reduce the brightness..." unchecked. The result was

At 85% remaining battery life was 4:05. (Interesting enough the value at 84% was 3:16)

I monitored the battery level using a simple while loop in the Terminal.app

while true
do
pmset -g ps
sleep 60
done

During the test I did nothing on the computer and only a few trival background processes were active for both "Reduce the brightness..." settings.

Another interesting fact was that during both tests the battery life peaked at around 5:00. That is, when test started the battery life slowly climbed up to 5:00 and gradually reduced down to the numbers I gave above.

---
Regards... Barry Sharp



[ Reply to This | # ]
Battery levels w/pmset -g pslog
Authored by: victory on May 10, '08 03:30:29AM
[Seeing as the original hint was posted several years ago, I'll leave this mini-hint here largely for posterity]

The pmset utility in OSX 10.5 now includes a new feature to loop through a continuous series of battery level updates w/o having to use a separate sleep command:

pmset -g pslog

Which will display battery stats and loop every minute or so.

If you need to monitor battery life (say for troubleshooting) and you don't want to watch the batt. level indicator constantly, here's a quick way to have OSX's text-to-speech tell you the current value every 2 minutes:

ruby -e 'loop do;if %x(pmset -g batt)=~/(\d+%)/;%x(say "battery at #{$1}");end;sleep 120;end'

(This works with the Leopard version of pmset. I haven't tested it w/any other. Why use Ruby instead of a shell script w/pipes to awk/sed/etc? I dunno -- why not? Ruby is awesome :-)

[ Reply to This | # ]