Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some broadband providers impose a monthly download limit, charging extra if you go over. It is also quite easy to exceed some of the lower limits just by installing/updating packages and 'normal' browsing (which to me includes streaming TV programs and movies).

This means that you need to limit the amount you use the internet, yet it is hard to know when.

The System Monitor helps a bit with this by giving a total received/total sent in the networking section of the Resources tab. However, this is reset every reboot. It would be good if there was a way to have a monthly total received so you can know how close you are to exceeding your limit and maybe even be given warnings if it looks like you are going to exceed the limits.

Does anyone know of a way to achieve this?

share|improve this question
up vote 20 down vote accepted

You can check out vnstat. It is command-line based and is available in the repository.

You can start it with sudo vnstat -u -i [interface]

To see the stats sudo vnstat -i [interface]

share|improve this answer

Though not a "ubuntu" answer, I use the Tomato firmware on my WRT54G router for this. It gives me monthly up/down usage for the past couple of years, and the nice thing (in the context of your question) is that it is for the whole network, not just the one system it's running on (though this point is moot if the system in question is your router or directly connected).

share|improve this answer
Yummy tomatoes. Great on sandwiches, even better on routers. – Ryan Thompson Aug 7 '10 at 5:41

Apart from any software solution I would suggest looking at your provider. Many of them have monitoring tools which send you a warning when you reach a certain limit or block your access temporarily. This has the advantage that you get some "official" number.

share|improve this answer

I recommend the ntop utility which is available from the repositories, it runs as a service ands keeps traffic usage records. The reports are available from am internal http server (port 3000). You can easily check them using a browser, http://localhost:300/

Check what you can get from ntop at the ntop website .

share|improve this answer
ntop doesn't keep track of usage between reboots, does it? – Erigami Aug 6 '10 at 20:54
According to the documentation it can using the rrd plugin, I didn't test myself. – João Pinto Aug 6 '10 at 21:23
How do You use rrd plugin then? – Anwar Shah Mar 17 '15 at 8:00

Your Answer


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.