Open leonjq opened 9 years ago
snmpd.conf
pass .1.3.6.1.4.1.2000.1000.80 /usr/bin/perl /usr/local/bin/iostat.pl
extend .1.3.6.1.4.1.2000.1000.9.80 /bin/sh /root/MemRealUse.sh
script1 [root@sbapdb1 ~]# less iostat.sh
cd /tmp && iostat -xkd 30 2 | sed 's/,/./g' > io.tmp && mv io.tmp iostat.cache
script2 [root@sbapdb1 ~]# less MemRealUse.sh
free | grep - | awk '{print $3}' echo $value
cacti [root@cacti scripts]# less MemRealUse_100.200.sh
a=snmpwalk -c public -v 2c 172.24.4.10 .1.3.6.1.4.1.2000.1000.4.1000.4.1.2.15.99.97.99.116.105.77.101.109.82.101.97.108.85.115.101.1 | grep STRING | awk '{print $4}'
snmpwalk -c public -v 2c 172.24.4.10 .1.3.6.1.4.1.2000.1000.4.1000.4.1.2.15.99.97.99.116.105.77.101.109.82.101.97.108.85.115.101.1 | grep STRING | awk '{print $4}'
b=echo $a|tr -d "\""
echo $a|tr -d "\""
use=expr 1024 \* $b echo $use
expr 1024 \* $b
use snmp protocol to get data,come into graph。
snmpd.conf
Further Information
See the snmpd.conf manual page, and the output of "snmpd -H".
pass .1.3.6.1.4.1.2000.1000.80 /usr/bin/perl /usr/local/bin/iostat.pl
extend .1.3.6.1.4.1.2000.1000.9.80 /bin/sh /root/MemRealUse.sh
script1 [root@sbapdb1 ~]# less iostat.sh
!/bin/sh
cd /tmp && iostat -xkd 30 2 | sed 's/,/./g' > io.tmp && mv io.tmp iostat.cache
script2 [root@sbapdb1 ~]# less MemRealUse.sh
!/bin/sh
free | grep - | awk '{print $3}' echo $value
cacti [root@cacti scripts]# less MemRealUse_100.200.sh
!/bin/sh
a=
snmpwalk -c public -v 2c 172.24.4.10 .1.3.6.1.4.1.2000.1000.4.1000.4.1.2.15.99.97.99.116.105.77.101.109.82.101.97.108.85.115.101.1 | grep STRING | awk '{print $4}'
echo $a
b=
echo $a|tr -d "\""
echo $b
use=
expr 1024 \* $b
echo $use