DISQUS

Tech-Recipes: XP/2K/2003: View uptime of Windows system | Windows | Tech-Recipes

  • davak · 5 years ago
    Are you saying that your way of getting uptime is better than mine?

    :wink:

    davak
  • davak · 5 years ago
    Sample Output:

    <ul id="quote">Workstation Statistics for \TECHIE


    Statistics since 8/18/2004 4:48 PM


    Bytes received 1351749
    Server Message Blocks (SMBs) received 11320
    Bytes transmitted 1398661
    Server Message Blocks (SMBs) transmitted 11318
    Read operations 184
    Write operations 0
    Raw reads denied 0
    Raw writes denied 0

    Network errors 0
    Connections made 866
    Reconnections made 5
    Server disconnects 861

    Sessions started 0
    Hung sessions 0
    Failed sessions 0
    Failed operations 2
    Use count 1711
    Failed use count 7

    The command completed successfully.</ul>
  • qmchenry · 5 years ago
    Oh, hmm. Yeah, your way is a little better because it shows the actual uptime and doesn't require mental algebra (and knowledge of what day it is, which I generally lack). Your way generates lots of extra stuff I wouldn't want to see. I really wish Windows had more command line tools like (ahem) UNIX so I could pipe it to grep and pull out the uptime line...
  • davak · 5 years ago
    <ul id="quote"><h6>qmchenry wrote:</h6>Oh, hmm. Yeah, your way is a little better because it shows the actual uptime and doesn't require mental algebra (and knowledge of what day it is, which I generally lack). Your way generates lots of extra stuff I wouldn't want to see. I really wish Windows had more command line tools like (ahem) UNIX so I could pipe it to grep and pull out the uptime line...</ul>

    And THAT'S why Monad/MSH will rock so much. It has all of those filtering tools built-in.

    Davak
  • Anonymous · 4 years ago
    Use

    systeminfo | find "System Up Time"

    which will do the "grep" for you.
  • spanky · 1 year ago
    ... or you could just use the system up time counter, and have things logged to file at a predefined interval, without having to manually type a command every time you what an update.
  • ace · 1 year ago
    this is excellent
    thank u
  • Ahmad Kamal · 6 months ago
    why start counting the days use the command systmeinfo and it will show you everything you really need.