Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Using tools like iotop one can monitor the i/o of individual processes which is fine, but you do not find out which directory a process writes into. If the PID would always be the same that would not be a problem, one could strace or something else to find out which files are affected, or possibly

lsof +p <PID>  

But I noticed chromium does some heavy disk writes when I open a video, despite the fact that I already put many directories associated with chromium on a tmpfs. Now I would like to find out which directories it writes to in the instant iotop shows the high i/o usage. Chromium does change the PID all the time, which makes this even more complex.

share|improve this question
    
What about running strace chromium? Not sure if that will include the sub-processes launched for the tabs but it might help. –  terdon Apr 19 at 13:24

1 Answer 1

We may use pidof to determine the PID(s) of an application for iotop Install iotop

sudo iotop -p $(pidof chromium-browser | sed -r 's/[ ]+/ -p /g')

For any other command needing a different separator of the PID list replace the separator in the sed command, e.g.

top -p $(pidof chromium-browser | sed -r 's/[ ]+/,/g')
sudo lsof -p $(pidof chromium-browser | sed -r 's/[ ]+/,/g')
share|improve this answer
    
pidof chromium-browser is empty :-(, despite chromium-browser running. In iotop chromium command looks like this: chromium-browser --ppapi-flash-path=~82, --enable-pinch –  GEO Apr 19 at 16:28
    
What release version are you? IIRC Chromium processes may now have different names dependent on roles. See ps aux | grep chromium. –  Takkat Apr 19 at 17:38

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.