Posts Tagged ‘statistics’
How to find per-process I/O statistics on Linux
Written by bixuan on 2009年08月24号 – 10:46感谢joe的分享,看到有位大牛做个针对进程统计IO情况的小工具,挺有意思。
- 首先下载小工具:
wget http://maatkit.googlecode.com/svn/trunk/util/iodump
这个工具是perl写的。 - 调整内核参数,打开kernel IO消息:
echo 1 > /proc/sys/vm/block_dump - 直接执行如下脚本就可以看到结果了:
while true; do sleep 1; dmesg -c; done | perl iodump
注意稍等片刻按:ctrl+C退出,就可以看到结果了。
不过,压力大的话还是少玩,可能占用的资源比较多。
原文见:http://www.xaprb.com/blog/2009/08/23/how-to-find-per-process-io-statistics-on-linux/
Tags: dmesg, IO, iodump, kernel, linux, statistics
Posted in 运维小技巧 | 1 Comment »
Page 1 of 1 1