vnStat is a console-based network traffic monitor for Linux and BSD that keeps a log of network traffic for the selected interface(s). It uses the network interface statistics provided by the kernel as information source. This means that vnStat won’t actually be sniffing any traffic and also ensures light use of system resources.
Step 1. Installation:
apt-get install vnstat
Step 2. Select the interface you wish to monitor:
for eth0 :
vnstat -u -i eth0
Repeat this changing eth0 for each interface you wish to monitor.
NOTE: Once the text database have been initialised you’re ready to monitor your bandwidth usage. The package installs a cronjob which will update the database every five minutes.