The linux uptime command is used to obtain the host running time and query the linux system load. In the past, the uptime command only showed how long the system was running. Now, we can display how long the system has been running. The information is displayed in sequence as follows: current time, how long the system has been running, how many login users are there, and the average load of the system in the past 1 minute, 5 minutes, and 15 minutes.
BKJIA recommended for editing: Linux monitoring tools
The uptime command is easy to use: directly enter
# Uptime
You can.
Input example:
18:02:41 up 41 days, 1 user, load average: 0.00, 0.00, 0.00
1 can be considered as the optimal load value. The load changes with the system. Single CPU Systems 1-3 and SMP systems 6-10 are acceptable.
Another parameter-V is used to query the version. (Note the uppercase letter v)
[Linux @ localhost] $ uptime-V
Procps version 3.2.7
[Linux @ localhost] $ uptime
The result is as follows:
10:19:04 up 257 days, 12 users, load average: 2.10, 2.10, 2.09
Description:
10:19:04 // current system time
Up 257 days, // the host has run time. The larger the time, the more stable your machine is.
12 user // number of user connections, which is the total number of connections rather than the number of users
Load average // average system load, which counts the average system load for the last 1, 5, and 15 minutes
So what is the average system load? The average system load refers to the average number of processes in the queue running at a specific time interval.
If the number of active processes per CPU core is not greater than 3, the system performance is good. If the number of tasks in each CPU kernel is greater than 5, the performance of this machine is seriously affected.
If your linux host is a dual-core CPU, when the Load Average is 6, it indicates that the host has been fully used.
Author: open-source O & M Research Office"