3 ms·
Can I find out what files a process is using, and what files are most used at the moment? It would help debug heavy load moments, when the disk becomes less res
by visarga 14y ago
Can I find out what files a process is using, and what files are most used at the moment? It would help debug heavy load moments, when the disk becomes less responsive.
- gnosis 14y agoTo find out what files a given process is using: lsof -p PID where "PID" is the process id of the process in question. As for which files are most used at the moment, I'm not sure. However, "iotop" will show you which processes are using the most io at the moment.
- chrisbolt 14y agoMost used files: lsof -n | grep REG | awk '{print $9}' | sort | uniq -c | sort -n