In the Linux system to query the system CPU and memory load (usage), we are usually accustomed to using top, atop or PS, this article will show you how to use the W command and uptime command to view the load of the system, for the uptime command, I believe that we are more familiar with the It is mainly used to query how long the system has been running since the most recent startup, while the W command is relatively unpopular, the following is a detailed description of how to use the two commands: 1. W Command
[ROOT@LINUXIDC ~]# W
14:44:27 up to 3 min, 2 users, load average:0.00, 0.01, 0.00
USER TTY from login@ IDLE Jcpu pcpu WHAT
root pts/0 218.18.74.196 13:38 1:01m 0.00s 0.00s-bash
root pts/1 218.18.74.196 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 are doing.", the W command queries the user information for the current system, and what these users are currently doing, This information is valuable to Linux system administrators, and the three digits following the load average show the system average load for the last 1 minutes, 5 minutes, and 15 minutes. 2. Uptime Command
[ROOT@LINUXIDC ~]# uptime
14:51:15 up, Min, 2 users, load average:0.02, 0.01, 0.00
The load average in the uptime command echo represents the same meaning as the W command, representing the average number of processes in the process queue in the past 1 minutes, 5 minutes, and 15 minutes.
Note Here is the load average this output value, the size of these three values generally can not be greater than the number of system logic CPU, for example, the system has 4 logical CPU, if the load average three values longer than 4 o'clock, indicating that the CPU is very busy, high load, May affect system performance, but occasionally greater than 4 o'clock, do not worry, generally do not affect system performance. Conversely, if the output value of the load average is less than the number of CPUs, the CPU is idle, such as the output in this example, and the CPU is more idle.
This article permanently updates the link address: http://www.linuxidc.com/Linux/2014-12/110130.htm