iostat and disk I/O operations

Jul 09, 2007 1 Replies

Hello group!



With the iostat command I can determine what is the average I/O transfer to the disk or partition. This works fine. But the question is which processes are causing those I/O transfers to/from the disk? Our embedded system is configured without swap and we are experiencing unexplainable writing to the disk. As there are about 250+ application processes developed by the 30+ developers running in the system it is not easy to identify the problematic one. Is there a simple command that will show us which processes are writing/reading to/from disk and causing I/O traffic shown by the iostat? I don't know if lsof is of any use in this case - if it is usable - how to use it?



Writing to log files on /var/log is not causing this I/O traffic.



Regards,



Sani


You can use the pidstat(1) command, which belongs to the sysstat package (the same package containing iostat). You need:

1) a recent version of sysstat (7.1.5 or later) 2) a recent version of the kernel (2.6.20 or later) with the option CONFIG_TASK_IO_ACCOUNTING compiled in. Then you can try something like: $ pidstat -d Read the manual page to learn some more about this command.

Regards, Sebastien.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required