
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?