Uptime is a
measure of system reliability, expressed as the percentage of
time
Time is the continued sequence of existence and event (philosophy), events that occurs in an apparently irreversible process, irreversible succession from the past, through the present, into the future. It is a component quantity of various me ...
a
machine
A machine is a physical system using power to apply forces and control movement to perform an action. The term is commonly applied to artificial devices, such as those employing engines or motors, but also to natural biological macromolecul ...
, typically a
computer
A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations ( computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These prog ...
, has been working and available. Uptime is the opposite of
downtime
The term downtime is used to refer to periods when a system is unavailable.
The unavailability is the proportion of a time-span that a system is unavailable or offline.
This is usually a result of the system failing to function because of an un ...
.
It is often used as a measure of computer
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
reliability or stability, in that this time represents the time a computer can be left unattended without
crashing, or needing to be
rebooted
''Rebooted'' is the third season of the computer-animated television series '' Ninjago: Masters of Spinjitzu'' (titled ''Ninjago'' from the eleventh season onward). The series was created by Michael Hegner and Tommy Andreasen. The season aired fr ...
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
Novell, Inc. was an American software and services company headquartered in Provo, Utah, that existed from 1980 until 2014. Its most significant product was the multi- platform network operating system known as Novell NetWare.
Under the le ...
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
NetWare is a discontinued computer network operating system developed by Novell, Inc. It initially used cooperative multitasking to run various services on a personal computer, using the IPX network protocol.
The original NetWare product in ...
has been reported to have been shut down after 16 years of uptime due to a failing hard disk.
A
Cisco
Cisco Systems, Inc., commonly known as Cisco, is an American-based multinational digital communications technology conglomerate corporation headquartered in San Jose, California. Cisco develops, manufactures, and sells networking hardware, ...
router has been reported to have been running continuously for 21 years.
Determining system uptime
Microsoft Windows
Windows Task Manager
Some versions of
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
include an uptime field in
Windows Task Manager
Task Manager, previously known as Windows Task Manager, is a task manager, system monitor, and startup manager included with Microsoft Windows systems. It provides information about computer performance and running software, including name of ...
, 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.
C:\>systeminfo , findstr "Time:"
System Up Time: 0 Days, 8 Hours, 7 Minutes, 19 Seconds
The exact text and format is dependent on the language and locale. The time given by
systeminfo
is not reliable. It does not take into account time spent in
sleep
Sleep is a sedentary state of mind and body. It is characterized by altered consciousness, relatively inhibited Perception, sensory activity, reduced muscle activity and reduced interactions with surroundings. It is distinguished from wakefuln ...
or
hibernation
Hibernation is a state of minimal activity and metabolic depression undergone by some animal species. Hibernation is a seasonal heterothermy characterized by low body-temperature, slow breathing and heart-rate, and low metabolic rate. It mos ...
. 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.
C:\>NET STATISTICS WORKSTATION , findstr "since"
Statistics since 8/31/2009 8:52:29 PM
Windows Management Instrumentation (WMI)
Uptime can be determined via
Windows Management Instrumentation
Windows Management Instrumentation (WMI) consists of a set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components provide information and notification. WMI is Microsoft's im ...
(WMI), by querying the
LastBootUpTime
property of the
Win32_OperatingSystem
class. At the
command prompt
Command Prompt, also known as cmd.exe or cmd, is the default command-line interpreter for the OS/2, eComStation, ArcaOS, Microsoft Windows (Windows NT family and Windows CE family), and ReactOS operating systems. On Windows CE .NET 4.2, ...
, this can be done using the
wmic
command:
C:\>wmic os get lastbootuptime
LastBootUpTime
20110508161751.822066+060
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 interface
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
s, including
VBScript
VBScript (''" Microsoft Visual Basic Scripting Edition"'') is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing comput ...
or
PowerShell.
Uptime.exe
Microsoft formerly provided a downloadable utility called
Uptime.exe
, which reports elapsed time in days, hours, minutes, and seconds.
C:\>Uptime
SYSTEMNAME has been up for: 2 day(s), 4 hour(s), 24 minute(s), 47 second(s)
The time given by
Uptime.exe
is not reliable. It does not take into account time spent in
sleep
Sleep is a sedentary state of mind and body. It is characterized by altered consciousness, relatively inhibited Perception, sensory activity, reduced muscle activity and reduced interactions with surroundings. It is distinguished from wakefuln ...
or
hibernation
Hibernation is a state of minimal activity and metabolic depression undergone by some animal species. Hibernation is a seasonal heterothermy characterized by low body-temperature, slow breathing and heart-rate, and low metabolic rate. It mos ...
. Thus, the boot time will drifts 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
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
systems can use the BSD uptime utility, which also displays the system load averages for the past 1, 5 and 15 minute intervals:
$ uptime
18:17:07 up 68 days, 3:57, 6 users, load average: 0.16, 0.07, 0.06
Using /proc/uptime
Shows how long the system has been on since it was last restarted:
$ cat /proc/uptime
350735.47 234388.90
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
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
,
Mac OS X
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lap ...
and
SySVr4 have the ''uptime'' command (See ).
$ uptime
3:01AM up 69 days, 7:53, 0 users, load averages: 0.08, 0.07, 0.05
The uptime program on BSD is a
Hard link
In computing, a hard link is a directory entry (in a directory-based file system) that associates a name with a file. Thus, each file must have at least one hard link. Creating additional hard links for a file makes the contents of that file ac ...
to the w program. The w program is based on the
RSTS/E,
TOPS-10
TOPS-10 System (''Timesharing / Total Operating System-10'') is a discontinued operating system from Digital Equipment Corporation (DEC) for the PDP-10 (or DECsystem-10) mainframe computer family. Launched in 1967, TOPS-10 evolved from the earlie ...
and
TOPS-20 SYSTAT program.
Using sysctl
There is also a method of using ''sysctl'' to call the system's last boot time:
$ sysctl kern.boottime
kern.boottime: Thu Apr 22 12:14:46 2010
OpenVMS
On
OpenVMS
OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
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.
$ show system/noprocess
OpenVMS V7.3-2 on node JACK 29-JAN-2008 16:32:04.67 Uptime 894 22:28:52
The command output above shows that node JACK on 29 January 2008 at 16:32:04.67 has uptime: 894 days 22 hours 28 minutes and 52 seconds.
See also
*
Availability
*
List of Unix commands
*
Maintenance window
In information technology and systems management, a maintenance window is a period of time designated in advance by the technical staff, during which preventive maintenance that could cause disruption of service may be performed.
High availab ...
*
System profiler
{{noref, date=September 2018
A system profiler is a program that can provide detailed information about the software installed and hardware attached to a computer. Typically workstations and personal computers have had system profilers as a comm ...
*
Transmission Control Protocol#TCP timestamps – can allow remote estimation of uptime
*
Website monitoring
*
Who (Unix)
The standard Unix command who displays a list of users who are currently logged into the computer.
The who command is related to the command , which provides the same information but also displays additional data and statistics.
History
A com ...
– can display the time the system was booted
References
{{Windows commands
Real-time computing
Unix user management and support-related utilities
Fault-tolerant computer systems
Windows administration