Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a process of I would like to monitor the i/o with some precision. I know the PID, but I can't really control the way it is started (so I can't really put a pv-like command in between). What I would like to get is this list (or something that can be parsed as it):

filename bytes_read bytes_write

bla.dat 332244 342344223

bli.dat 22222 20498377

(...)

What I found out is that I can get the file handles and the total number of read/written bytes from the /rpoc folder (/proc/1234/fd/ and /proc/1234/io respectively) so the only thing I would need is the coupling of the file descriptor to the amount of data written/read from/to that file.

Is there a way to get this?

share|improve this question
    
Consider iotop for per-process IO. It has an accumulating mode, and a batch mode, so it's flexible for interactive use and logging. I do not believe it will break down IO per file being accessed by a process, however. –  Chris Betti Oct 3 '13 at 19:45
    
I'll def try iotop anyway. I have seen many people being enthousiastic about it. –  Hazkan Oct 4 '13 at 7:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.