# Uptime

Uptime is a measure of system reliability, expressed as the period of time a machine, typically a computer, has been continuously working and available. Uptime is the opposite of downtime.
It is often used as a measure of computer operating system reliability or stability, in that this time represents the time a computer can be left unattended without crashing or needing to be rebooted for administrative or maintenance purposes.
Conversely, long uptime may indicate negligence, because some critical updates can require reboots on some platforms.

## Records

In 2005, Novell reported a server with a 6-year uptime. Although that might sound unusual, that is actually common when servers are maintained under an industrial context and host critical applications such as banking systems.
Netcraft maintains the uptime records for many thousands of web hosting computers.
A server running Novell NetWare has been reported to have been shut down after 16 years of uptime due to a failing hard disk.
A Cisco router had been reported to have been running continuously for 21 years as of 2018. As of April 11, 2023, the uptime had increased to 26 years, 25 weeks, 1 day, 1 hour, and 8 minutes until the router was later decommissioned and the final report of the uptime was 26 years, 28 weeks, 2 days, and 6 minutes.

## Determining system uptime
### Microsoft Windows
#### Windows Task Manager

Some versions of Microsoft Windows include an uptime field in Windows Task Manager, under the "Performance" tab. The format is D:HH:MM:SS (days, hours, minutes, seconds).

#### systeminfo

The output of the systeminfo command includes a "System Up Time" or "System Boot Time" field.
The exact text and format are dependent on the language and locale. The time given by systeminfo is not reliable. It does not take into account time spent in sleep or hibernation. Thus, the boot time will drift forward every time the computer sleeps or hibernates.

#### NET command

The NET command with its STATISTICS sub-command provides the date and time the computer started, for both the NET STATISTICS WORKSTATION and NET STATISTICS SERVER variants. The command NET STATS SRV is shorthand for NET STATISTICS SERVER. The exact text and date format is dependent on the configured language and locale.

#### Windows Management Instrumentation (WMI)

Uptime can be determined via Windows Management Instrumentation (WMI), by querying the LastBootUpTime property of the Win32_OperatingSystem class. At the command prompt, this can be done using the wmic command:
The timestamp uses the format yyyymmddhhmmss.nnn, so in the above example, the computer last booted up on 8 May 2011 at 16:17:51.822. The text "LastBootUpTime" and the timestamp format do not vary with language or locale. WMI can also be queried using a variety of application programming interfaces, including VBScript or PowerShell.

#### Uptime.exe

Microsoft formerly provided a downloadable utility called Uptime.exe, which reports elapsed time in days, hours, minutes, and seconds.
The time given by Uptime.exe is not reliable. It does not take into account time spent in sleep or hibernation. Thus, the boot time will drift forward every time the computer sleeps or hibernates.

### FreeDOS

The uptime command is also available for FreeDOS. The version was developed by M. Aitchison.

### Linux
#### Using uptime

Users of Linux systems can use the BSD uptime utility, which also displays the system load averages for the past 1, 5, and 15-minute intervals:

#### Using /proc/uptime

Shows how long the system has been on since it was last restarted:
The first number is the total number of seconds the system has been up. The second number is how much of that time the machine has spent idle, in seconds. On multi-core systems (and some Linux versions) the second number is the sum of the idle time accumulated by each CPU.

### BSD
#### Using uptime

BSD-based operating systems such as FreeBSD, Mac OS X, and SySVr4 have the uptime command (See uptime(1) – FreeBSD General Commands Manual).
The uptime program on BSD is a hard link to the w program. The w program is based on the RSTS/E, TOPS-10, and TOPS-20 SYSTAT program.

#### Using sysctl

There is also a method of using sysctl to call the system's last boot time:

### OpenVMS

On OpenVMS systems, the show system command can be used at the DCL command prompt to obtain the system uptime. The first line of the resulting display includes the system's uptime, displayed as days followed by hours:minutes:seconds. In the following example, the command qualifier /noprocess suppresses the display of per-process detail lines of information.
The command output above shows that node JACK on 29 January 2008 at 16:32:04.67 has an uptime of 894 days 22 hours 28 minutes and 52 seconds.