Uptime

Last updated

Uptime is a measure of system reliability, expressed as the percentage of time a machine, typically a computer, has been working and available. Uptime is the opposite of downtime.

Contents

Htop adds an exclamation mark when uptime is longer than 100 days. Htop-uptime.png
Htop 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. [1]

Records

In 2005, Novell reported a server with a 6-year uptime. [2] [3] 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. [4] [5]

A Cisco router has been reported to have been running continuously for 21 years as of 2018. [6] As of April 11, 2023, the uptime has increased to 26 years, 25 weeks, 1 day, 1 hour, and 8 minutes until the router was later decommissioned and the final screenshot of the uptime was 26 years, 28 weeks, 2 seconds, and 6 minutes. [7] [8]

Determining system uptime

Microsoft Windows

Windows Task Manager

Windows 7 Task Manager Performance tab screenshot Win7-tskman-perf.png
Windows 7 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" [9] 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 ]

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. [10] 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. [11] At the command prompt, this can be done using the wmic command:

C:\>wmic os get lastbootuptime LastBootUpTime20110508161751.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. [12] [13]

Uptime.exe

Microsoft formerly provided a downloadable utility called Uptime.exe, which reports elapsed time in days, hours, minutes, and seconds. [14]

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 ]

FreeDOS

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

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. [16] On multi-core systems (and some Linux versions) the second number is the sum of the idle time accumulated by each CPU. [17]

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).

$ 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. [18] The w program is based on the RSTS/E, TOPS-10, and TOPS-20 SYSTAT program. [19]

Using sysctl

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

$ sysctlkern.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. [21]

$ showsystem/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

Related Research Articles

In computing, traceroute and tracert are computer network diagnostic commands for displaying possible routes (paths) and measuring transit delays of packets across an Internet Protocol (IP) network. The history of the route is recorded as the round-trip times of the packets received from each successive host in the route (path); the sum of the mean times in each hop is a measure of the total time spent to establish the connection. Traceroute proceeds unless all sent packets are lost more than twice; then the connection is lost and the route cannot be evaluated. Ping, on the other hand, only computes the final round-trip times from the destination point.

New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred filesystem on Windows and is supported in Linux and BSD as well. NTFS reading and writing support is provided using a free and open-source kernel implementation known as NTFS3 in Linux and the NTFS-3G driver in BSD. By using the convert command, Windows can convert FAT32/16/12 into NTFS without the need to rewrite all files. NTFS uses several files typically hidden from the user to store metadata about other files stored on the drive which can help improve speed and performance when reading data. Unlike FAT and High Performance File System (HPFS), NTFS supports access control lists (ACLs), filesystem encryption, transparent compression, sparse files and file system journaling. NTFS also supports shadow copy to allow backups of a system while it is running, but the functionality of the shadow copies varies between different versions of Windows.

<span class="mw-page-title-main">DR-DOS</span> MS-DOS-like operating system

DR-DOS is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS that attempted to be compatible with IBM PC DOS and MS-DOS.

<span class="mw-page-title-main">Network Time Protocol</span> Standard protocol for synchronizing time across devices

The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable-latency data networks. In operation since before 1985, NTP is one of the oldest Internet protocols in current use. NTP was designed by David L. Mills of the University of Delaware.

In computing, the superuser is a special user account used for system administration. Depending on the operating system (OS), the actual name of this account might be root, administrator, admin or supervisor. In some cases, the actual name of the account is not the determining factor; on Unix-like systems, for example, the user with a user identifier (UID) of zero is the superuser, regardless of the name of that account; and in systems which implement a role-based security model, any user with the role of superuser can carry out all actions of the superuser account. The principle of least privilege recommends that most users and applications run under an ordinary account to perform their work, as a superuser account is capable of making unrestricted, potentially adverse, system-wide changes.

<span class="mw-page-title-main">Year 2038 problem</span> Computer software bug occurring in 2038

The year 2038 problem is a time computing problem that leaves some computer systems unable to represent times after 03:14:07 UTC on 19 January 2038.

<span class="mw-page-title-main">Live CD</span> Complete, bootable computer installation that runs directly from a CD-ROM

