Wondering how to measure bandwidth usage on linux, its not that complex just install vnstat. On most linux systems it shows 'fail to start' due to unavailability of database. You need to create one, again even this is very simple.You will see this error on Ubuntu :
No database found, nothing to do. Use --help for help.
A new database can be created with the following command:
vnstat -u -i eth0
Replace 'eth0' with the interface that should be monitored.
The following interfaces are currently available:
lo eth0 wlan0
Simple isnt't you know what to do, just use vnstat -u -i
I used wlan0 to monitor bandwidth usage for wi-fi. As soon as vnstat starts to gather data, it will start showing up. Voilaaa.....Enjoy.