Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently running Ubuntu on several machines and I need to track bandwidth usage per application. Is there a pre-built package or system that will track bandwidth usage and report on that usage broken out by application (or even just by port)?

Ideally I would like to be able to compare overall network utilization based on the running service and I've poked around a bit but haven't found anything that seems to be what I'm looking for. Any ideas?

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

iftop will display bandwidth usage by pairs of hosts, one of them being yours

nethogs will display bandwidth usage per process

iptraf will display bandwidth usage per connection

share|improve this answer
1  
None of those applications do what I really want, which is watch the network for a period of time and then generate monthly reports. Those applications are all "real-timey". But, on the nethogs page there was a link (which was broken) to an application called "darkstat" that seemed like it was what I was looking for. So a quick Google later and I was on debianhelp.co.uk/darkstat.htm which had exactly what I needed. So, case closed. The answer is "darkstat". Thanks for your help. –  Eric Ryan Harrison Jul 15 '10 at 0:19
    
Your fault for not stating explicitly "watch the network for a period of time" in your initial question :) If you are a hardcore SQL guy, you can install ulogd, set it up to log into a database (it supports many of them) and extract data for reports with SQL queries. –  halp Jul 15 '10 at 0:45
1  
Had you stated in your original question your point regarding timescales, then someone would probably have mentioned mrtg (oss.oetiker.ch/mrtg) - note that on Linux / most POSIX systems you cannot reconcile traffic with applications - only with protocols. –  symcbean Jul 15 '10 at 15:33
add comment

Actually you can reconcile traffic with applications. You need to get at the socket details for a specified set of processes. This requires that you get the data from inside the app/process and not from without. Meaning that using OS I/Fs won't give you the details you are looking for. Look at AppFirst, they do this.

share|improve this answer
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.