Uptime
Encyclopedia
Uptime is a measure
Measurement
Measurement is the process or the result of determining the ratio of a physical quantity, such as a length, time, temperature etc., to a unit of measurement, such as the metre, second or degree Celsius...

 of the time a machine
Machine
A machine manages power to accomplish a task, examples include, a mechanical system, a computing system, an electronic system, and a molecular machine. In common usage, the meaning is that of a device having parts that perform or assist in performing any type of work...

 has been up without any downtime
Downtime
The term downtime is used to refer to periods when a system is unavailable.Downtime or outage duration refers to a period of time that a system fails to provide or perform its primary function...

.

It is often used as a measure of computer operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 reliability or stability, in that this time represents the time a computer can be left unattended without crashing
Crash (computing)
A crash in computing is a condition where a computer or a program, either an application or part of the operating system, ceases to function properly, often exiting after encountering errors. Often the offending program may appear to freeze or hang until a crash reporting service documents...

, or needing to be rebooted
Booting
In computing, booting is a process that begins when a user turns on a computer system and prepares the computer to perform its normal operations. On modern computers, this typically involves loading and starting an operating system. The boot sequence is the initial set of operations that the...

 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
Novell, Inc. is a multinational software and services company. It is a wholly owned subsidiary of The Attachmate Group. It specializes in network operating systems, such as Novell NetWare; systems management solutions, such as Novell ZENworks; and collaboration solutions, such as Novell Groupwise...

 reported a server with a 6 year uptime.

Netcraft
Netcraft
Netcraft is an Internet services company based in Bath, England.Netcraft provides web server and web hosting market-share analysis, including web server and operating system detection...

 maintains the uptime records for many thousands of web hosting computers.

Using systeminfo

Users of Windows XP Professional, Windows Server 2003
Windows Server 2003
Windows Server 2003 is a server operating system produced by Microsoft, introduced on 24 April 2003. An updated version, Windows Server 2003 R2, was released to manufacturing on 6 December 2005...

 and Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

 systems can type systeminfo at the Command Prompt to display all system information, including the System Up Time.


C:\> systeminfo | find "Time:"
System Up Time: 0 Days, 8 Hours, 7 Minutes, 19 Seconds


Note: Windows Vista Business 64-bit and Windows 7 do not return a "System Up Time" but "System Boot Time" instead.

Using net statistics server/workstation

This method functions properly in versions of Windows released prior to Windows Server 2008 R2
Windows Server 2008 R2
Windows Server 2008 R2 is a server operating system produced by Microsoft. It was released to manufacturing on July 22, 2009 and launched on October 22, 2009. According to the Windows Server Team blog, the retail availability was September 14, 2009. It is built on Windows NT 6.1, the same core...

 or Windows 7. While the command does run in any current version of Windows, the results are unreliable. You may, sometimes, replicate this by running the command on a computer followed by using either the WMI query or uptime commands listed here or you can open the task manager and, under the 'Performance' tab, read the uptime value. Note that the reference article only refers to Windows Server 2008 R2
Windows Server 2008 R2
Windows Server 2008 R2 is a server operating system produced by Microsoft. It was released to manufacturing on July 22, 2009 and launched on October 22, 2009. According to the Windows Server Team blog, the retail availability was September 14, 2009. It is built on Windows NT 6.1, the same core...

, however the issue does exist, intermittently, in other operating systems of the same generation. You may refer to this screenshot for a example of the discrepancy.


C:\> net statistics server | find "since"
Server Statistics for \\COMPUTERNAME

Statistics since 8/31/2009 8:52:29 PM



C:\> net statistics workstation | find "since"
Server Statistics for \\COMPUTERNAME

Statistics since 8/31/2009 8:52:29 PM

The line that start with "Statistics since ..." provides the time that the server was up from. The command "net stats srv" is shorthand for "net statistics server."

Using Uptime.exe

Microsoft has also provided a downloadable Uptime.exe utility:


C:\> Uptime
SYSTEMNAME has been up for: 2 day(s), 4 hour(s), 24 minute(s), 47 second(s)

Using WMI

Uptime can also be determined via Windows Management Instrumentation
Windows Management Instrumentation
Windows Management Instrumentation is a set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components provide information and notification...

 from the command-line with WMIC:


C:\> wmic os get lastbootuptime
LastBootUpTime
20110508161751.822066+060


The timestamp is in the format yyyymmddhhmmss.nnn, so this is a computer that last booted up on 8 May 2011 at 16:17:51.822. WMI can also be used to find the boot time of remote computers as well (Windows permissions allowing), for example with WMIC:


C:\> wmic /node:"my-server" os get lastbootuptime
LastBootUpTime
20101219141712.462006+060


WMI can also be used via a programming language such as VBScript or Powershell

Using Windows Task Manager

Users of Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

 and Windows 7 can see uptime in Windows Task Manager
Windows Task Manager
Windows Task Manager is a task manager application included with the Microsoft Windows NT family of operating systems that provides detailed information about computer performance and running applications, processes and CPU usage, commit charge and memory information, network activity and...

 under the tab Performance.

Using uptime

Users of Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 systems can use the uptime utility to get the uptime, together with the current time, the number of users and load averages
Load (computing)
In UNIX computing, the system load is a measure of the amount of work that a computer system performs. The load average represents the average system load over a period of time...

 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.

Using uptime

Like Linux, BSD based operating systems such as FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

 and Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 also have the uptime command (See ).

Using sysctl

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


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

OpenVMS

Users of OpenVMS
OpenVMS
OpenVMS , previously known as VAX-11/VMS, VAX/VMS or VMS, is a computer server operating system that runs on VAX, Alpha and Itanium-based families of computers. Contrary to what its name suggests, OpenVMS is not open source software; however, the source listings are available for purchase...

 systems can type show system at the command prompt.


$ show system/noprocess
OpenVMS V7.3-2 on node JACK 29-JAN-2008 16:32:04.67 Uptime 894 22:28:52


This shows the uptime as days then hours:minutes:seconds.

External Uptime Measuring

There are a many external services which can be used to monitor the uptime and downtime as well as availability of a service or a host. Some examples:
  • Pingdom
    Pingdom
    Pingdom is a service that tracks the uptime, downtime, and performance of websites. Based in Sweden, Pingdom monitors websites from multiple locations globally so that it can distinguish genuine downtime from routing and access problems....

  • WatchMouse

See also

  • List of Unix programs
  • Maintenance window
    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 availability services :...

  • System profiler‎
  • Website monitoring
    Website monitoring
    Website monitoring is the process of testing and verifying that end-users can interact with a website or web application. Website monitoring is often used by businesses to ensure that their sites are live and responding....

  • Uptime, the first half of a double album by the Kleptones
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK