When I first started doing performance tests, I didn't know anything, just the pressure test. When will the system be paralyzed when it ends. But the system because of what paralysis is not very clear, and then began to study server performance monitoring, applied to the work, improve a lot of productivity, the following will be my usual commands or tools to share to everyone.
monitoring Linux Server CPUs
Top
Parameter introduction
- top-10:38:29[current system time],
- 194 days[System has been running for 194 days],
- 1 user[users currently logged in],
- Load average:0.07, 0.03, 0.01[system load, which is the average length of the task queue]
- tasks:152 total[total number of processes],
- 1 running[number of processes running],
- 151 sleeping[The number of sleep processes],
- 0 stopped[number of processes stopped),
- 0 zombie[number of frozen processes],
- %CPU (s): 0.3 us[User space occupied Cpu percentage],
- 0.2 sy[CPU% of kernel space],
- 0.0 ni[CPU Percentage of processes that have changed priority within the user process space],
- 99.5 id[Idle CPU percentage],
- 0.0 wa[Wait for the input output CPU time percentage],
- 0.0 hi[hardware IRQ----hardware interrupt],
- 0.0th[steal time----live],
- mem:8175352total[Total physical Memory],
- Total amount of physical memory used by 7533128used[],
- 642224 free[total free memory],
- 282572 buffers[as the amount of memory for the kernel cache]
- swap:0 total[swap Area total],
- 0 Total swap area used by used[],
- 0 free[Total free swap area],
- 818568 cached[buffer swap area Total]
Htop
Htop can be seen as the enhanced version of top. At a glance, do not introduce too much, 1 2 is because the server is a dual-core CPU
Nmon
The 22nd article has been introduced click Nmon
PerfMon Metrics Collector
The 17th article has been introduced, click on PerfMon Metrics Collector
Vmstat
Mpstat
18, Linux command to monitor the server CPU