PDA

View Full Version : How To Install Vnstat (Easy and very accurate bandwidth monitor)


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.

Jad
06-05-2005, 04:20 AM
MRTG and Cacti are well known as system resources eater, How about this vnstat ? I'm little worry about system resource under cpane power-1
any idea?

capnqwest
06-06-2005, 04:19 PM
From what I've heard from the developers and users at WebHostingTalk, vnstat is very light on system resources and about 1/5 that of Cacti. I didn't notice any appreciable hit after I installed it.

Jad
06-06-2005, 04:57 PM
actually i'm impressed, its just great
thank you capnqwest

capnqwest
06-06-2005, 05:22 PM
no prob and glad it worksed out for you.

charles
06-21-2005, 12:30 AM
So, are you seeing a discrepency between vnstat and vzpp?

Jad
06-21-2005, 10:33 AM
yes there is
Random days

06/06/2005
Vnstat
06.06. 224.94 MB | 788.97 MB | 1,013 MB
vzpp
6.53 (Mb) 745.43 (Mb)

16/06/2005
Vnstat
16.06. 3,868 MB | 3,782 MB | 7,650 MB
vzpp
Total 66.44 (Mb) 1,085.49 (Mb)


20/06/2005
Vnstat
20.06. 341.54 MB | 669.39 MB | 1,010 MB
vzpp
Total 0.00 (Mb) 668.73 (Mb)

charles
06-21-2005, 10:50 AM
Lucky for you it's in your favor :)

We'll try look into this, but since it's in your favor it's a pretty low priority for us right now.

charles

Jad
06-21-2005, 11:11 AM
haha :D
Actually I'm sure that pvps will give high priority for customers side favor

capnqwest
06-21-2005, 07:45 PM
So, are you seeing a discrepency between vnstat and vzpp?

Huge differences especially on ingress. It's in the customer's favor so it's not something we would complain about :) but the bandwidth allotments are so generous here that I seriously doubt many would be impacted by ingress.

charles
06-23-2005, 11:42 AM
I've had some discussion with swsoft about this and they seem to think its limited to one server. I know for a fact that two people in this thread that have noticed differences are on different servers, so I disagree.

But trackign this sort of thing down is tricky and time intensive - something I don't have a lot of right now. If you want to see this resolved, please send a ticket to support giving as much detail about the discrepencies you have seen and the ways you have verified this, and I'll be able to look at the servers and vps.

thanks
charles

capnqwest
06-23-2005, 06:47 PM
Personally, I'm not worried at all because it's in my favor. Virtuozzo is saying I'm only ingressing 1-2 mb per day when I'm really doing about 200 MB. I'm just a stats freak so I installed vnstat. If you want to take this offline with screen caps and server logs, I'd be happy to help though.

Hostultrix
06-24-2005, 07:42 AM
Wow, very useful software. I installed this yesterday and it seems very useful.