Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
Is there a way to figure out how much time my computer spent being awake after being fully charged? It would be nice to know so that I can see if I am able to get as much out of my battery as I should be able to.
 
I see messages in the file /var/log/system.log when the power cable is plugged in or unplugged. From that you could compute the time. You may also have to find sleep and wakeup times from the log to know how much of that time the computer was actually awake.

First line was from being unplugged. Second line was being plugged back in.

Code:
Feb  5 23:18:28 mbp-wl.lan loginwindow[59]: magsafeStateChanged state changed old 1 new 2
Feb  5 23:19:09 mbp-wl.lan loginwindow[59]: magsafeStateChanged state changed old 2 new 1
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.