Determine the System Uptime in Windows Vista

by Daniel Petri - January 8, 2009

Knowing how much time your system has been running is a piece of information useful for administrators. Sometimes you might need it in order to know when the machine has recovered from a possible power failure or any other issue it might have had. While there are plenty of 3rd-party tools that allow one to find the exact uptime of the system, there are at least 4 methods I can think of built-in in your system. Windows Vista has made it easier in at least 2 or 3 ways out of the total number described below, but method #2 and 3 also work for pre-Vista operating systems.

Method #1 – Using Task Manager (Vista only)

Probably the easiest of them all.

  1. Right-click on the Taskbar, and click Task Manager. You can also click CTRL+SHIFT+ESC to get to the Task Manager.
  2. In Task Manager, select the Performance tab.
  3. The current system uptime is shown under System.  

Method #2 – Using the System Information tool

Harder to remember by heart, but useful for various scripting options.

  1. Click Start, type the following command and press ENTER:
    Cmd /k systeminfo | find "System Boot Time"

     

  2. System uptime data is shown in the output:
    System Boot Time: 05/25/2007, 23:57:47

     

Method #3 – Using Uptime.exe

Microsoft have published a tool called Uptime.exe. While hardly a new tool, uptime.exe is a simple command line tool that analyzes the computer's reliability and availability information. It can work locally or remotely. In its simple form, the tool will display the current system uptime. An advanced option allows you to access more detailed information such as shutdown, reboots, operating system crashes, and Service Pack installation.

Read the following KB for more info and for the download links:

Uptime.exe Tool Allows You to Estimate Server Availability with Windows NT 4.0 SP4 or Higher - 232243 http://support.microsoft.com/kb/232243

  1. Download uptime.exe from the above link, and save it to a folder, preferably in one that's in the system's path (such as SYSTEM32).
  2. Open an elevated Command Prompt window. To open an elevated Command Prompt, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator. You can also type CMD in the search box of the Start menu, and when you see the Command Prompt icon click on it to select it, hold CTRL+SHIFT and press ENTER.
  3. Navigate to where you've placed the uptime.exe utility.
  4. Run the uptime.exe utility. You can add a /? to the command in order to get more options. ''HELIOS has been up for: 0 day(s), 18 hour(s), 25 minute(s), 30 second(s)

Method #4 – Look in the Event Viewer

Not as descriptive as the previous methods, and like the Reliability Monitor (read my "Using the Reliability Monitor in Windows Vista" article), it does not display an exact day or hour count since the last reboot, but it will display important information regarding why the computer was rebooted and when it did so. For the purpose of this article we will look at Event ID 6005, which is an event that tells us that the computer has just finished booting, but you should be aware of the fact that there are virtually hundreds if not thousands of other event types that you could potentially learn from.

  1. Open Computer Management by right-clicking the Computer icon on the start menu (or on the Desktop if you have it enabled) and select Manage. Navigate to the Event Viewer.
  2. Note: If you did not disable UAC (read my "Disable User Account Control in Windows Vista" article) then you will be prompted to consent to the action you're about to perform. Click Continue. Note: You can also open the Event Viewer by typing eventvwr.msc in the Run command.
  3. Click on Event Viewer (Local) in the left navigation pane.  
  4. In the middle pane, click on the Information event type, and scroll down till you see Event ID 6005. Double-click the 6005 Event ID, or right-click it and select View All Instances of This Event.  
  5. A list of all instances of the 6005 Event ID will be displayed. You can examine this list, look at the dates and times of each reboot event, and so on.

Got a question? Post it on our Windows Vista Forums!

 

 



Join The Petri Insider - Weekly IT Tutorial and Tips, Whitepaper and Webinars