Commit be8216bc authored by Mike Hibler's avatar Mike Hibler

Fix for latest version of snmp tools.

Our cricket graphs have been broken since January...oops.
parent aab974aa
#!/bin/sh #!/bin/sh
# #
# Copyright (c) 2006 University of Utah and the Flux Group. # Copyright (c) 2006-2015 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -22,9 +22,10 @@ ...@@ -22,9 +22,10 @@
# }}} # }}}
# #
SNMPGET="/usr/local/bin/snmpget -m CISCO-STACK-MIB:CISCO-PAGP-MIB -Ovq"
community="public" community="public"
SNMPGET="/usr/local/bin/snmpget -v 2c -c $community -m CISCO-STACK-MIB:CISCO-PAGP-MIB -Ovq"
if [ $# -lt 4 ] if [ $# -lt 4 ]
then then
echo "usage: $0 <address> <module> <port> <ifEntry-attribute> [trunk]" echo "usage: $0 <address> <module> <port> <ifEntry-attribute> [trunk]"
...@@ -38,15 +39,15 @@ attr=$4 ...@@ -38,15 +39,15 @@ attr=$4
trunk=$5 trunk=$5
index=`$SNMPGET $addr $community portIfIndex.$module.$port 2> /dev/null` index=`$SNMPGET $addr portIfIndex.$module.$port 2> /dev/null`
if [ $? -eq 0 -a "x$index" != "x" ] if [ $? -eq 0 -a "x$index" != "x" ]
then then
if [ "x$trunk" = "xtrunk" ] if [ "x$trunk" = "xtrunk" ]
then then
index=`$SNMPGET $addr $community pagpGroupIfIndex.$index 2> /dev/null` index=`$SNMPGET $addr pagpGroupIfIndex.$index 2> /dev/null`
fi fi
retval=`$SNMPGET $addr $community ifEntry.$attr.$index 2> /dev/null` retval=`$SNMPGET $addr ifEntry.$attr.$index 2> /dev/null`
if [ $? -eq 0 -a "x$retval" != "x" ] if [ $? -eq 0 -a "x$retval" != "x" ]
then then
echo $retval echo $retval
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment