uptime

display how long system has been running 

Command


SYNOPSIS

uptime [-S hostname] [-ms] [-s] [-m] [-h] [-d] [-H]


DESCRIPTION

The uptime utility displays a one line summary of the following:

The uptime is normally displayed in days, hours, and minutes as appropriate. However, various options let you view the uptime only in days, hours, seconds, or milliseconds, as needed.

The current time is the local time and is displayed in hh:mmmmmam/pm format.

The displayed number of sessions is the number of current user connections to the systems.

Each of the load averages is the average of the number of processes in the processor queue over the given length of time. This feature is not currently implemented; all load averages are displayed as 0.00.

On 10/2016/2019/11/2022/2025, you can use the -S to determine this same information for a remote 10/2016/2019/11/2022/2025 machine. To do so, you must have administrator access rights for the remote machine.

Options

-d 

displays the uptime in days.

-H 

displays usage information about uptime.

-h 

displays the uptime in hours.

-m 

displays the uptime in minutes.

-ms 

displays the uptime in milliseconds.

-S hostname 

displays information for the remote 10/2016/2019/11/2022/2025 machine named hostname rather than the default local machine. You must have have administrator access rights on hostname.

-s 

displays the uptime in seconds.


EXAMPLES

The following list shows various uptime commands followed by the output each might produce:

uptime
	4:05pm  up 35 mins, 1 session , load average: 0.00, 0.00, 0.00.

uptime - S 15x
	 4:10pm  up 42 mins, 3 sessions , load average: 0.00, 0.00, 0.00.

uptime  -S Server1
	4:12pm  up 23 days,  2:03, 3 sessions , load average: 0.00, 0.00, 0.00.

uptime  -S \\mar3
	4:13pm  up  7:00, 1 session , load average: 0.00, 0.00, 0.00.

uptime  -h  -S  \\Server1
	4:45pm  up 554.61 hours, 5 sessions , load average: 0.00, 0.00, 0.00. 

DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure due to any of the following problems while querying for the performance data on 10/2016/2019/11/2022/2025:

— unable to create performance query
— unable to initialize a counter structure for the system uptime counter in the query
— unable to collect the current raw data value for the counter in the query
— unable to get the current value of the counter in the required format
2 

Invalid usage of the command line options.

2 

Invalid usage of the command line options.

3 

Inability to load the library pdh.dll on 10/2016/2019/11/2022/2025.

4 

Permission denied to determine uptime for the machine. You must have administrator privileges and have access rights to the machine.

5 

Failure in retrieving uptime for the machine since the machine could not be found.


PORTABILITY

Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.5 Documentation Build 40.