Vnstat
From Wiki
[edit]
vnstat - Network Traffic Logger and Monitor
vnstat keeps a daily log of network traffic for a specific device (eth0). Information is simply taken from /proc every 5 minutes via cron and saved to /var/lib/vnstat
What is good about vnstat, unlike munin or mrtg, is that vnstat keeps an accurate and numerical account of all network traffic. This is extremely useful if you have to watch bandwidth usage!!
[edit]
Install and Config vnstat
apt-get install vnstat #check in /etc/cron.d/ for vnstat ifconfig #check for the current network interface been used. vnstat #if its the first time running vnstat, it will tell you to config vnstat to use an interface. #The following is the syntax used to monitor an interface: vnstat -u -i eth0
[edit]
Check Network Traffic and Bandwidth Used
vnstat #With no options, shows the totals. vnstat -h #Show traffic for the last 24 hours. vnstat -d #Show traffic for days. vnstat -t #Show all time top10 traffic days. vnsatt -w #Show traffic for 7 days. vnstat -m #Show traffic for months. vnstat -tr #Show an immediate, real time sample, over a period of 5 (default if no number is given) seconds.
Links:
