Middleware, which integrates several detection system tools, is quite good.
1. Installation Process: # tar zxvf sysstat-9.0.4.tar # cd sysstat-9.0.4 #./configure -- prefix =/usr/local/tools
# Make & make install
2. Check process:
I first used the built-in system tool vmstat for Server Detection:
# Vmstat
Procs ----------- memory ---------- --- swap -- ----- io -----system -- ----- cpu ------
R B swpd free buff cache si so bi bo in cs us sy id wa st
2 0 120 249420 219056 6520512 0 0 0 1 1 1 7 0 90 3 0
It cannot be seen from this command that the problem is normal. We continue to use the tool for analysis.
# Iostat-cdDPx
Extended device statistics cpu
Device mgr/s mgw/s r/s w/s kr/s kw/s size queue wait svc_t % B us sy wt id
Sda1 0 00.00.0 1.314.80.0 0.00.0 0.0 0 7 0 3 90
Sda2 0 00.00.0 0.0 0.00.0 0.00.0 0.0 0
Sda3 0 00.00.0 111.2 266.50.0 0.00.0 0.0 0
We can find that writing data in the sda3 partition is very frequent. Compared with another slave database server, we found that this database server is significantly more frequently written than the other database server.
#/Usr/local/tools/bin/sar-u 3 5
Linux 2.6.16.60-0.21-bigsmp (linux-1kio) 09/22/09_i686 _ (4 CPU)
17:36:03 CPU % user % nice % system % iowait % steal % idle
17: 36: 06all 25.04 0.00 0.25 2.66 0.00
17: 36: 09all 23.25 0.00 0.17 1.75 0.00
17: 36: 12all 23.48 0.00 0.00 2.25 0.00
17: 36: 15all 23.58 0.00 0.08 1.92 0.00
17: 36: 18all 23.52 0.00 0.00 2.25 0.00
Average: all 23.78 0.00 0.10 2.17 0.00
From the above data, we found that the iowait data is also somewhat high, and iowait is the percentage of cpu time occupied by io wait.
#/Usr/local/tools/bin/sar-d 3 5
DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm % util
Dev8-0 23.59 0.00 621.93 26.37 0.21 8.79 8.34 19.67
DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm % util
Dev8-0 14.000.00 197.3314.10 0.14 9.71 8.76
DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm % util
Dev8-0 21.670.00253.33 11.69 0.11 4.49 4.86
The normal status of svctm should be smaller than that of await. From the above data, we can see that sometimes all of them have exceeded, or it is almost approaching. This indicates that the disk reads and writes frequently, resulting in IO being abnormal.
The above are some detection methods for disk I/O and disk read/write speed. We hope this will help you.