Home arrow Monitoring arrow Traffic Statistics with MRTG
Traffic Statistics with MRTG PDF
Wednesday, 21 December 2005
If you need to generate nice graph for your network traffic for every network card interface you can use MRTG (the example is for FreeBSD5.4) .

1. Install MRTG and snmp packages

#pkg_add ucd-snmp-4.2.6_3.tbz

#cd /usr/ports/net-mgmt/mrtg
#make install

2. Start snmpd

#/usr/local/sbin/snmpd

3. Generate MRTG config file

#cd /usr
#/usr/ports/net-mgmt/mrtg/work/mrtg-2.11.1/bin/cfgmaker --global 'WorkDir:/home/mrtg/public_html' --global 'Options[ ]:bits, growright' --output /home/mrtg/public_html/mrtg.cfg' This e-mail address is being protected from spam bots, you need JavaScript enabled to view it

4. Run MRTG

#mrtg /home/mrtg/public_html/mrtg.cfg

You could add this line into contab to run every 5 minutes. If you want a particular design for your graph page you could only use the pictures generated for traffic.

 

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?