先停掉syslog
service syslog stop
打开block dump:
echo 1 > /proc/sys/vm/block_dump
多次运行,查看结果
dmesg | egrep "READ|WRITE|dirtied" | egrep -o '([a-zA-Z]*)' | sort | uniq -c | sort -rn | head
排前的比较占用io
抓完后关掉block_dump和启动syslog:
echo 0 > /proc/sys/vm/block_dump
service syslog start
我的一台负荷较重的服务器,iowait经常在10%以上,因此这样查看了下,多次运行显示:
1283 kjournald
1059 httpd
190 pdflush
-------------------------------------
1267 kjournald
1228 httpd
2 pdflush
-------------------------------------
1506 pdflush
661 kjournald
423 httpd
11 sh
6 nrpe
6 bash
3 check
2 egrep
-------------------------------------
1247 kjournald
1187 httpd
6 egrep
-------------------------------------
1288 httpd
1148 kjournald
6 egrep
-------------------------------------
1242 kjournald
1120 httpd
57 php
30 crond
8 bash
6 egrep
-------------------------------------
看来kjournald是罪魁祸首?httpd也蛮高的,需要优化。