On Mon, Jul 11, 2011 at 12:43 PM, Jonathan Abbey <jonabbey@arlut.utexas.edu> wrote:

That's a good idea, but there's nothing in iftop to do that now.

I know it's possible on Linux to get that information from 'netstat
-ap', and presumably iftop could be modified to get the relevant
information from the same source that netstat gets it, but it would
take a bit of doing.

Especially because iftop is portable across several operating systems.
Presumably each of those operating system families would need their
own code written to get that information.

Still, a good idea.  It would make a lovely patch to iftop.

 Jon



If you're a KDE user, there is an iftop-like Plasma widget called Socket Sentry that does this. Full disclosure: I'm the developer. There is also a DBUS interface.

Getting the application name is tricky but possible by correlating several separate data sets in the "/proc" filesystem. That's what netstat and Socket Sentry both do. One thing that makes it tricky is that sockets can be shared among processes.

Link if you're interested: https://code.google.com/p/socket-sentry/