Linux Processes – Find Out What Is Writing to Hard Drive

iolinuxprocess

On my Lenovo T400 and Ubuntu, the light for hard drive writing keeps flashing. I was wondering if in Linux it is possible to find out what processes are doing I/O to the hard drive? Just like by top, you can find out what processes are using most CPU and memory.

Best Answer

Iotop is a good tool for what you want. It also allows one to display the accumulated amount of I/O on any of the DISK READ, DISK WRITE, SWAPIN, and IO (overall percentage). This is through a nifty interface:

  • You just press a on the keyboard, and it will sort the hungriest processes on top.
  • Reversing the order, you just press r.
  • If you want to sort by other colums, you just press the left/right key.

Like top, the presentation is rather busy. Another thing is that it doesn't have the myriad options that top has (e.g. I can't chose to hide any of the columns I'm uninterested in), but the tool is more than good enough for its specific purpose.

Related Question