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?

2 Answers 2


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

  • 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. Jul 15, 2010 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, 2010 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, 2010 at 15:33

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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