We can use iopp tool to monitor process io performance
download from github : https://github.com/markwkm/iopp
pid: The process id. rchar: The number of bytes which this task has caused to be read from storage. wchar: The number of bytes which this task has caused, or shall cause to be written to disk. syscr: Count of the number of read I/O operations. syscw: Count of the number of write I/O operations. rbytes rkb rmb reads: Count of the number of bytes which this process really did cause to be fetched from the storage layer. wbytes wkb wmb writes: Count of the number of bytes which this process really did cause to be sent to the storage layer. cwbytes cwkb cwmb cwrites: The number of bytes which this process caused to not happen, by truncating pagecache. command: Filename of the executable.
There is one small bug , you’ll get different output from -i -k than you will from -i or from -i -m.
#iopp -i -k 2
#grep ^ /sys/class/block/*/dev |grep 224
#lsof |grep “8,224” |more
bash 5265 root cwd DIR 8,224 57151488 427819009 /data/yp900 redis-ser 19843 root cwd DIR 8,224 4096 469368833 /data/redis6379 sh 27579 root cwd DIR 8,224 4096 579731457 /data/mysql3306 mysqld 28324 mysql cwd DIR 8,224 4096 579731459 /data/mysql3306/data mysqld 28324 mysql 1w REG 8,224 1327901 579743077 /data/mysql3306/mysql-error.log mysqld 28324 mysql 2w REG 8,224 1327901 579743077 /data/mysql3306/mysql-error.log mysqld 28324 mysql 3u REG 8,224 23520 579743078 /data/mysql3306/binlog/mysql-bin.index mysqld 28324 mysql 4uW REG 8,224 1073741824 579743083 /data/mysql3306/data/ibdata0 mysqld 28324 mysql 5u REG 8,224 0 579731461 /data/mysql3306/mysql-tmpdir/ib1io6G9 (deleted) mysqld 28324 mysql 6u REG 8,224 0 579731462 /data/mysql3306/mysql-tmpdir/ibnkifvg (deleted) mysqld 28324 mysql 7u REG 8,224 0 579731463 /data/mysql3306/mysql-tmpdir/ibHWjojn (deleted) mysqld 28324 mysql 8u REG 8,224 0 579731464 /data/mysql3306/mysql-tmpdir/ib1o8yHC (deleted) mysqld 28324 mysql 9uW REG 8,224 1073741824 579743084 /data/mysql3306/data/ibdata1 mysqld 28324 mysql 10uW REG 8,224 1073741824 579743085 /data/mysql3306/data/ibdata2 mysqld 28324 mysql 11uW REG 8,224 27850178560 579743086 /data/mysql3306/data/ibdata3 mysqld 28324 mysql 12uW REG 8,224 536870912 579743087 /data/mysql3306/data/ib_logfile0 mysqld 28324 mysql 13uW REG 8,224 536870912 579743088 /data/mysql3306/data/ib_logfile1 mysqld 28324 mysql 14uW REG 8,224 2281701376 579733990 /data/mysql3306/data/mit/agent_info#P#p20150404.ibd mysqld 28324 mysql 15u REG 8,224 0 579731465 /data/mysql3306/mysql-tmpdir/ibBZSSPL (deleted)
A nice smart tools with a little bugs 🙂