[nsp] VIP CPU utilization measurement in 7500s?

Mark Ivens mivens at clara.net
Thu Feb 27 19:50:11 EST 2003


Thus spake Edward Henigin (ed at staff.texas.net):

> We've been banging our collective heads against the wall for years
> on this issue.  What is the best way of measuring the CPU utilization
> on your VIPs, in a 7500?
> 
> Expect/telnet would work ("if-cons 5 c\nshow proc cpu\n") but I'm
> a little uncomfortable with potentially triggering IPC bugs when
> running that 288 times/day.  

or something like
sh cont vip <n> tech-support  | i util
which doesn't involve using the if-cons unsupported command (not that
I'm suggesting you do it this way of course).

> Also, you need to implement locking, so that if the vip doesn't
> respond, you don't stack up multiple sessions and use all your
> vty's.
> 
> Cisco exposes the CPU utilization values for the VIPs via SNMP, but
> I'll be a monkey's uncle if I can figure out how to correlate the
> SNMP table indexes to the actual VIP indexes.  This blows my mind.
> Why even bother implementing the sampling via SNMP if you provide NO
> way of knowing which value corresponds to which card?  Unless I'm
> missing something, of course :)

What you do is you query the CISCO-ENTITY-MIB to find out which
linecard corresponds to which index. For this you need the fix
CSCdm34955 ("Need to add support for the RSP to populate the
Entity-MIB") which was integrated in 12.0(18.5)S and above.

First walk the entPhysicalName table and grep for the line cards:

 1 shaft [/home/mark] % snmpbulkwalk -v2c -cxxxxxxx router entPhysicalName | egrep Line
SNMPv2-SMI::mib-2.47.1.1.1.1.7.14 = STRING: "Line Card 1"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.17 = STRING: "Line Card 2"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.18 = STRING: "Line Card 4"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.21 = STRING: "Line Card 5"
SNMPv2-SMI::mib-2.47.1.1.1.1.7.24 = STRING: "Line Card 6"

If you want to get the CPU load for the slot 1, note down that it's
index 14. 

Then query cpmCPUTotalPhysicalIndex:

 2 shaft [/home/mark] % snmpbulkwalk -v2c -cxxxxxxx router cpmCPUTotalPhysicalIndex
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.1 = INTEGER: 9
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.2 = INTEGER: 21
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.3 = INTEGER: 24
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.4 = INTEGER: 18
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.2.5 = INTEGER: 14

Looking at the entry with value 14 from before, note the index (5 in this case).
Then you can now do an snmpget for index 5 in (for example) cpmCPUTotal5min to
get the the 5minute load average for Slot 1.

 3 shaft [/home/mark] % snmpget -cxxxxxxx router cpmCPUTotal5min.5
SNMPv2-SMI::enterprises.9.9.109.1.1.1.1.5.5 = Gauge32: 82

Convoluted eh?

The problem we've had is that entries in cpmCPUTotalTable get removed
every couple of weeks (with no OIRing or the like) only to come back
with different indexes a couple of hours later, seemingly at random.
Very annoying.

We're working with some of the Cisco IPC developers to get a fix
for this.

Mark


More information about the cisco-nsp mailing list