My Common Lisp and Debian blog. For more off topic rants and stuff please see my livejournal blog.

Thursday, March 22, 2007

what $$%@$ is causing all this io?

sudo su -
sharrow:~# /etc/init.d/sysklogd stop
Stopping system log daemon....
sharrow:~# echo 1 > /proc/sys/vm/block_dump
sharrow:~# dmesg | gawk '/^[^( ]*\([0-9]*\): (READ|WRITE|dirtied)/ {activity[$1]++} END {for (x in activity) print activity[x],x}' | sort -nr | head -n 10
502 amarokcollectio(358):
3 amarokapp(359):
2 mysqld(18448):
1 io(358):
1 bash(31560):
sharrow:~# echo 0 > /proc/sys/vm/block_dump
sharrow:~# /etc/init.d/sysklogd start
Starting system log daemon....

3 comments:

Anonymous said...

I had to change this to:

dmesg |
gawk '/(READ|WRITE|dirtied)/ {activity[$2]++} END {for (x in activity) print activity[x],x}'|
sort -nr |
head -n 10

since our dmesg output includes ktime timestamps.

Anonymous said...

Nice tipp, thanks. The pedant in me wants to tell you about sudo -i, though. ;-)

Anonymous said...
This comment has been removed by a blog administrator.