Topic: Bandwidth Logging for Mobile Broadband Connections
If anyone has a mobile broadband connection, they probably have a limit. A great tool to measure your daily/weekly/monthly usage is vnstat.
You only need to install the one package.
sudo apt-get install vnstatDuring the install it will try to start the daemon, but it will fail. First you have to tell it what interfaces to monitor. Execute something like the following in your terminal, changing the interface to match your mobile connection.
sudo vnstat -u -i ppp0If you want the totals to follow your billing month and not the actual month you will need to edit /etc/vnstat.conf. Change MonthRotate to whenever your billing date is.
# on which day should months change
MonthRotate 10Now start the daemon:
sudo service vnstat startNow to check how much bandwidth you have used you can simply type vnstat into your terminal. benj1 has wrote a python script to make it easy to use this info with conky. Thanks benj1! To use it with conky add something like this to your conky config.
For total usage:
Total:${alignr}${execi 300 vnstat-conky-script.py}For sent monthly total:
Sent:${alignr}${execi 300 vnstat-conky-script.py -s}For recieved monthly total:
Recieved:${alignr}${execi 300 vnstat-conky-script.py -r}Last edited by hardran3 (2011-03-18 01:10:57)