Is there a top-like command that shows the network bandwidths and file accesses of running processes

Try iftop for network and pidstat from sysstat.

Both are probably an easy install (apt-get, etc) for the distribution of your choice.


atop goes some way to giving you what you want, although it wouldn't be as specific as breaking down I/O by filehandle. To get full networking statistics you have to apply a kernel patch.


As far as I know, no. What you're trying to accomplish is possible combining multiple commands as you're currently doing, though I don't know of other apps that would provide you data easier to parse (ed: another answer suggested iftop which I did not know added a pipe-able single line text output mode). With some clever shell scripting, piped data, and a bit of manual formatting, you could get at least close to the output you're looking for.

Your search for something that shows both network and file statistics - which would be provided by two different parts of the operating system - seems to be up against some tenants of 'The UNIX Philosophy:'

  • Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new features.
  • Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information.

This is particularly evident in programs that output text, like lsof. You don't usually see *NIX console programs providing a user interface as much as data to be piped into another program, or possibly a script utilizing shell commands like cut to create their own specifically tailored outputs.

Doug McIlroy summarized his earlier statement years later:

Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.

While it may not help you get the formatted output you're looking for, The Art of UNIX Programming is a good read, and where I found sources for those quotes.