A live CD is a complete bootable computer installation including operating system which runs directly from a CD-ROM or similar storage device into a computer's memory, rather than loading from a hard disk drive. A live CD allows users to run an operating system for any purpose without installing it or making any changes to the computer's configuration. Live CDs can run on a computer without secondary storage, such as a hard disk drive, or with a corrupted hard disk drive or file system, allowing data recovery.

In computing, a loadable kernel module (LKM) is an object file that contains code to extend the running kernel, or so-called base kernel, of an operating system. LKMs are typically used to add support for new hardware and/or filesystems, or for adding system calls. When the functionality provided by an LKM is no longer required, it can be unloaded in order to free memory and other resources.

fdisk Command line utility of DOS and Microsoft Windows operating systems

fdisk is a command-line utility for disk partitioning. It has been part of DOS, DR FlexOS, IBM OS/2, and early versions of Microsoft Windows, as well as certain ports of FreeBSD, NetBSD, OpenBSD, DragonFly BSD and macOS for compatibility reasons. Windows 2000 and its successors have replaced fdisk with a more advanced tool called diskpart.

IPX/SPX stands for Internetwork Packet Exchange/Sequenced Packet Exchange. IPX and SPX are networking protocols used initially on networks using the Novell NetWare operating systems. They also became widely used on networks deploying Microsoft Windows LANS, as they replaced NetWare LANS, but are no longer widely used. IPX/SPX was also widely used prior to and up to Windows XP, which supported the protocols, while later Windows versions do not, and TCP/IP took over for networking.

<span class="mw-page-title-main">UEFI</span> Operating system and firmware specification

Unified Extensible Firmware Interface is a specification that defines the architecture of the platform firmware used for booting the computer hardware and its interface for interaction with the operating system. Examples of firmware that implement the specification are AMI Aptio, Phoenix SecureCore, TianoCore EDK II, InsydeH2O. UEFI replaces the BIOS which was present in the boot ROM of all personal computers that are IBM PC compatible, although it can provide backwards compatibility with the BIOS using CSM booting. Intel developed the original Extensible Firmware Interface (EFI) specification. Some of the EFI's practices and data formats mirror those of Microsoft Windows. In 2005, UEFI deprecated EFI 1.10.

The Advanced Host Controller Interface (AHCI) is a technical standard defined by Intel that specifies the register-level interface of Serial ATA (SATA) host controllers in a non-implementation-specific manner in its motherboard chipsets.

<span class="mw-page-title-main">GUID Partition Table</span> Computer disk partitioning standard

The GUID Partition Table (GPT) is a standard for the layout of partition tables of a physical computer storage device, such as a hard disk drive or solid-state drive, using universally unique identifiers, which are also known as globally unique identifiers (GUIDs). Forming a part of the Unified Extensible Firmware Interface (UEFI) standard, it is nevertheless also used for some BIOSs, because of the limitations of master boot record (MBR) partition tables, which use 32 bits for logical block addressing (LBA) of traditional 512-byte disk sectors.

sysctl Unix-like software that manages kernel attributes

sysctl is a software utility of some Unix-like operating systems that reads and modifies the attributes of the system kernel such as its version number, maximum limits, and security settings. It is available both as a system call for compiled programs, and an administrator command for interactive use and scripting. Linux additionally exposes sysctl as a virtual file system.

Hibernation in computing is powering down a computer while retaining its state. When hibernation begins, the computer saves the contents of its random access memory (RAM) to a hard disk or other non-volatile storage. When the computer is turned on the RAM is restored and the computer is exactly as it was before entering hibernation. Hibernation was first implemented in 1992 and patented by Compaq Computer Corporation in Houston, Texas. Microsoft's Windows 10 employs a type of hibernation by default when shutting down.

The TCP window scale option is an option to increase the receive window size allowed in Transmission Control Protocol above its former maximum value of 65,535 bytes. This TCP option, along with several others, is defined in RFC 7323 which deals with long fat networks (LFNs).

<span class="mw-page-title-main">Hyper-V</span> Native hypervisor by Microsoft

Microsoft Hyper-V, codenamed Viridian, and briefly known before its release as Windows Server Virtualization, is a native hypervisor; it can create virtual machines on x86-64 systems running Windows. Starting with Windows 8, Hyper-V superseded Windows Virtual PC as the hardware virtualization component of the client editions of Windows NT. A server computer running Hyper-V can be configured to expose individual virtual machines to one or more networks. Hyper-V was first released with Windows Server 2008, and has been available without additional charge since Windows Server 2012 and Windows 8. A standalone Windows Hyper-V Server is free, but has a command-line interface only. The last version of free Hyper-V Server is Hyper-V Server 2019, which is based on Windows Server 2019.

