Just at work and needed to monitor the network usage at our gateway and thought this might be of interest to you.
vnstat --> http://humdi.net/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.
Installing:
First go grab the latest version from http://humdi.net/vnstat/
(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
CODE
tar xzvf vnstat-1.4.tar.gz
move into the newly created dir (/usr/local/src/vnstat-1.4) and begin installing
CODE
cd /usr/local/src/vnstat-1.4
make
make install
make
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
CODE
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
CODE
vnstat -u -i eth0
If you would like to give your network interfaces names for the output use this code
CODE
vnstat -u -i eth0 --nick internet
vnstat -u -o eth1 --nick local
vnstat -u -o eth1 --nick local
Thats it
To have a look at what is going on simply type in one of the following options
CODE
vnstat --> simple summary
vnstat -d --> daily summary
vnstat -w --> weekly summary
vnstat -m --> monthly 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 http://humdi.net/vnstat/
Enjoy
Wolfsta
P.S My first guide, simple i know but comments (corrections