Install vnstat on Centos at Burst.net to monitor the traffic

The traffic graphic on Burst.net portal is not correct. It is what Burst.net support stuff said. So I would like to install my own traffic monitoring service to track home much I use during the month.

vnStat is the one we are going to go through the installation.

The screen shot below is the report I have for last two weeks.

vnstat0

1) Install vnstat
SSH to VPS

wget http://humdi.net/vnstat/vnstat-1.11.tar.gz<br />
tar xzvf vnstat-1.11.tar.gz<br />
cd vnstat-1.11<br />
make<br />
make install

Until now, vnstat is installed, but it has no GUI for easily viewing.
So step 2 is install vnstat php frontend

2) Install vnstat php frontend

<br />
wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.5.1.tar.gz<br />
tar xzvf vnstat_php_frontend-1.5.1.tar.gz<br />
cd vnstat_php_frontend-1.5.1<br />
mkdir /home/yourname/yoursite/vnstat<br />
cp -r . /home/yourname/yoursite/vnstat/<br />
cd /home/yourname/yoursite/vnstat/<br />
vi config.php<br />

Edit config.php, change network interface to venet0
change data folder to $data_dir = ‘/var/lib/vnstat/’;

3) Add scheduled cron job to update the log database

<br />
cd /var/lib/vnstat<br />
vi dump.sh<br />
&lt;/pre&gt;<br />
Add following into dump.sh<br />
&lt;pre class=&quot;brush:shell&quot;&gt;<br />
vnstat -u -i venet0<br />
vnstat -dumpdb -i venet0 &amp;gt;/var/lib/vnstat/vnstat_dump_venet0<br />

Add following into scheduled cron job to every hours

<br />
/bin/sh /var/lib/vnstat/dump.sh<br />

Then the report will come like this when enter the address
http://yoursite/vnstat/
vnstat1