From Surf Wiki (app.surf) — the open knowledge base
Uptime
Period when a computer system is available
Period when a computer system is available
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.
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.{{cite web |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
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 |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}}
Determining system uptime
Unix-like systems (Linux, FreeBSD)
Using uptime
Most Unix-like systems including Linux, FreeBSD, Mac OS X, and SySVr4 have the uptime command. It also displays the system load averages for the past 1, 5, and 15-minute intervals:
user@Linux$ uptime
18:17:07 up 68 days, 3:57, 6 users, load average: 0.16, 0.07, 0.06
user@BSD$ uptime
3:01AM up 69 days, 7:53, 0 users, load averages: 0.08, 0.07, 0.05
This command originated in 3.0BSD and has become ubiquitous among Unix systems ever since. Despite almost always providing the same collection of information and being so ubiquitous, it is not part of any Unix-related standard, neither SUS nor POSIX.
On Linux, the uptime command is part of coreutils.
On BSD, the uptime command is hard link to the w program. The w program is based on the RSTS/E, TOPS-10, and TOPS-20 SYSTAT program.
Using system-specific interfaces
Each Unix-like system also has its own private interfaces for obtaining the system uptime.
Linux
On Linux, several procfs files provide information on the system uptime. The main file is , but provides related information too.
$ 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.
The C API for uptime information is .
BSD
On BSD systems and macOS (a combination of BSD and XNU parts), the uptime information is available from the sysctl system, both in the form of the sysctl command and the C function. The sysctl entry is called , which provides boot time that can be converted to an uptime by subtracting it from the current time:{{cite web |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
macOS also provides the uptime as , a POSIX interface with implementation-defined starting point; macOS sets the starting point at system boot. and are additional ways to access the same raw monotonic clock.
On FreeBSD (but not macOS), the kernel exports three symbols that can be used as variables in C to obtain the boot time and uptime. They are called , , and . These require no function call at all to use, unlike . Higher-precision uptime is provided from functions such as .
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.
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.
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 (WMI), by querying the LastBootUpTime property of the Win32_OperatingSystem class.{{cite web
|access-date=2019-07-11
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
|access-date=2014-04-22
|archive-date=2010-05-01
|archive-url=https://web.archive.org/web/20100501141231/http://blogs.technet.com/heyscriptingguy/archive/2004/09/07/how-can-i-tell-if-a-server-has-rebooted.aspx
|url-status=dead
|access-date=2014-04-22
|archive-date=2010-05-15
|archive-url=https://web.archive.org/web/20100515174519/http://blogs.technet.com/heyscriptingguy/archive/2005/08/02/how-can-i-determine-the-uptime-for-a-server.aspx
|url-status=dead
Uptime.exe
Microsoft formerly provided a downloadable utility called Uptime.exe, which reports elapsed time in days, hours, minutes, and seconds.{{cite web
|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.
FreeDOS
The uptime command is also available for FreeDOS. The version was developed by M. Aitchison.
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
|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.
References
References
- (2018-04-17). "How to install multiple Windows updates or hotfixes with only one reboot". Microsoft Knowledge Base.
- Kearns, Dave. (2005-12-01). "Marathon servers". IDG Communications.
- Bright, Peter. (2013-03-29). "Epic uptime achievement unlocked. Can you beat 16 years?". Condé Nast.
- {{multiref2. {{man. 1. uptime. FreeBSD. {{man. 1. uptime. ManKier
- (October 21, 1988). "File usr.bin/w/Makefile artifact". University of California, Berkeley Computer Systems Research Group.
- (October 21, 1988). "File usr.bin/w/w.c artifac". University of California, Berkeley Computer Systems Research Group.
- {{multiref2. {{man. 5. proc_uptime. ManKier. {{man. 5. proc_stat. ManKier
- "/proc/uptime". Red Hat, Inc..
- Schwidefsky, Martin. (2009-05-11). "Re: [PATCH] Re: /proc/uptime idle counter remains at 0".
- {{man. 2. sysinfo. ManKier
- "Getting iOS system uptime, that doesn't pause when asleep". Stack Overflow.
- {{man. 9. boottime. FreeBSD
- {{man. 9. binuptime. FreeBSD
- Shultz, Greg. (2005-08-10). "Tracking down uptime in Windows XP". CBS Interactive.
- Sinay, Yuval. (2006-10-25). "How to find Windows uptime?". Microsoft.
- Aitchison, M.. (1998-04-15). "Package uptime in group Unix-like".
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Uptime — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report