Which app is using bandwidth

Asked by Mark Howard

When I'm using a voip system and find that the quality degrades due to limited bandwidth, how can I find out which other applications are using bandwidth at the specific time.
At the moment, I just use iptraf. This is not ideal though, since:
1) It shows cumulative counts, rather than current counts (e.g. all traffic in the last 5 seconds)
2) It only shows ip and port, not the application name. This is quite important for me, since I often have a lot of applications using a tunnelled ssh connection. There are many applications which could be using one particular ip and port at any time.

Are there any bandwidth monitoring tools that can show the application name?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nethogs Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Brewster Malevich (brews) said :
#1

You can monitor active connections through Firestarter. 'System Monitor' might have something as well.

Revision history for this message
Mark Howard (mh-tildemh) said :
#2

Thanks for the response. Firestarter is a good start - it shows which application is using each connection. Unfortunately it doesn't rank the connections though, so I can't see which application is hogging the connection. For example, it's usually fine for xchat to have connections open, since it isn't generally using much bandwidth; if it misbehaves and uses lots of bandwidth, then I want an application to tell me. What I want to know is which application is using the most bandwidth at a particular time (e.g. within the last 5 mins).

Revision history for this message
Harvey Muller (hlmuller) said :
#3

Mark,

I piggy backed (subscribed) because I am also interested in this. My research shows most network bandwidth monitoring applications seem to be more focused on providing service port information as opposed to applications or process IDs.

Two of the more promising applications I looked at were ntop and pktstat.

I did stumble on what I believe we are both looking for though, an application called atop. The homepage is here:

    http://www.atcomputing.nl/Tools/atop

The only possible issue is it requires kernel patching. But given that it will then allow monitoring of both disk and network i/o per process, it may well be worth the extra maintenance required. I'm going to test the application again later this weekend, with the kernel patch(es) applied.

Please let me know if this solves your question, or if you require further information.

Thanks,

Harvey

Revision history for this message
Harvey Muller (hlmuller) said :
#4

Hi Mark,

I'm just checking to see if the information I provided earlier Solved your question.

Thanks,

Harvey

Revision history for this message
Mark Howard (mh-tildemh) said :
#5

Harvey,

I've just tried the stock atop from ubuntu and it is very impressive. Unfortunately, it requires a kernel patch to get the network stats to show up which I'm not willing to do (not enough time to track security upgrades). Despite the comments on the web page, I didn't need to patch the kernel for the disk usage to work (presuably ubuntu already do this).
To see disk usage:
run atop from the command line, press d and you can see the command lines in order of disk access

So I'm still looking for a good way of finding out which app is using bandwidth - perhaps there isn't a standard tool that can do this.

Revision history for this message
Harvey Muller (hlmuller) said :
#6

Mark,

vnstat (console app) is an option. And sytem monit (System -> Administration -> System Monitor) is as well.

More information on vnstat can be found in this question:

    https://answers.launchpad.net/ubuntu/+question/38899

Please return to Launchpad and mark this question Solved, if this resolves your issue.

Thanks!

Harvey

Revision history for this message
Victor Sergienko (singalen) said :
#7

Looks like pktstat (http://www.adaptive-enterprises.com.au/~d/software/pktstat/) or NetHog (http://nethogs.sourceforge.net/) are the only tools.
Though I wished that System monitor's applet could show bandwidth-consuming process' names.

Can you help with this problem?

Provide an answer of your own, or ask Mark Howard for more information if necessary.

To post a message you must log in.