Does anyone have experience with a tool that can provide an indication of disk IO load by filesystem path.

I use to 'iostat' utility, frequently, to learn how much disk activity is taking place on a Linux host. 'iostat' provides a per-device breakdown, so you can see activity on a particular block device. But it doesn't go any deeper than that--you can't, for instance, query the write load generated by 'httpd' in the directory '/var/log/httpd/'.

  • You can't really monitor by filesystem path since by the time the kernel gets to play with the block device there's no information on where in the tree the request is for. Knowing which process is doing the damage, on the other hand, gives you someone to strace, which usually amounts to the same thing in the end. – womble Jun 12 '09 at 23:38
  • 4
    Based on these answers, I've tried both htop and iotop, and it looks like they both have the basic functionality to break down IO rates per process. Some big differences: * htop has lots of functions and measures all kinds of system statistics, whereas iotop only looks at per-process IO rates. * Using iotop for the first time is a little easier, since it's simpler. * iotop's '-o' ("only") flag hides processes not engaging in IO, which is VERY useful when troubleshooting disk hogs. I couldn't find something similar in htop. Both tools work, but I'll use iotop, for this. – Ryan B. Lynch Jun 23 '09 at 19:19
  • 1
    there's also atop, which displays per-process live and historical data interactively. – Tobu Jun 14 '10 at 6:00
up vote 18 down vote accepted

You can use iotop for that purpose.

I works like normal top, I cannot say much more. Most distributions will have it packaged, but here is its homepage. You will need a recent kernel.

  • iotop is brilliant! – Joseph Kern Jun 12 '09 at 21:19

Using htop do the following.

htop
F5 (Tree view)
F2 (Setup)
Select columns
Select RBYTES WBYTES
F10 (Done)

And there you go, per process disk I/O, in real time.

  • Outstanding answer – Dave Cheney Jun 13 '09 at 10:45
  • why HTOP would not add this as default? :S – confiq Aug 11 '15 at 11:18
  • It appears to require privileged access to report on other processes (much like iotop) - possibly why its not default too... – Paul Ridgway Aug 13 '17 at 7:58

Collectl can also show process I/O loads but since it can also monitor virtually all your other system resources you get it all in one tool. For example, you can look at the top i/o or cpu processes right now along with disk, network, etc. BUT you can also play back historic data and display the same types of data. Further, there are actually 7 different process I/O provided by the kernel. Collectl can show them all and even let you sort on them. -mark

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.