I'm looking for a tool which will list open files sorted by amount of activity in the file. So lsof does not do the job (unless I'm overlooking a way to use lsof). Ideally, the tool should work like top, and one should be able to switch between specific activity for sorting: reads, writes, bytes, seeks per second. Preferably, it should be readily available in RHEL/CentOS/EPEL.

Does such a tool exist?

  • 2
    You could have a look at filetop from bcc-tools, which is only available with 7.6 RHEL release and clones. I think it does not provide exactly the features you are looking for. This RHEL arcticle might also be interesting. – Thomas Jun 29 '19 at 14:15
  • An other tool, which would not answer the question but can still help is iotop: I/O per process. Good enough to immediately put on the top a find command running on a huge tree – A.B Jun 29 '19 at 16:29
  • I would like to suggest atop, which is usually readily available in software repositories. It is a top-like tool that can show disk utilization per process/thread, see atoptool.nl. It doesn't show per-file utilization AFAIK though. – Edward Jun 30 '19 at 5:23
  • Thomas: bcc-tools' filetop does exactly what I need, thanks. However, in CentOS 7.6, I need to patch it to handle a bug: github.com/iovisor/bcc/issues/2119 It looks like RHEL/CentOS 7.7 will have that fixed. – Troels Arvin Jul 6 '19 at 11:00

Sysdig is probably what you want, it's programmable in case it isn't. The topfiles_bytes "chisel" (sysdig script) lists the most I/O-ed files.

  • Interesting. However, adding kernel modules is possible in the environment where I would like to use this. – Troels Arvin Jul 6 '19 at 10:58
  • Ok, I am pretty sure that such a tool does not exist. Lsof just looks at a snapshot of the open files, there is no readily available metric for file i/o. Kernel extensions are the only way. – w00t Jul 7 '19 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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