Find the Last Reboot time of the Server

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.

Event Viewer

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.exe

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 uptime \servername.

This utility is not installed by default with Windows, it needs to be installed separately.

Systeminfo.exe

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

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.

3 thoughts on “Find the Last Reboot time of the Server

  1. Kevin Devine

    I do this in T-SQL:
    select login_time from master.sys.sysprocesses where cmd=’LAZY WRITER’

    Of course, this just tells me when the SQL service was last started…

    Reply
    1. PradeepAdiga Post author

      Kevin, thanks for the comment. As you said this query lets you know when the SQL Server service was restarted.

      Reply

Leave a Reply