Performance monitoring of Linux system
One: monitor CPU usage
Uptime can show how long the system has been running, showing the load of the last minute, five minutes and fifteen minutes, respectively.
Second: monitor the use of memory and swap partitions
Free
Three: monitor disk usage
Df
-h displays the maximum unit capacity information
-I display disk inode usage information
-T displays the file system type
Fourth, monitor network usage.
Netstat
-s displays various protocol data statistics-n uses digital IP, port number User ID-p displays the process name and the corresponding process ID number-I only displays the sockets interface information that is being monitored-u view UDP connection information-t view TCP connection information tips, commonly used netstat-tunlp
V: monitor process usage, PS and TOP
Ps-aux
UID executes user PID process unique number PPID parent process% CPU% MEM% VSZ process uses virtual memory size TTY STIME START STAT process state (D, uninterruptible, R, running, S, sleeping process, T, stopped or tracked process, X, dead process, Z, zombie process) Total time of CPU occupied by TIME process COMMAND process command
TOP dynamically view process information-d refresh interval defaults to 3s-p specifies the process information of PID