Could someone advise me how to get the output of the "show int xxx stat" command via SNMP?
This is for a Cat3750 switch where I would like to get information about the number of process switched and CEF switched packets for SVI ifaces.
Actually, there is "include object descriptions in search" check box, which let you search through description either, not only SNMP object name. (mentioned just in case you didn't notice it)
E.g. search pattern is
Number of octets in the total packets switched at Layer 3 by this
if you know exactly the counter-value of the variable you're looking for you could combine net-snmp with grep.
Core001#show interface fa13/11 stat
Switching path Pkts In Chars In Pkts Out Chars Out
Processor 0 0 134732 64265937
Searching in enterprises.Cisco for a variable with value 134732 (of cause it works only if the counter doesn't increase too fast):
snmpwalk -v2c -c MyComunity Core001 .22.214.171.124.4.1.9 | grep 134732
enterprises.126.96.36.199.1.30.54 = Counter32: 134732
enterprises.188.8.131.52.1.30.55 = Counter32: 134732
enterprises.184.108.40.206.1.30.56 = Counter32: 134732
enterprises.220.127.116.11.1.31.191 = Counter32: 134732
Be aware of such a problem...
Cisco for some MIB branches requires funny syntax.
snmpget -c zsc123@17 10.7.0.2 dot1dTpFdbPor
17 - is Vlan number.
It's impossible to get full dot1dTpFdbPor branch for all vlans using one snmp request. If you have 10 VLANs you have to make 10 request with different community values after @ sign.
The request without @VLAN_NUMBER in community
snmpwalk -c zsc123 10.7.0.2 dot1dTpFdbPor
returns results for VLAN1 only
TO CISCO SYSTEMS:
WHY THERES NO INFO ABOUT THAT IN SNMP MIB BROWSER TOOL ?????!!!!!
@deniska2006: Right, I forgot mentioning this funny behavior/syntax. As far as I know it's only relevant for Bridge-MIBs. The variable searched by mzik doesn't sound like being stored in Brigde-MIB.