See/compute long-term network stats in Ubuntu (e.g. how many megabytes downloaded during last month)

1

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?

matteo

Posted 2012-08-29T10:30:12.060

Reputation: 3 092

This question might be relevant. – terdon – 2012-08-29T16:35:55.000

Answers

0

Many useful commands below:

http://www.cyberciti.biz/faq/network-statistics-tools-rhel-centos-debian-linux/

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.

Vivek Deveshwar

Posted 2012-08-29T10:30:12.060

Reputation: 1

Perhaps the statistics collected by sysstat help? – vonbrand – 2013-04-13T16:42:34.183