1. View Disks
Df-h
2. view the memory size.
Free
Free [-m | g] memory display by MB, GB
Vmstat
3. View cpu
Cat/proc/cpuinfo
Only check the number of CPUs grep "model name"/proc/cpuinfo | wc-l
4. view system memory
Cat/proc/meminfo
5. view the status of each process
Cat/proc/5346/status 5347 is pid
6. view the load
W
Uptime
7. view the overall system status
Top
Finally, some output information is explained as follows:
Load average: 0.09, 0.05, 0.01
The three numbers represent the average system load (one minute, five minutes, and fifteen minutes) in different time periods. The smaller the number, the better. "How many cores is the load" rule: in multi-core processing, the average value of your system should not be higher than the total number of processor cores.
The memory used by the process can be top, with three columns virt res shr, indicating the memory used by the process. VIRT indicates the total memory size that can be used by the process, including the memory actually used by the process, the mapped files, and the memory shared with other processes. RES indicates the memory occupied by the process. SHR identifies the memory and library size that can be shared with other processes.
8. Performance monitoring sar command
The sar-u output shows CPU information. -U option is the default option of sar. This output shows CPU usage in percentage
CPU
CPU ID
% User
Duration of running a process in user mode
% Nice
Time taken to run a normal process
% System
Duration of running a process in kernel mode (system)
% Iowait
When no process is executed on this CPU, the time the processor waits for I/O to complete
% Idle
No process execution time on this CPU
Sar 5 10 sar obtains 10 samples at intervals of 5 seconds
Sar-u-p ALL 5 5 minute cup display
Sar-n {DEV | EDEV | NFS | NFSD | SOCK | ALL}
Sar provides six different syntax options to display network information. The-n option uses six different switches: DEV | EDEV | NFS | NFSD | SOCK | ALL. DEV displays network interface information, EDEV displays statistics on network errors, NFS statistics on active NFS clients, NFSD statistics on NFS servers, and SOCK displays socket information, ALL shows ALL 5 switches. They can be used independently or together.
Meaning of parameters of sar-n DEV
IFACE
LAN interface
Rxpck/s
Packets received per second
Txpck/s
Packets sent per second
Rxbyt/s
Number of bytes received per second
Txbyt/s
Number of bytes sent per second
Rxcmp/s
Compressed data packets received per second
Txcmp/s
Compressed data packets sent per second
Rxmcst/s
Multicast data packets received per second
9. view the command history (including timestamp)
Export HISTTIMEFORMAT = '% F % T'; history | more
10. view the folder and file size.
Du-h -- max-depth = 0 dm view dm directory size
Du-h -- max-depth = 1 dm view the dm directory size and the size of each dm file folder
Du-h -- max-depth = 0 view the current folder size
Author Alan Liu