Here is a quick script to find the CPU OIDs for the RSP and linecards on 
a 7500.

        -Dustin

---begin findvips.sh---
#!/bin/sh

# A quick script to find the OIDs of each CPU on a 7500
# See http://www.cisco.com/warp/public/477/SNMP/collect_cpu_util_snmp.html

COMMUNITY=$1
DEVICE=$2

if [ "$COMMUNITY" = "" ]; then
         echo "Usage: $0 <community> <device>"
         exit
fi

if [ "$DEVICE" = "" ]; then
         echo "Usage: $0 <community> <device>"
         exit
fi

echo -e OID'\t\t\t\t\t'CPU
snmpwalk -On -c $COMMUNITY $DEVICE .1.3.6.1.4.1.9.9.109.1.1.1.1.5 | \
while read LINE; do
         OID=`echo $LINE | cut -d\  -f1`
         INDEX=`echo $OID | cut -d\. -f16`
         snmpwalk -On -c $COMMUNITY $DEVICE 
.1.3.6.1.4.1.9.9.109.1.1.1.1.2.$INDEX | \
         while read LINE; do
                 if [ "$LINE" != "" ]; then
                         VALUE=`echo $LINE | cut -d\  -f3`
                         snmpwalk -On -c $COMMUNITY $DEVICE 
.1.3.6.1.2.1.47.1.1.1.1.7.$VALUE | \
                         while read LINE; do
                                 if [ "$LINE" != "" ]; then
                                         DESCRIPTION=`echo $LINE | cut 
-d\" -f2`
                                         echo -e $OID'\t'$DESCRIPTION
                                 fi
                         done
                 fi
         done
done

--
Unsubscribe mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to