In the Linux system to query the system CPU and memory load (usage), we usually used to use top, atop or PS, this article will show you how to use the W command and uptime command to see the load situation of the system, for the uptime command, I believe you are more familiar with, It is primarily used to query how long the system has been running since the last boot, while the W command is relatively unpopular, and the following details how to use the two commands:1. W Command
[[Email protected] ~] # W min, 2 users, load average:0.00, 0.01, 0.00USER TTY from [email protected] IDLE jcpu PCPU whatroot pts/ 0 18.104.22.168 13:38 1:01m 0.00s 0.00s-bashroot pts/1 22.214.171.124 14:43 0.00s 0.00s 0.00s W
Unlike who, Linux, which uses the man W query, describes the command as "Show who's logged on and what they be doing.", the W command queries the user information that is logged in to the current system and what these users are doing, This information is valuable to Linux system administrators, and the three numbers behind the load average show the system's average load over the last 1 minutes, 5 minutes, and 15 minutes.2. Uptime command
[[Email protected] ~] # Uptime min, 2 users, load average:0.02, 0.01, 0.00
The load average in the uptime command echo is similar to the W command, representing the average number of processes in the process queue for the past 1 minutes, 5 minutes, and 15 minutes.
It is important to note that the load average this output value, the size of these three values can not be larger than the number of logical CPUs, for example, the system has 4 logical CPUs in this output, if the load average three values longer than 4 o'clock, indicating that the CPU is busy, high load, May affect system performance, but occasionally greater than 4 o'clock, do not worry, generally does not affect system performance. Conversely, if the output value of the load average is less than the number of CPUs, it means that the CPU is idle, such as the output in this example, the CPU is relatively idle.
This article permanently updates the link address : http://www.linuxidc.com/Linux/2014-12/110130.htm
Use the W command and the uptime command to view the system load under Linux