In this article,we will show you the uptime command how to use in linux operation system.
The uptime command 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.
Use the uptime command
The uptime command syntax is as follows:
Run the uptime command without any options:
Output a line of information about the system:
15:47:56 up 167 days, 3:45, 3 users, load average: 0.80, 0.73, 0.54
15:47:56is the current system time.
up 167 days, 3:457is the length of time the system has been up.
3 usersis the number of currently logged in users.
load average: 0.80, 0.73, 0.5are system load averages for the past 1, 5, and 15 minutes.
The load average on Linux can be a little confusing. Unlike other operating systems that shows CPU load averages, Linux is showing system load averages.
System load average measurement of the number of jobs that are currently running or waiting for disk I/O. It basically tells you how busy your system has been over the given interval.
If the load averages are 0.0, then the system is mostly idle. If the load average for the past 1 minute is higher than the 5 or 15-minute averages, then the load is increasing, otherwise, the load is decreasing.
Uptime Command Options
The uptime command accepts only a few options:
- -p, –pretty show uptime in pretty format
- -h, —help display this help and exit
- -s, —since system up since
- -V, —version output version information and exit
the output look like below:
up 1 day, 8 hours, 50 minutes
Usage: uptime [options] Options: -p, --pretty show uptime in pretty format -h, --help display this help and exit -s, --since system up since -V, --version output version information and exit For more details see uptime(1).
uptime from procps-ng 3.3.12
That’s It! In this tutorial, we have explained how to Use Linux Uptime Command. If you have any questions or thoughts to share, don’t forget to leave a comment to reach us.