Use of w, vmstat, top, sar, nload commands

First, the w command:

Use of w, vmstat, top, sar, nload commands

System load:
divided into three sections: 1 minute, 5 minutes, and 15 minutes of load values ​​(how many active processes are using the CPU)
FROM: where to log in
LOGIN: login time
IDLE: idle time
Check how many CPUs the system has: cat /proc/cpuinfo

Use of w, vmstat, top, sar, nload commands

uptime command: Similar to the W command. We can just use the W command to see it

2. vmstat command (check CPU memory and other specific fortunes)

vmstat 1 means to display every 1 second
vmstat 1 5 means to display every 1 second, only 5 times
Use of w, vmstat, top, sar, nload commands

3. The top command (updated every three seconds)

tasks: The number of processes is
sorted by memory by big M, and the CPU usage by capital P is sorted
by number 1 to query the usage of the first CPU.
top -c can find the detailed path of the process;
top -bn1 lists all the processes at one time; to
kill the process, you can use the PID to kill, the format: Q +PID

Fourth, the sar command (mainly used to view the traffic of the network card)

If you don't have this command, you need to install the package: yum install -y sysstat
will filter the system status every 10 minutes and store it in the /var/log/sa directory, which contains two kinds of files: sa and sar files. sar can be viewed directly by cat, the sa file is a binary file

查看网卡的流量:sar -n DEV 1 10  每1秒更新一次,显示10次。tx 
rx 是接收到的数据包  如果是几千的话,就还正常,如果上万就可能不正常了。
tx  是发送出去的数据包

View system load: sar -q
View disk read and write: sar -b 1 5

Use of w, vmstat, top, sar, nload commands

Five, nload (monitoring network card traffic)

Before installing nload, install epel-release
and then install nload to
display a dynamic page. Press the arrow keys to switch network cards, press q to exit
Use of w, vmstat, top, sar, nload commands

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325299257&siteId=291194637