Apple - how to find out the start time of last sleep
Actually, something like
pmset -g log|grep -e " Sleep " -e " Wake "
is what really gives me a clean timeline of sleep/wake events on 10.8.2. powerd does not log anything about it, at least on my system (10.8.2, MacBook Pro Retina 15).
02/03/13 19:48:37 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:99%) 26 secs
02/03/13 19:49:03 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:99%) 27 secs
02/03/13 19:49:30 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:99%) 26 secs
02/03/13 19:49:56 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:99%) 26 secs
02/03/13 19:50:22 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:99%) 26 secs
02/03/13 19:50:48 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:99%) 26 secs
02/03/13 19:51:14 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:100%) 1802 secs
02/03/13 20:39:17 GMT-03 Sleep Maintenance Sleep Sleep: Using BATT (Charge:100%) 244 secs
02/03/13 20:43:21 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:100%) 51 secs
02/03/13 21:07:17 GMT-03 Sleep Maintenance Sleep Sleep: Using BATT (Charge:100%) 242 secs
02/03/13 21:11:19 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:100%) 1103 secs
02/03/13 21:29:42 GMT-03 Wake Wake due to EC.LidOpen/Lid Open: Using AC (Charge:100%)
03/03/13 00:00:26 GMT-03 Sleep Idle Sleep Sleep: Using BATT (Charge:85%) 96 secs
03/03/13 00:02:02 GMT-03 Sleep Maintenance Sleep Sleep: Using AC (Charge:85%) 38 secs
03/03/13 00:02:40 GMT-03 Wake Wake due to EHC1/HID Activity: Using AC (Charge:85%) 4338 secs
03/03/13 01:14:58 GMT-03 Sleep Clamshell Sleep to DarkWake: Using AC (Charge:100%) 48382 secs
03/03/13 14:41:20 GMT-03 Wake DarkWake to FullWake due to HID Activity: Using AC (Charge:100%) 728 secs
03/03/13 14:53:28 GMT-03 Sleep Clamshell Sleep to DarkWake: Using AC (Charge:100%) 415 secs
03/03/13 15:00:23 GMT-03 Wake DarkWake to FullWake due to HID Activity: Using AC (Charge:100%) 718 secs
03/03/13 15:12:21 GMT-03 Sleep Clamshell Sleep to DarkWake: Using AC (Charge:100%) 156 secs
03/03/13 15:14:57 GMT-03 Wake DarkWake to FullWake due to HID Activity: Using AC (Charge:100%) 834 secs
03/03/13 15:28:51 GMT-03 Sleep Clamshell Sleep to DarkWake: Using AC (Charge:100%) 378 secs
03/03/13 15:35:09 GMT-03 Wake DarkWake to FullWake due to HID Activity: Using AC (Charge:100%)
You can use the pmset
command to obtain this information. The following command obtains a log of the sleep/wake entries then restricts this to the last entry in the list which should be the most recent sleep:
pmset -g log | grep sleep | tail -n 1
You can obviously play around with anything after pmset -g log
to give you what you need.
You can also use pmset -g log | grep LidOpen
if you want to know when the lid of your MacBook was opened.