“There is a very useful Windows command that Microsoft didn’t include in any version of windows but should have. This is the uptime command. There is a knowledge base article here. It was released back in the Windows NT days, but still works on all current versions of windows. I have found this to be an easy way to find out the uptime of the windows servers I maintain without have to log on to the box.

To install just download uptime.exe and place it in the windows directory. Then run it from the command line.

uptime /? will give a listing of all the options and uptime /help will give detailed instructions.
UPTIME, Version 1.01
(C) Copyright 1999, Microsoft CorporationUptime [server] [/s ] [/a] [/d:mm/dd/yyyy /p:n] [/heartbeat] [/? /help]
server Name or IP address of remote server to process.
/s Display key system events and statistics.
/a Display application failure events (assumes /s).
/d: Only calculate for events after mm/dd/yyyy.
/p: Only calculate for events in the previous n days.
/heartbeat Turn on/off the system’s heartbeat
/? Basic usage.
/help Additional usage information.Uptime works by checking the windows event logs for startup and shutdown times. Running uptime with the /s switch will provide more detailed statistics as shown below. If the event log has been cleared or is corrupted uptime will not show correct stats.
I have found it helpful to set up .bat files with the servers I want to check. This then gives me a quick list of the uptime of various servers. It is quite a useful command. I’m not sure why Microsoft didn’t just stick it in the directory with all their other comma”

 

Leave a Reply

Your email address will not be published. Required fields are marked *