Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Tips and Tricks _ Monitoring Network Traffic

Posted by: wolfsta Jul 21 2004, 06:26 PM

Hey all smile.gif

Just at work and needed to monitor the network usage at our gateway and thought this might be of interest to you.

vnstat -->

This is a really simple app for monitoring network traffic.

I pulled down MRTG because ive used it at home but just too complex/time consuming for the simple task i needed. Something quick and easy was required. Although this doesnt do web output like MRTG or have a gui, it is nice and simple.


First go grab the latest version from
(at time of writing it was vnstat-1.4.tar.gz - source (25.6 kB)

next untar and unzip the file to somewhere like /usr/local/src

tar xzvf vnstat-1.4.tar.gz

move into the newly created dir (/usr/local/src/vnstat-1.4) and begin installing
cd /usr/local/src/vnstat-1.4
make install

Some kernels maybe broken and unable to run with vnstat so you need to run this command to make sure everything is happy smile.gif
vnstat --testkernel

And last but not least we need to tell vnstat which network interfaces we want it to monitor. This will monitor eth0 only. If you want to monitor other interfaces simply type it again with a different interface on the end tongue.gif
vnstat -u -i eth0

If you would like to give your network interfaces names for the output use this code
vnstat -u -i eth0 --nick internet
vnstat -u -o eth1 --nick local

Thats it biggrin.gif all installed

To have a look at what is going on simply type in one of the following options
vnstat        -->   simple summary
vnstat -d   -->    daily summary
vnstat -w   -->   weekly summary
vnstat -m   -->   monthly summary

There are more options and ways of installing than i have shown... this is just a quick simple setup..

For more info see the man or web page


Wolfsta tongue.gif

P.S My first guide, simple i know but comments (corrections unsure.gif) appreciated smile.gif

Powered by Invision Power Board (
© Invision Power Services (