This tutorial explains Linux “ruptime” command, options and its usage with examples.
Description :
Ruptime gives a status line like uptime for each machine on the local network; these are formed from packets broadcast by each host on the network once a minute. Machines for which no status report has been received for 11 minutes are shown as being down.
Ruptime gives a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.
Usage :
ruptime [ -a] [ -r] [ -l | -t | -u]
Options :
-a
Includes all users. Without this flag, users whose sessions are idle an hour or more are not included.
-l
Sorts the list by the load average.
-r
Reverses the sort order. The -r flag should be used with the -l, -t or -u flag.
-t
Sorts the list by the uptime.
-u
Sorts the list by the number of users.
Examples :
1. To get a status report on the hosts on the local network, enter:
# ruptime abc up 11:15, 4 users, load 0.09, 0.04, 0.04 def up 7:45, 3 users, load 0.08, 0.07, 0.04 ghij up 4:43, 1 user, load 0.06, 0.12, 0.11
2. To get a status report sorted by load average, enter:
# ruptime -l abc up 11:45, 3 users, load 0.08, 0.07, 0.04 def up 5:18, 4 users, load 0.07, 0.07, 0.04 ghij up 4:43, 1 user, load 0.06, 0.12, 0.11
3. To get a status report reverse sorted by load average, enter:
# ruptime -rl ghij up 4:43, 1 user, load 0.06, 0.12, 0.11 abc up 11:45, 3 users, load 0.08, 0.07, 0.04 def up 5:18, 4 users, load 0.07, 0.07, 0.04
4. To get a status report sorted by number of users, enter:
# ruptime -l ghij up 4:43, 1 user, load 0.06, 0.12, 0.11 abc up 11:45, 3 users, load 0.08, 0.07, 0.04 def up 5:18, 4 users, load 0.07, 0.07, 0.04
Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.
- Apply for Programming Internship
- Check Linux Books
- Practice Programming MCQs
- Check Information Technology Books