Answers: <p>You can use <code>lsof</code> with the <code>-p</code> flag, like this : <code>lsof -p $PID</code> .</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-10-08T17:51:55.717Z
Answers: 2019-10-08T17:51:55.717Z
Answers: schaiba
Answers: <p>mainly you use ps for evaluating the pid of the process and use the proc filesystem to see the used files by the specific process.
  <a href="https://www.cyberciti.biz/faq/howto-linux-get-list-of-open-files/" rel="nofollow noreferrer">https://www.cyberciti.biz/faq/howto-linux-get-list-of-open-files/</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2019-10-08T17:29:59.670Z
Answers: 2019-10-08T18:12:35.463Z
Answers: 2019-10-08T18:12:35.463Z
Answers: Bayram Zengin
Body: <p>I need to analyze the file i/o operations caused due to a process. 
  So I would like to know, which all files are affected by this program. Is there a tool for this particular use case?.</p>
  
  <p>One of our debugging for a slow URL processing got the culprit being the file being read each time a URL was processed by the system. So I would like to get recommendations for a tool which would monitor the file activities per process.
  Any suggestions?</p>
  
Tags: <linux>
Title: How to analyze the file activities due to process?
UserDisplayName: Arun Mohan
ThreadText: # How to analyze the file activities due to process?
  
  (Asked by: username_0 on 2019-10-08)
  
  I need to analyze the file i/o operations caused due to a process.
  So I would like to know, which all files are affected by this program. Is there a tool for this particular use case?.
  
  One of our debugging for a slow URL processing got the culprit being the file being read each time a URL was processed by the system. So I would like to get recommendations for a tool which would monitor the file activities per process.
  Any suggestions?
  
  **Tags:** linux
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-10-08. Score: 1
  
  You can use `lsof` with the `-p` flag, like this : `lsof -p $PID` .
  
  
  ---
  
  ### Answer by username_2 on 2019-10-08. Score: 0
  
  mainly you use ps for evaluating the pid of the process and use the proc filesystem to see the used files by the specific process.
  <https://www.cyberciti.biz/faq/howto-linux-get-list-of-open-files/>
  
  
  ---
  
  