Tuesday, February 02, 2010

Get System Uptime quickly via the Command-line

Here is a real quick way to find the a System's Up Time value (Time since it was last booted) using the Command Prompt.

This becomes important during due-diligence on a server crash etc. where you need to determine when the system came back online etc.

The following command-line coding uses the piping technique and the Find filter tool to easily isolate the System Up Time value:

Open a Command Prompt window.

Type the following command, exactly as you see it here, caps and quotes included:

Systeminfo Find "Up Time"

This will print the info to the Command Prompt window, if you would like to send it to a text file for instance, type is in as follows:

Systeminfo Find "Up Time" > c:\uptime.txt

For Windows 2008 and Vista/Windows 7 use the following command:

Systeminfo Find "System Boot Time"

** Note between Systeminfo and Find there is a pipe (shift+\) which blogger.com is removing, so make sure to put it in.

If you'd like to just type in uptime to get the System Up Time value then you can also download the following command-line app from Microsoft and install on your PC/server:

http://download.microsoft.com/download/appcenter2000/uptime/1.0/NT5/EN-US/AC-UpTimeTool.exe

No comments: