Last week I had posted about some of the approaches I frequently use to find out when a SQL Server instance was restarted. Here are some of the methods I usually use to find out when a Server was rebooted.
The Event Log service is the first one to start when a Server is rebooted. The Event ID 6005 is associated with the Event Log startup.
Uptime is a very useful utility to find out since when the Server is up. The other good thing about this tool is that the uptime of server across the network can be obtained from a single location. The command to get this information is
This utility is not installed by default with Windows, it needs to be installed separately.
systeminfo provides detailed information about the computer configuration and hardware. Along with that it also provides the uptime of a given computer. Similar to uptime.exe this utility can also be used to get the information servers across the network. Since the output of this utility is very lengthy, the find parameter can be used to filter the requisite information. The command to find the uptime of the local server is as below.
systeminfo | find "System Up Time"
Since this utility finds all the information related to hardware, at times it takes a lot of time to fetch the information. In my opinion, just to get the uptime of a server this utility is little too heavy.
Net Statistics displays the time since the Server started collecting the statistics (which is also the time since the server was rebooted). The command to get that information is as follows.
net stats srv | find "Statistics since"
This is a light-weight tool which gives the information real quick.
Please share if you follow any other method to find out when a server was rebooted? Share your comments.