On Cyanogenmod, there is a neat display in the settings that shows you over-all data usage, as well as per-app data usage:

cyanogenmod data usage screen

Is there anything similar available for linux? I want to be able to log per-application data usage for a given network interface.

edit: To clarify, I want something that will display a total of bandwidth-usage, per-process, over period of time (at least a few hours, preferably up to a month, and granular, so that I can look at what caused spikes in usage, etc.

  • could you make that screenshot smaller? Its kinda overwhelming :) Feb 23, 2015 at 14:25
  • Sorry, it's just something I found on on the 'web, to show what I meant. Feel free to shrink it, if you think that's necessary.
    – naught101
    Feb 24, 2015 at 0:19

2 Answers 2


Sure is, it's called NetHogs and it's open source. Out of the box it doesn't give you fancy plots, but it does feature:

  • a 'top' like display, showing programs currently using bandwidth, how much, ordered by consumption (view can be customized)
  • Easily log data to a file, which you can use any number of plotting / visualization programs to generate graphs (gnuplot, rrdtool, etc)
  • Amazingly easy to use as a library if you know C/C++ (but not necessary)

I made a fork of NetHogs in the gcollector program that I wrote as a proof-of-concept pluggable monitoring system for GlusterFS, since I needed something designed to work just in scripts to sort of supervise how much bandwidth each process was using.

But, don't be daunted - out of the box the program is just as easy to use as 'top', and packages are available for it for many popular distributions. If you're an advanced sort of user, then you can really get creative in visualizing what programs eat how much bandwidth at any given time. I've even see folks plug cacti into it, for monitoring per-process consumption on servers.

I believe KDE and GNOME both have several 'gadgets' (used loosely as a universal term) that handle simple monitoring of process bandwidth, but not nearly as comprehensive or flexible as just using NetHogs itself.

Just note, it's tied more to the process than the interface itself, but you can change that around if you need to.

  • Hrm.. yes, I've used nethogs, but the instantaneous values are pretty useless. I haven't tried logging with it, but the graphing would need to be part of the answer. I'll see if I can figure out cacti. Are there any other good options for graphing the log data?
    – naught101
    Feb 19, 2015 at 1:36
  • clarified the question
    – naught101
    Feb 19, 2015 at 1:41

Sorry this answer is kind of short since I am using my phone to write it. Take a look at sysdig. It is also open source and their site (http://www.sysdig.org) contains several examples of how to use the tool. I have also written 2 articles that are linked on their site. Hope you find what you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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