capnqwest
05-31-2005, 04:20 AM
I found Virtuozzo and WHM to be fairly inaccurate tools for bandwith monitoring. I found Vnstat (http://humdi.net/vnstat/), and fell in love. It doesn't give you pretty graphs like MRTG (http://people.ee.ethz.ch/~oetiker/webtools/mrtg/) or Cacti (http://www.cacti.net/) but I don't really need all of those and just want something very accurate accesible from the CLI and requires very few system resources to run.
Here's how to install Vnstat:
1) be root
2) (change directory to /usr/src or whatever you want) root@host [~]# cd /usr/src
3) (download the file using wget) root@host [~]# wget http://humdi.net/vnstat/vnstat-1.4.tar.gz
4) (untar the compressed package) root@host [~]# tar zxvf vnstat-1.4.tar.gz
5) (change directory to Vnstat) root@host [~]# cd vnstat-1.4
6) (compile using gcc) root@host [~]# make && make install
7) (run vnstat for the first time) root@host [~/vnstat-1.4]# vnstat
8) Vnstat will prompt you to make a new database for the interface you wish to monitor. In my case, I want to monitor venet0 so I type: root@host [~/vnstat-1.4]# vnstat -u -i venet0
9) you should see the following: Error: Unable to read database "/var/lib/vnstat/venet0". New database generated.
10) You're ready to run vnstat. root@host [~]# vnstat
http://www.capnqwest.com/images/vnstat.jpg
Before I wrote this, I conducted some tests using some known files via all the common protocols and vnstat was right on the money. If you have any problems with vnstat, send me a pm and I'll be glad to help.
Here's how to install Vnstat:
1) be root
2) (change directory to /usr/src or whatever you want) root@host [~]# cd /usr/src
3) (download the file using wget) root@host [~]# wget http://humdi.net/vnstat/vnstat-1.4.tar.gz
4) (untar the compressed package) root@host [~]# tar zxvf vnstat-1.4.tar.gz
5) (change directory to Vnstat) root@host [~]# cd vnstat-1.4
6) (compile using gcc) root@host [~]# make && make install
7) (run vnstat for the first time) root@host [~/vnstat-1.4]# vnstat
8) Vnstat will prompt you to make a new database for the interface you wish to monitor. In my case, I want to monitor venet0 so I type: root@host [~/vnstat-1.4]# vnstat -u -i venet0
9) you should see the following: Error: Unable to read database "/var/lib/vnstat/venet0". New database generated.
10) You're ready to run vnstat. root@host [~]# vnstat
http://www.capnqwest.com/images/vnstat.jpg
Before I wrote this, I conducted some tests using some known files via all the common protocols and vnstat was right on the money. If you have any problems with vnstat, send me a pm and I'll be glad to help.