MRTG
From Fastsh.it
MRTG can be used to show alot of things, be it cpu temperature, network utilization or how many kilometers your hamster has run in its tiny wheel. This little tutorial will only explain how to make it show very simple graphs of network utilization.
First we install mrtg and mrtgutils
apt-get install mrtg mrtgutils
then we make the dirs
mkdir /var/www/mrtg
and then we edit or make the mrtg.cfg file
nano /etc/mrtg.cfg you can use vi if you want
in that we insert this bunch of text:
WriteExpires: Yes
workdir: /var/www/mrtg
forks: 2
refresh: 300
interval: 5
runasdaemon: yes
Target[index]: `/usr/bin/mrtg-ip-acct eth0`
XSize[index]: 600
YSize[index]: 180
MaxBytes[index]: 1310720
Title[index]: my.server.name: eth0
PageTop[index]: Traffic Analysis for my.server.name
WithPeak[index]: w
Options[index]: growright, bits
then we start mrtg with this line
evn LANG=C /usr/bin/mrtg /etc/mrtg.cfg
and voila, after about 5 minutes you will be able to goto your servers address, add /mrtg and watch stats being collected ;)
