Valid HTML 4.01!

Valid CSS!

Mr T Server

Windows Uptime v1.02

The Windows Uptime program is a command-line utility which outputs how long a Windows machine has been on. The output format is "# days, # hours, # minutes, # seconds".

This program may only execute on Windows NT/2000/XP, since the main function used to gather information from the system lies within the "winnt.h" file.

The program is written in C++ and compiled using GCC on Cygwin with the "-mno-cygwin" flag specified to create a Windows binary which does not rely on the Cygwin DLL.

v1.01 update: Decreased the binary size with a linker option. The program might work on non-NT Windows. Also, when used on NT-based Windows, uptime will not suffer from the 49.7 day tick-count problem. For NT-based Windows, the Event Log is queried for the system start time. If query fails, the tick count is used. Although the Event Log isn't as accurate as the system tick, it really doesn't matter since the OS isn't practically functional until all the services have started sometime after the 6009 event.

v1.02 update: Small output change to more closely match the Apache mod_status output. Columns with zero are no longer displayed.

Usage:

C:\uptime
2 days 1 hours 27 minutes 14 seconds


See the Uptime app in use

Download uptime.exe (6.5 KB)

Note: This software is provided as-is, with no guarantee of support should something go wrong. It is recommended that you use some virus-scanning software to scan any file you obtain from the Internet. This software is FREE; download as much as you like.