Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking for an utility that could show me how much of a bandwidth each process are using. It should just print the data and exit as I want to feed that list into conky.

share|improve this question
add comment

4 Answers

You can try NetHogs.

NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded. If there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This makes it easy to indentify programs that have gone wild and are suddenly taking up your bandwidth.

NetHogs_Screenshot

share|improve this answer
    
Almost exactly what I need but it just doesn't work :( –  vava Aug 31 '09 at 17:24
    
Well, what doesn't work? Any errors? Doesn't it start at all? Console output? –  Milde Sep 1 '09 at 7:14
    
Thank you very much. –  Saeed Zarinfam Sep 24 '12 at 11:27
add comment

Try atop ... to get the most out of it you may have to enable some additional kernel patches (I/O accounting patches).

If atop isn't an option then use netstat -anp --inet (as root) to provide a listing of which TCP/UDP ports are in use by which processes (or possibly use lsof for that). From there simply iterate over each process that's got an open socket and either attach to it using ltrace -S or strace to look at the reads, writes, sends and receives, or use tcpdump with a filter specifying your local IP address(es) and the TCP/UDP ports that were listed.

atop is certainly the most convenient of these ... if you have it and the necessary kernel support installed. In the past I've had customers and employers set up special systems (different from their production images) for the sole purpose of supporting I/O profiling using atop. However these other techniques will get you there.

I'm sure we could also do something using SystemTap ... but I don't know of any easy pre-cooked recipes for doing this. SystemTap is very much a programming analysis tool.

share|improve this answer
add comment

Check out the answer here: link

share|improve this answer
    
Again, not one of those utilities can tell me which process are using most bandwidth and that's what I'm after. –  vava Aug 31 '09 at 17:26
    
Actually it does, assuming you have a few programs in mind you'd like to check. You can manually monitor each one based on the port it uses. –  th3dude Aug 31 '09 at 17:54
    
Yeah, would be really fun checking Azureus that way :) –  vava Sep 1 '09 at 2:27
add comment

There is quite a few listed here.

My favorites however remain iftop and tcpdump. Wireshark is also a very good option.

share|improve this answer
    
I have ethical issues with Wireshark, if not alone on the network... Unless you have a way to make it probe only the localhost, in which case I'm interested. –  Gnoupi Aug 31 '09 at 14:18
4  
If you don't enable promiscuous mode it should only capture traffic directed to your host. –  Amuck Aug 31 '09 at 15:57
    
Huh, not one of those utilities can tell me which process are using most bandwidth and that's what I'm after. –  vava Aug 31 '09 at 17:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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