About Linux FAQ

Browse More FAQs:

Server uptime command to find out how long the system has been running

Posted by Vivek Gite [Last updated: August 28, 2006]

You would like to find out how long the system has been running. Linux and UNIX comes with various command to find out server uptime command. Under Linux file /proc/uptime has uptime information, /var/run/utmp has information about who is currently logged on. However, information from /proc or utmp file is not directly readable by humans so we use following commands:

Uptime command

$ uptime
17:08:49 up  5:54,  6 users,  load average: 2.03, 1.68, 1.50

uptime command gives a one line display of the following information.

  • The current time (17:08:49)
  • How long the system has been running (up 5:54)
  • How many users are currently logged on (6 users)
  • The system load averages for the past 1, 5, and 15 minutes (2.03, 1.68, 1.5)

This is the same information contained in the header line displayed by w and top command:

$ w
$ top

Note that w displays who is logged on and what they are doing while top command provides a dynamic real-time view of a running Linux/UNIX/BSD system.

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. Onur Buyukceran Says:

    my favorite :) updates every second….

    top -d 1

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.