1. Check resource usage
[1] You can use the top command to view the usage of cpu and memory. The task manager similar to windows
refreshes every 5 seconds by default
. Syntax: top
Ctrl + c to exit
2. Disk information monitoring
[1] Use the df command to view the disk information usage
Syntax:df [ -h ]
-
Display in a more user-friendly unit
[2] Use iostat to view cpu and disk related information
Syntax:iostat [ -x ] num1 num2
-
Options: -x show more information
-
num1: number, refresh interval, num2, number, refresh several times
3. Network status monitoring
You can use the sar command to view the relevant statistics of the network (the sar command is very complicated, and it is only used for statistical network here)
Syntax:sar -n DEV num1 num2
- Options: -n to view the network, dev means to view the network interface
- num1 Refresh interval (if you don't fill it, you can check it once), num2, the number of times you want to check it (if you don't fill it, it will be countless times)