<span class="mw-page-title-main">Unix-like</span> Operating system that behaves similarly to Unix, e.g. Linux

A Unix-like operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-like application is one that behaves like the corresponding Unix command or shell. Although there are general philosophies for Unix design, there is no technical standard defining the term, and opinions can differ about the degree to which a particular operating system or application is Unix-like.

References

  1. "How to install multiple Windows updates or hotfixes with only one reboot". Microsoft Knowledge Base. 2018-04-17. Retrieved 2024-02-01.
  2. Kearns, Dave (2005-12-01). "Marathon servers". Network World. IDG Communications. Retrieved 2019-07-11.
  3. "Uptime Workhorses: Still Crazy after all these Years". Novell Cool Solutions: Trench. Novell. 12 Jan 2006. Archived from the original on 2019-09-06. Retrieved 2019-07-11.
  4. Bright, Peter (2013-03-29). "Epic uptime achievement unlocked. Can you beat 16 years?". Arc Technica. Condé Nast. Retrieved 2019-07-11.
  5. Axatax (2013-03-28). "So long to a valiant companion". Ars OpenForum. Condé Nast. Archived from the original on 2014-07-26. Retrieved 2014-07-26.
  6. u/bhoskins (2018-05-15). "Old enough to drink". r/networking. Reddit. Retrieved 2022-04-22.
  7. "26 years and still ticking". 18 July 2023.
  8. "Nope, it got decomme…". 30 December 2023.
  9. Shultz, Greg (2005-08-10). "Tracking down uptime in Windows XP". TechRepublic. CBS Interactive. Archived from the original on 2012-07-08. Retrieved 2014-04-22.
  10. Sinay, Yuval (2006-10-25). "How to find Windows uptime?". Microsoft Knowledge Base. Microsoft. Retrieved 2014-04-22.
  11. "Win32_OperatingSystem class". Microsoft. 2018-05-30. Retrieved 2019-07-11.
  12. "How Can I Tell if a Server has Rebooted?". Hey, Scripting Guy! Blog. Microsoft. 2004-09-07. Retrieved 2014-04-22.
  13. "How Can I Determine the Uptime for a Server?". Hey, Scripting Guy! Blog. Microsoft. 2005-08-02. Retrieved 2014-04-22.
  14. "Uptime.exe Tool Allows You to Estimate Server Availability with Windows NT 4.0 SP4 or Higher". Microsoft Knowledge Base. Microsoft. 2012-08-20. Archived from the original on 2014-04-24. Retrieved 2014-04-22.
  15. Aitchison, M. (1998-04-15). "Package uptime in group Unix-like". ibiblio.org. Retrieved 2019-07-11.[ dead link ]
  16. Doleželová, Marie; Jahoda, Mirek; et al. "/proc/uptime". Deployment Guide - Red Hat Enterprise Linux 6. Red Hat, Inc. Retrieved 2018-12-12.
  17. Schwidefsky, Martin (2009-05-11). "Re: [PATCH] Re: /proc/uptime idle counter remains at 0". Linux kernel mailing list (Mailing list). Retrieved 2014-04-22.
  18. unknown; Bostic, Keith (October 21, 1988). "File usr.bin/w/Makefile artifact". University of California, Berkeley Computer Systems Research Group. Retrieved November 22, 2022. ln ${DESTDIR}/usr/ucb/w ${DESTDIR}/usr/ucb/uptime
  19. unknown; Joy, Bill (October 21, 1988). "File usr.bin/w/w.c artifac". University of California, Berkeley Computer Systems Research Group. Retrieved November 22, 2022. This program is similar to the systat command on Tenex/Tops 10/20
  20. "Mac OS X Manual Page For sysctl(8)". Mac Dev Center. Apple. 2009-10-15. Archived from the original on 2010-01-14. Retrieved 2014-04-22.
  21. "Undocumented OpenVMS Features". PARSEC Group. 2008-10-29. Archived from the original on 2011-05-11. Retrieved 2014-04-22.