Is there a way under MacOS X to tell when the computer last went to sleep?
The 'uptime' shell command shows how long the system has been up (including time sleeping, it seems).
And /var/log/system.log records the time of each "System Wake" (but it records "System Sleep" with the actual wakeup time, not the going-to-sleep time).
Martin
Previously, Martin Frost me at invalid stanford daht edu wrote:
Is there a way under MacOS X to tell when the computer last went to sleep?
Our product DssW Sleep Monitor will keep a log of your computer's sleep periods.
Sleep Monitor 2.1
<http://www.dssw.co.uk/sleepmonitor/>
Alternatively, you need to build a daemon that registers an interest in sleep and wake events.
Power Management for Macintosh; getting started
<http://developer.apple.com/technotes/tn2002/tn2075.html>
Using Cocoa, look for NSWorkspaceWillSleepNotification and NSWorkspaceDidWakeNotification notifications.
Kind regards,
Graham
mailto:support@dssw.co.uk
http://www.dssw.co.uk/ Mac energy saving and power management software