This article mainly introduces the linux performance monitoring tool. For more information, see
1. uptime
This command intuitively shows the average load of the server in the past 15 minutes, 5 minutes, and 1 minute
2.Vmstat
Output vmstat information every 2 seconds, 10 times in total.
Category |
Procs |
Swap |
Io |
System |
Cpu |
|
R: Number of running processes |
Si: swap-in memory capacity |
Bi: Number of read blocks |
In: Number of interrupts |
Us: User |
|
B: number of blocked processes |
So: swap out memory capacity |
Bo: number of written blocks |
Cs: Number of context switches |
Sy: System |
|
|
|
|
|
Id: Idle |
|
|
|
|
|
Wa: cpu waiting for io completion |
3. iostat
Iostat information is output every 2 seconds, three times in total
Tps |
Blk_read/s |
Blk_wrtn/s |
Blk_read |
Blk_wrtn |
Number of I/O requests sent to the disk |
Number of blocks read per second |
Number of blocks written per second |
Total number of read blocks |
Total number of blocks written |
Note: this command contains cpu information and disk IO information. here we will briefly introduce several disk IO parameters. Note that blk_read and blk_wrtn are the total number of historical statistics, followed by the number of changes per second.
4. top
Top-d 10 views information every 10 seconds.
Contains load information, system running time information, cpu information, process information, and so on.
5. free-m
===== Mem row ======
Total: total memory,
Used: indicates the total number of resources allocated to the cache (including buffers and cache). However, some of these caches are not actually used.
Free: unallocated memory
Buffers: Number of buffers allocated by the system but not used
Cached: number of cache allocated by the system but not used
===== Buffers/cache row ====
Used: used-buffers-cached in the Mem row, total memory used
Free: The sum of unused buffers, cache, and unallocated memory. this is the actual available memory of the system.
6. sar
The sar command can be used to view the real-time running status of each hardware on the server. Because the meanings of the displayed parameters are similar to those of other commands, we will not detail them here.
Parameters.
(1) sar-d displays real-time disk information
(2) sar-B view the I/O and transfer rate statistics
(3) real-time cpu information displayed in sar-u
(4) view average loads in sar-q
(5) view memory usage in sar-r
(6) sar-n DEV: View network card traffic
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 packet received per second