Little-known Windows utility: UPTIME.EXE

When administering a server or a collection of servers, you need a way not only to see your systems in the present (is the server up or down or bluescreened; is the web service running or stopped or not even reachable), but also in the recent past (when did it last boot?  How long has it been up?)
Since NT, there’s been a utility to check system uptime, UPTIME.EXE.  It produces output like this:
uptime /s
Uptime Report for: \\DOT
Current OS: Microsoft Windows Server 2003, Service Pack 1, Uniprocessor Free.
Time Zone: Eastern Daylight Time
System Events as of 6/3/2006 9:44:34 PM:
Date:      Time:        Event:               Comment:
———- ———–  ——————-  ———————————–
  5/5/2006  8:12:11 AM  Boot                
  5/5/2006 12:33:56 PM  Shutdown             Prior uptime:0d 4h:21m:45s
  5/5/2006 12:35:13 PM  Boot                 Prior downtime:0d 0h:1m:17s
  6/2/2006  8:04:36 AM  Shutdown             Prior uptime:0d 0h:14m:32s
  6/2/2006  8:08:12 AM  Boot                 Prior downtime:0d 0h:3m:36s
Current System Uptime: 1 day(s), 13 hour(s), 36 minute(s), 55 second(s)
Since 5/5/2006:
           System Availability: 99.5831%
                  Total Uptime: 29d 10h:34m:54s
                Total Downtime: 0d 2h:57m:29s
                 Total Reboots: 20
     Mean Time Between Reboots: 1.48 days
             Total Bluescreens: 0


The word wrap may make this hard to read, but essentially UPTIME.EXE lists all the boot and shutdown events and calculates uptime (and downtime) from them.

It uses the Event Log to determine uptime, as explained in this KB article "Why Windows NT reports 6005, 6006, 6008 and 6009 Event Log Entries".
This practice has continued through Windows Server 2003, so UPTIME still works. 
UPTIME.EXE is available from Microsoft
Take care,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s