uptime

{{Short description|Period when a computer system is available}}

{{about|uninterrupted system availability|use in logistics|Downtime|enterprise computing|high availability|the magazine|UpTime (disk magazine)|the first half of a double album by the Kleptones|Uptime / Downtime#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.

File:Htop-uptime.png adds an exclamation mark when uptime is longer than 100 days.]]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.{{cite web |date=2018-04-17 |title=How to install multiple Windows updates or hotfixes with only one reboot |url=https://support.microsoft.com/en-au/topic/how-to-install-multiple-windows-updates-or-hotfixes-with-only-one-reboot-6247def4-7f39-c1a0-efe5-61f82849fb7c |access-date=2024-02-01 |work=Microsoft Knowledge Base}}

Records

In 2005, Novell reported a server with a 6-year uptime.{{cite web |last=Kearns |first=Dave |date=2005-12-01 |title=Marathon servers |url=http://www.networkworld.com/newsletters/netware/2005/1128nw2.html |access-date=2019-07-11 |work=Network World |publisher=IDG Communications |archive-date=2013-05-08 |archive-url=https://web.archive.org/web/20130508231030/http://www.networkworld.com/newsletters/netware/2005/1128nw2.html |url-status=dead }}{{cite web

|title=Uptime Workhorses: Still Crazy after all these Years

|date=12 Jan 2006

|work=Novell Cool Solutions: Trench

|publisher=Novell

|url=http://www.novell.com/coolsolutions/trench/241.html

|access-date=2019-07-11

|archive-date=2019-09-06

|archive-url=https://web.archive.org/web/20190906110515/http://www.novell.com/coolsolutions/trench/241.html

|url-status=dead

}} This level of uptime is 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.{{cite web |last=Bright |first=Peter |date=2013-03-29 |title=Epic uptime achievement unlocked. Can you beat 16 years? |url=https://arstechnica.com/information-technology/2013/03/epic-uptime-achievement-can-you-beat-16-years/ |access-date=2019-07-11 |work=Arc Technica |publisher=Condé Nast}}{{cite web

|title=So long to a valiant companion

|last=Axatax

|date=2013-03-28

|work=Ars OpenForum

|publisher=Condé Nast

|url=https://arstechnica.com/civis/viewtopic.php?f=23&t=1199529

|archive-url=https://web.archive.org/web/20140726085958/https://arstechnica.com/civis/viewtopic.php?f=23&t=1199529

|url-status=dead

|archive-date=2014-07-26

|access-date=2014-07-26}}

A Cisco router had been reported to have been running continuously for 21 years as of 2018.{{cite web

|title=Old enough to drink

|last=u/bhoskins

|date=2018-05-15

|work=r/networking

|publisher=Reddit

|url=https://old.reddit.com/r/networking/comments/8jn0fl/old_enough_to_drink

|access-date=2022-04-22

}} 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.{{cite web | url=https://www.reddit.com/r/uptimeporn/comments/1538uuv/26_years_and_still_ticking | title=26 years and still ticking | date=18 July 2023 }}{{cite web | url=https://www.reddit.com/r/uptimeporn/comments/1538uuv/comment/l69karj/ | title=Nope, it got decomme… | date=29 May 2024 }}

Determining system uptime

=Microsoft Windows=

==Windows Task Manager==

Image:Win7-tskman-perf.png Task Manager Performance tab screenshot]]

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"{{cite web |last=Shultz |first=Greg |date=2005-08-10 |title=Tracking down uptime in Windows XP |url=http://articles.techrepublic.com.com/5100-10878_11-5826014.html |url-status=dead |archive-url=https://archive.today/20120708043004/http://articles.techrepublic.com.com/5100-10878_11-5826014.html |archive-date=2012-07-08 |access-date=2014-04-22 |work=TechRepublic |publisher=CBS Interactive}} 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 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.{{citation needed|date=August 2015}}

==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.{{cite web |last=Sinay |first=Yuval |date=2006-10-25 |title=How to find Windows uptime? |url=http://support.microsoft.com/kb/555737 |access-date=2014-04-22 |work=Microsoft Knowledge Base |publisher=Microsoft}} 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 (WMI), by querying the LastBootUpTime property of the Win32_OperatingSystem class.{{cite web

|title=Win32_OperatingSystem class

|publisher=Microsoft

|date=2018-05-30

|url=https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-operatingsystem

|access-date=2019-07-11

}} At the command prompt, 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 interfaces, including VBScript or PowerShell.{{cite web

|title=How Can I Tell if a Server has Rebooted?

|date=2004-09-07

|work=Hey, Scripting Guy! Blog

|publisher=Microsoft

|url=http://blogs.technet.com/heyscriptingguy/archive/2004/09/07/how-can-i-tell-if-a-server-has-rebooted.aspx

|access-date=2014-04-22

}}{{cite web

|title=How Can I Determine the Uptime for a Server?

|date=2005-08-02

|work=Hey, Scripting Guy! Blog

|publisher=Microsoft

|url=http://blogs.technet.com/heyscriptingguy/archive/2005/08/02/how-can-i-determine-the-uptime-for-a-server.aspx

|access-date=2014-04-22}}

==Uptime.exe==

Microsoft formerly provided a downloadable utility called Uptime.exe, which reports elapsed time in days, hours, minutes, and seconds.{{cite web

|title=Uptime.exe Tool Allows You to Estimate Server Availability with Windows NT 4.0 SP4 or Higher

|date=2012-08-20

|work=Microsoft Knowledge Base

|publisher=Microsoft

|url=http://support.microsoft.com/kb/232243

|access-date=2014-04-22

|url-status=dead

|archive-url=https://web.archive.org/web/20140424044710/http://support.microsoft.com/kb/232243

|archive-date=2014-04-24

}}

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 or hibernation. Thus, the boot time will drift forward every time the computer sleeps or hibernates.{{citation needed|date=August 2015}}

=FreeDOS=

The uptime command is also available for FreeDOS. The version was developed by M. Aitchison.{{cite web |last=Aitchison |first=M. |date=1998-04-15 |title=Package uptime in group Unix-like |url=http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/uptime.html |access-date=2019-07-11 |website=ibiblio.org |archive-date=2019-07-17 |archive-url=https://web.archive.org/web/20190717153339/http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/uptime.html |url-status=dead }}

= <span id="coreutils"></span> 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:

$ 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.{{cite web |last1=Doleželová |first1=Marie |last2=Jahoda |first2=Mirek |display-authors=etal |title=/proc/uptime |url=https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s2-proc-uptime |access-date=2018-12-12 |work=Deployment Guide - Red Hat Enterprise Linux 6 |publisher=Red Hat, Inc.}} On multi-core systems (and some Linux versions) the second number is the sum of the idle time accumulated by each CPU.{{cite mailing list |last=Schwidefsky |first=Martin |title=Re: [PATCH] Re: /proc/uptime idle counter remains at 0 |mailing-list=Linux kernel mailing list |date=2009-05-11 |url=https://lkml.org/lkml/2009/5/11/35 |access-date=2014-04-22}}

=BSD=

==Using uptime==

BSD-based operating systems such as FreeBSD, Mac OS X, and SySVr4 have the uptime command (See {{man|1|uptime|FreeBSD}}).

$ 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 to the w program.{{cite web |url=https://fossil.fuhrwerks.com/csrg/file?name=usr.bin/w/Makefile&ci=47379f41b4a67be4 |title=File usr.bin/w/Makefile artifact |author1=unknown |last2=Bostic |first2=Keith |author-link2=Keith Bostic (software engineer) |date=October 21, 1988 |publisher=University of California, Berkeley Computer Systems Research Group |access-date=November 22, 2022 |quote=ln ${DESTDIR}/usr/ucb/w ${DESTDIR}/usr/ucb/uptime}} The w program is based on the RSTS/E, TOPS-10, and TOPS-20 SYSTAT program.{{cite web |url=https://fossil.fuhrwerks.com/csrg/file?name=usr.bin/w/w.c&ci=2685ec94a90521f7 |title=File usr.bin/w/w.c artifac |author1=unknown |last2=Joy |first2=Bill |author-link2=Bill Joy |date=October 21, 1988 |publisher=University of California, Berkeley Computer Systems Research Group |access-date=November 22, 2022 |quote=This program is similar to the systat command on Tenex/Tops 10/20}}

==Using sysctl==

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

|title=Mac OS X Manual Page For sysctl(8)

|date=2009-10-15

|work=Mac Dev Center

|publisher=Apple

|url=https://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man8/sysctl.8.html

|access-date=2014-04-22

|url-status=dead

|archive-url=https://web.archive.org/web/20100114012106/https://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man8/sysctl.8.html

|archive-date=2010-01-14

}}

$ sysctl kern.boottime

kern.boottime: { sec = 1271934886, usec = 667779 } Thu Apr 22 12:14:46 2010

=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.{{cite web

|title=Undocumented OpenVMS Features

|date=2008-10-29

|publisher=PARSEC Group

|url=http://www.parsec.com/openvms/undocumented.php?page=9

|access-date=2014-04-22

|url-status=dead

|archive-url=https://web.archive.org/web/20110511201356/http://www.parsec.com/openvms/undocumented.php?page=9

|archive-date=2011-05-11

}}

$ 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 an uptime of 894 days 22 hours 28 minutes and 52 seconds.

See also

{{Wiktionary}}

{{Wikibooks|Guide to Windows Commands}}

References