If you’ve ever wondered what is thrashing your hard drive but can’t figure out which process it is, you can use the iotop utility to help.
The iotop utility works the same as the top command that shows system process activity—just open up a terminal window and type iotop
to see a display of all processes and threads, and the amount of disk activity going on.
You can use the left and right arrow keys to change the sorting, and the R key to reverse the sort—but the really useful option is the O key, which changes the display to only show the threads with I/O activity. There’s a number of additional command-line switches that you can use, which you can read about by typing man iotop
at the terminal prompt.
Installing iotop on recent versions of Ubuntu or Debian is as simple as typing sudo apt-get install iotop
at a terminal prompt on RedHat or Centos it is yum install iotop
at the prompt—for other distributions you may have to install it manually.
Original source: Lifehacker