[ blackfox@localhost ~]$vmstat 2 3 # Print 3 times every 2s
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 244824 932 497892 0 0 0 0 3 9 0 0 100 0 0
0 0 0 244824 932 497892 0 0 0 0 38 91 0 1 99 0 0
0 0 0 244824 932 497892 0 0 0 0 40 90 0 1 99 0 0
#Sar - P 0 3 5 # Make statistics on the first CPU
[ blackfox@localhost ~]$sar - u 3 5 # Display CPU utilization every 3s for 5 times
Linux 3.10.0-327.el7.x86_64 (localhost.localdomain) 01/22/2017 _x86_64_ (1 CPU)
07:35:52 AM CPU %user %nice %system %iowait %steal %idle
07:35:55 AM all 0.00 0.00 0.00 0.00 0.00 100.00
07:35:58 AM all 0.00 0.00 0.34 0.00 0.00 99.66
07:36:01 AM all 0.34 0.00 0.34 0.00 0.00 99.32
07:36:04 AM all 0.00 0.00 0.34 0.00 0.00 99.66
07:36:07 AM all 0.34 0.00 0.00 0.00 0.00 99.66
Average: all 0.14 0.00 0.20 0.00 0.00 99.66
[ blackfox@localhost ~]$ iostat -c
Linux 3.10.0-327.el7.x86_64 (localhost.localdomain) 01/22/2017 _x86_64_ (1 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
0.13 0.00 0.23 0.01 0.00 99.63
[ blackfox@localhost ~]$ uptime
07:54:27 up 17 days, 16:56, 1 user, load average: 0.00, 0.02, 0.05
[ blackfox@localhost ~]$free - m # - m takes MB as the unit, and continuously monitors during - s period
total used free shared buff/cache available
Mem: 977 249 240 49 487 488
Swap: 2048 0 2048
-
1. Normal svctm<await. -
2、 The svctm is close to await, which means there is almost no I/O waiting, and the performance is very good -
3、 CPU/memory combination/too many requests will increase svctm -
4. % util is close to 100%, indicating I/O full load.
[ blackfox@localhost ~]$ sar -d
Linux 3.10.0-327.el7.x86_64 (localhost.localdomain) 01/22/2017 _x86_64_ (1 CPU)
12:00:01 AM DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util
12:10:01 AM dev8-0 0.10 0.00 0.89 9.03 0.00 3.97 1.10 0.01
12:20:01 AM dev8-0 0.05 0.00 0.35 7.56 0.00 64.63 61.70 0.28
12:30:01 AM dev8-0 0.02 0.00 0.16 7.08 0.01 254.77 128.
[ blackfox@localhost ~]$ iostat -dx /dev/sda3
Linux 3.10.0-327.el7.x86_64 (localhost.localdomain) 01/22/2017 _x86_64_ (1 CPU)
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda3 0.00 0.01 0.01 0.05 0.21 0.34 17.98 0.00 41.36 30.56 42.60 7.77 0.05
Linux 3.10.0-327.el7.x86_64 (localhost.localdomain) 01/22/2017 _x86_64_ (1 CPU)
09:26:26 AM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s
09:26:28 AM eno16777736 0.00 0.00 0.00 0.00 0.00 0.00 0.00
09:26:28 AM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00
[ blackfox@localhost ~]$watch - n 3 - d free # - n Repeat execution time, - d Highlight changes
Every 3.0s: free Sun Jan 22 09:21:48 2017
total used free shared buff/cache available
Mem: 1001332 256792 245500 50948 499040 498864
Swap: 2098172 0 2098172