天天看点

centos 查看每天应用程序的iowait

<code># /etc/init.d/syslog stop # echo 1 &gt; /proc/sys/vm/block_dump # dmesg | egrep "READ|WRITE|dirtied" | egrep -o '([a-zA-Z]*)' | sort | uniq -c | sort -rn | head 1526 mysqld 819 httpd 429 kjournald 35 qmail 27 in 7 imapd 6 irqbalance 5 pop 4 pdflush 3 spamc</code>

In my specific situation, it looks like MySQL is the biggest abuser of my disk, followed by Apache and the filesystem journaling. As expected, qmail is a large contender, too.

Don’t forget to set things back to their normal state when you’re done!

<code># echo 0 &gt; /proc/sys/vm/block_dump # /etc/init.d/syslog start</code>

本文转自守住每一天51CTO博客,原文链接:http://blog.51cto.com/liuyu/278275,如需转载请自行联系原作者