20

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/'.

3
  • 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, 2009 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. Jun 23, 2009 at 19:19
  • 1
    there's also atop, which displays per-process live and historical data interactively.
    – Tobu
    Jun 14, 2010 at 6:00

3 Answers 3

21

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.

0
35

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.

4
  • 2
    why HTOP would not add this as default? :S
    – confiq
    Aug 11, 2015 at 11:18
  • 2
    It appears to require privileged access to report on other processes (much like iotop) - possibly why its not default too... Aug 13, 2017 at 7:58
  • 1
    @PaulRidgway your comment helped me. Regular htop was displaying RBYTES and WBYTES as N/A. Using sudo htop worked though.
    – jchavannes
    Nov 30, 2022 at 20:47
  • this is a default option in Manjaro linux distribution
    – Jay
    Aug 26, 2023 at 7:39
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .