linux view CPU, memory, network traffic and disk I/O

Use the vmstat command to view system resources
How to view CPU, memory usage, network traffic and disk I/O in command line mode?
Q: How to check CPU, memory usage, network traffic and disk I/O in command line mode? 
A: In the command line mode,
1. The command to view the CPU usage
"" is refreshed every 5 seconds, and there is the data of the CPU usage on the far right
$ vmstat 5 
""top Then press Shift+P, according to the process processor Sort by occupancy
$ top
  2.
Command to view memory usage""Use free command to view memory usage
$ free
""top Then press Shift+M, sort by process memory usage
$ top 
  3. View network traffic
""Can use Tools iptraf tools
$ iptraf -g
""Network traffic for a certain Interface can be obtained by comparing the RX and TX data of two time network interfaces to get
$ date; ifconfig eth1
$ date; ifconfig eth1
  4. View disk i/o
"" Use iostat to view the disk i/o status of disk /dev/sdc3, refresh every two seconds
$ iostat -d -x /dev/sdc3 2
""Use vmstat to view the information in the io part

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326992127&siteId=291194637