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.

I'd like to get the uptime of my computer, and also power events, like when the computer goes to sleep and when it's waking up. Bonus points if it tells why it's waking up: scheduled task, user interaction, magic packet, ...

Microsoft released ages ago an uptime command that does that, when used with some extra parameters:

  • /s Display key system events and statistics.
  • /a Display application failure events (assumes /s).

When used without any parameters, uptime works but gives only the ... uptime. However, when used with /a or /s, it crashes.

Do you know a similar program that display also the "key system events and statistics"? The System Event Log gives information on when it goes to sleep but not more.

I'm running Windows 7 Ultimate 64-bit, if it matters.

Thanks a lot!

share|improve this question

4 Answers 4

up vote 5 down vote accepted
+100

Mark Russinovich of Sys Internals (since bought^W absorbed by Microsoft) has a suite of tools which, in one form or another, solve most of what your looknig for:

PSInfo returns, in amongst everything else, uptime.

PSLogList in the same group will dump the even log.

Forgot to add: All of the SysInternals tools are very good. Many are quite useful, especially for Unix-ish people looking for focused tools to get fairly specific information, ofetn command-line or command line compatible.

Get to all of them at http://www.sysinternals.com (which will be redirected to the deep page in Microsoft's site).

share|improve this answer
    
+1 ... Speaking of Sysinternals, their program BGInfo will display the boot time on the desktop :) –  Molly7244 Feb 3 '10 at 1:43
    
There's also live.sysinternals.com, a live repository of all their tools. –  fretje Feb 6 '10 at 21:06

As far as application failures go you probably have more luck with Windows' Reliability Monitor:

Reliability monitor

That one doesn't show system bootup or shutdown but it shows application crashes, system crashes, installed software and updates, etc.

If one gets a reasonable idea what exactly is a "key system event" for uptime.exe then it's probably not hard to recreate with PowerShell.

share|improve this answer
    
Thanks for pointing out the Reliabily Monitor, I did not know about it. But having applications crashes in the tool would be nice but not absolutely mandatory. I'll check further in the event logs and with Powershell (though I'm more a Perl and Python type of guy ;-) ). Thanks! –  Snark Sep 6 '09 at 11:03
    
Well, PowerShell has the advantage of being included with Windows 7. –  Joey Sep 6 '09 at 17:03
net stats workstation | find "since"
powercfg -lastwake
pause

put those lines into a .bat file, and execute him to report information about what woke the system from the last sleep transition and the UPTIME

share|improve this answer

This is probably unrelated, but if you open Task Manager, under the Performance tab, and the System group at the bottom, "Up Time" is listed in Days:Hours:Minutes:Seconds".

Not sure if any application exists that does the type of Auditing you want, you can check the Event Viewer, it may do just that, but i'm not sure.

share|improve this answer
    
Yes, I know about the Task Manager and SystemInfo command, but it only gives the uptime, not the power events. As said in my question, I already looked in the System Event log but only found the "Entering sleep" events. –  Snark Sep 6 '09 at 6:59

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.