refer here :

http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg/mrtg_references.php

mrtg.png

Basically , you need to properly setup the snmpd..
then test will snmp walk…

then only setup mrtg to parse the data and generate output
peridocally..

su -
yum install net-snmp-utils net-snmp -y

kill -9 21282
ps xa | grep rpm
rpm -aq | grep mrtg
cd /var/www/html/
ls
mkdir stats
cfgmaker --global 'WorkDir: /var/www/html/stats' --output /etc/mrtg/sa.cfg public@localhost
indexmaker --output=/var/www/html/stats/index.html /etc/mrtg/sa.cfg
which mrtg
ls
cd ..

cp -av /var/www/mrtg/*.png /var/www/html/stats/
ls

env LANG=C mrtg /etc/mrtg/sa.cfg
crontab -e

export SERVER="192.168.x.xxx"
iptables -A OUTPUT -p udp -s $SERVER --sport 1024:65535 -d 0/0 --dport 161:162 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A INPUT -p udp -s 0/0 --sport 1024:65535 -d $SERVER --dport 161:162 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p udp -s $SERVER --sport 161:162 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p udp -s $SERVER --sport 1024:65535 -d 0/0 --dport 161:162 -m state --state NEW,ESTABLISHED -j ACCEPT

service iptables sa ve
cd html/
ls
cd stats/
ls
vi .htaccess

mkdir /var/members
htpasswd -c /var/members/.htpass wd mrtgadmin

ls
cd ..
ls
cd /etc/mrtg/
ls
vi sa.cfg

ps xa
ip addr

ls
pwd
indexmaker --output=/var/www/html/stats/index.html /etc/mrtg/sa.cfg

screenshot.png

Related posts:

  1. Setting ip6tables custom script for IPv6
  2. How to become gateway using a linux OS
  3. Fedora core 7…
  4. Installing and configuring OpenVPN server in CentOS 5.4
  5. How to setup own private radio server – Broadcast and be a DJ