Mac OS X Boot, Sleep and Wake Time and Date

For several times I wondered what was the exact time my machine booted, woke up or slept. So, I did a little investigation to find out that's actually very simple to get those answers.

Using the Mac OS X Terminal, you can run the following commands:

 
- For System Boot Time, use: systcl -a | grep kern.boottime

You should get results similar to the picture below





- For System Sleep Time, use: sysctl -a | grep sleeptime

You should get results similar to the picture below  




- For System Wake Time, use: sysctl -a | grep waketime

You should get results similar to the picture below




I typically use the "uptime" command (just type uptime on the Mac OS X Terminal) to find out how long my machine has been powered on.

Lastly, you can get a short history of the machine boot using the "last reboot" command (just type last reboot on the Mac OS X Terminal) to get the last three boots of the system.


You can get the same information reviewing system log files but I think opening the terminal and typing a few commands easy enough to get the information you're looking for.

Popular posts from this blog

How to Declare Variables in MS-SQL Server Management Studio

Calling Web Services with Apache Camel

Using HTTP-based endpoints with Apache Camel