Super User is a question and answer site for computer enthusiasts and power users. 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

On Ubuntu, I'd like to know how many megabytes have come in (download) or gone out (upload) of my computer via the network in the last month, or week or whatever (the longer the better). Is there any place where I can see this kind of statistics? Or, is there any log file where for example every connection gets logged with the total amount of bytes sent and received, so that I could do a little bit of grepping of those log files and compute a sum?

share|improve this question
This question might be relevant. – terdon Aug 29 '12 at 16:35

Many useful commands below:

e.g. I used ifconfig ppp0 to find bytes being transferred on the broadband dongle which gets named ppp0 when connected on my ubuntu 12.04. If I disconnect and reconnect, it will give the fresh number of bytes transferred on next invocation so I can know whether the total data transfer is within limits.

Note that I haven't found a way yet to find number of bytes transferred last month/week etc but if I remember my last search on same subject there probably isn't any tool available like that. So you may have to write your own script of some kind which collects such data and saves it in a log or database for later summing up.

share|improve this answer
Perhaps the statistics collected by sysstat help? – vonbrand Apr 13 '13 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .