Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use a broadband modem to connect to internet on my linux machine. Now, I've used the gnome-system-monitor app that correctly displays the kbps as well as total bytes consumed in each session. Now, is there any easy way in linux for me to log all these consumptions (downloads and uploads)?

The thing is that I use a limited usage plan (n number of GBs each month), hence I want to keep track of my usage. What is the best approach to do this on linux?

share|improve this question
Very similar, bordering on duplicate: Is there any way to see how much data I sent via Internet? at Unix.SE –  Michael Kjörling Jul 5 '13 at 15:54

2 Answers 2

up vote 4 down vote accepted

Install vnstat, it gives logs the usage on a network interface and you can display the usage over different time periods.

Here's the default output from my system

                  rx      /      tx      /     total    /   estimated
   Jun '13     14.40 GiB  /    1.70 GiB  /   16.10 GiB
   Jul '13      3.57 GiB  /    2.55 GiB  /    6.12 GiB  /   40.44 GiB
 yesterday    968.58 MiB  /    2.26 GiB  /    3.21 GiB
     today    377.88 MiB  /   26.73 MiB  /  404.61 MiB  /     582 MiB

If you get vnstati as well, you can display the data in different ways e.g.

Usage graph

share|improve this answer

Easiest to use and easiest to control output and redirect to file for continuous logging:


Probably comes with most linux distributions, and can be installed with brew on mac. Highly recommended.

share|improve this answer

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.