Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the simplest way to find out how long a computer is turned on Windows?

share|improve this question
add comment

5 Answers

up vote 23 down vote accepted
  • Run command line
  • Type Systeminfo
  • Find "System Up Time"

    Days: 10 Hours: 10 Minutes: 10 Seconds: 10

for shorter result you can use

systeminfo | find "Boot Time"


UPTime project

share|improve this answer
7  
>systeminfo | find "Boot Time" –  svandragt Jul 23 '09 at 9:18
1  
for me the simplest way now is > systeminfo | find "Up Time" –  Juozas Kontvainis Jul 23 '09 at 9:29
3  
Doesn't work on Vista (use already included uptime.exe instead). –  mwore Jul 23 '09 at 12:50
1  
Also note you can use this to query a remote machine as systeminfo /S *machinename*` | find "Up Time"` –  GAThrawn Oct 14 '09 at 10:41
    
On Windows 7, it shows "System Boot Time" but not "System Up Time". –  Keith Thompson Dec 28 '11 at 22:20
add comment

Open the commandprompt and type:

net stats srv | find "Statistics"

Source (MS KB). Edit: Actually this will tell you the date and time when the pc was up from, - not the duration.

Example output:

>net stats srv | find "Statistics"
Server Statistics for \\4IFS-SANDER
Statistics since 22/07/2009 10:14:14
share|improve this answer
    
I'm not sure if this info is correct now, when I use MicTech's and KovBal's solution I get this: >systeminfo | find "Boot Time" System Boot Time: 23/07/2009, 02:22:27 –  svandragt Jul 23 '09 at 9:17
    
On Vista it returns "Statistics since 1.1.1980 00:00:00" (use already included uptime.exe instead) –  mwore Jul 23 '09 at 12:52
add comment

there is great command line tool from Microsoft uptime.exe:

http://www.microsoft.com/downloads/details.aspx?FamilyID=BC18FFDB-D6FE-400B-B892-94783AE44C91&displaylang=en

good thing with this tool is it works really fast.

Uptime [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.

share|improve this answer
add comment

If you have the Windows Server 2000 or 2003 resource kits try

srvinfo -ns [\\\server] | Findstr "Time"

Note: Srvinfo.exe will not run on a 64-bit versions of Windows, due to it being 16-bit.

share|improve this answer
add comment

Following command correctly gives last reboot time for the system

systeminfo /s server_name | find "System Boot Time"

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.