David's profileDavid Moisan's ITPhotosBlogLists Tools Help
    June 03

    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,
     
    Dave
     
     
     

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://dmoisan.spaces.live.com/blog/cns!95CB015E3E4A702A!129.trak
    Weblogs that reference this entry
    • None