How do I find out what processes are accessing the hard disk in a GNU/Linux-based system?

48

9

I'm looking for the equivalent to top for disk access, so I can tell which process(es) are currently reading and/or writing to disk. I'm currently using Ubuntu, but I imagine there's a standard tool that's available as part of the GNU toolset.

Olivier Dagenais

Posted 2009-10-02T16:20:39.890

Reputation: 582

Answers

57

You got three-fifths of the answer right yourself - the one you want is called iotop. Search for it in the extra repositories, it should be there.

alt text

caliban

Posted 2009-10-02T16:20:39.890

Reputation: 18 979

+1 beat me to it. here's the project homepage: http://guichaz.free.fr/iotop/

– quack quixote – 2009-10-02T16:26:00.533

5There's an iotop package in the universe repository available since Ubuntu 8.10 (Intrepid Ibex), so a sudo apt-get install iotop should do it. – Olivier Dagenais – 2009-10-02T17:09:14.503

23

htop » F2 » Columns » Active Columns » IO_RATE

Then sort by this column. Also you can add IO_READ_RATE and IO_WRITE_RATE columns and sort according to them.

shandr

Posted 2009-10-02T16:20:39.890

Reputation: 231

2This worked for me on the embedded Linux in a Synology box (where installing other packages isn't really an option) – benjymous – 2016-11-09T19:35:11.003

9

iotop is the counterpart to top that watches I/O usage information. If you want detailed information on the files opened by a process, or the list of files opened in a directory, or watch over files in the whole system, use lsof.lsof is quite versatile and provides information about open tcp, udp, NFS connections too.

user4358

Posted 2009-10-02T16:20:39.890

Reputation:

5

I use atop.

Atop is an ASCII full-screen performance monitor that is capable of reporting the activity of all processes (even if processes have finished during the interval), daily logging of system and process activity for long-term analysis, highlighting overloaded system resources by using colors, etc. At regular intervals, it shows system-level activity related to the CPU, memory, swap, disks and network layers, and for every active process it shows the CPU utilization, memory growth, disk utilization, priority, username, state, and exit code.

enter image description here

supercheetah

Posted 2009-10-02T16:20:39.890

Reputation: 836