System Uptime Utility

By | 2017-11-12

This is a simple but useful command line utility for determining the uptime of the local computer.

That’s it. That’s all it does. I wrote this some time ago and have found it useful over the years for monitoring up time of several systems. Really. A simple way of sending this to a central location would be to simply pipe the output to a shared location. Say, a file server share. Something like this:

uptime H >> D:\%computername%_uptime.txt

Like I said, I have found it useful over the years, and hope you do as well.

Help Screen

By using the ? command line switch, you can view the available command line options, as shown below.

V:\Uptime10>uptime ?

 UpTime 1.0.0
 (c) 2017 FortyPoundHead.com
 ---------------------------------------
 This program simply returns the uptime of the local system, with the choice of days, hours, minutes, or seconds.

 To select a display mode, simpy use one of the following command-line switches:

    D        Days
    H        Hours
    M        Minutes
    S        Seconds
    ?        Display this information

 Example:

    uptime D

 will result in the following output, if the local system has been up for seven days:

    7

Sample Runs

Here are few sample runs, one for each of the available command line switches:

V:\Uptime10>uptime D
7

V:\Uptime10>uptime H
174

V:\Uptime10>uptime M
10443

V:\Uptime10>uptime S
626607

License

This software is free to use. Free for commercial use, personal use, whatever. I do retain all copyrights, though.

Requirements

No special requirements. No external libraries needed, no internet access, nothing.

Special Instructions

No setup for this program is required.  Simply drop it into a directory somewhere in path, and it will be available to you for use.

If you do not put in a location in the path, you’ll have to reference it  by its full path and filename.

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.