How To Use VNSTAT To Monitor Bandwidth Usage.
There are so many tools to monitor network such as MRTG, now I am going to explain such tool which monitors bandwidth for a system, ie vnstat(view network statistics). Its very much easy to install and configure. This tool can give you full details about how much bandwidth used on the basics of, Per month. Per week. Per day. Per hour. Per second. Even we can see live traffic. This is awesome tool . So all the tools will not only have advantages but also disadvantages, here are they: 1)Can not monitor multiple interfaces at a time. 2)Can not monitor remote host. 3)Can not monitor per host statistics(which is verymuch useful to find the network hogger, if you want per host bandwidth analyser then use iptables counters for it). Before configuring vnstat, one thing we have to keep in mind that vnstat is a aggregating tool which is required to run at regular intervals to monitor network bandwidth. So by default when we install vnstat a cron job is created at /etc/cron.d folder. Step1 : installing vnstat #rpm –ivh vnstat-1.6-2.fc9.i386.rpm Step2 : Configuring vnstat. As I mention earlier that vnstat is an aggregate tool so it should run background by using crontab, So first edit the cron job Vi /etc/cron.d/vnstat */5 * * * * vnstat /usr/sbin/vnstat.cron Add the above line to the file, then save it and exit....
Read More
