How to tell what applications are accessing the hard drive and how frequently?
My hard drive is going crazy and I don't know what application is doing it.
Are there any linux tools for profiling what processes are accessing drives and how frequently?
top, htop and the like neatly sort out the memory and cpu hogs, and nethogs lets me see the network hogs... but what to use for determining HDD hogs?
you can install iotop
One possibility is using inotify (package is inotify-tools
) .
Here's an article on Monitoring file system activity with inotify .
Also see Find which files are read or written to .
The new utility fatrace can show you exactly! See: https://launchpad.net/fatrace/ or run 'sudo apt-get install fatrace'. Then run it:
# sudo fatrace
chrome(6514): W /home/xxxx/.config/google-chrome/Default/Current Session
chrome(6516): R /home/xxxx/.pki/nssdb/cert9.db
chrome(6514): RW /home/xxxx/.cache/google-chrome/Default/Cache/data_0
chrome(6516): R /home/xxxx/.pki/nssdb/cert9.db
chrome(6514): W /home/xxxx/.cache/google-chrome/Default/Cache/data_1
chrome(6516): W /home/xxxx/.cache/google-chrome/Default/Cache/data_1
wicd(29613): RO /lib/x86_64-linux-gnu/ld-2.19.so
ifconfig(29613): R /lib/x86_64-linux-gnu/ld-2.19.so
ifconfig(29613): CO /etc/ld.so.cache
The advantage of fatrace is that you get the filename, unlike iotop. For multi process applications like chrome, you get all the processes in one place.