cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
681
Views
0
Helpful
0
Replies

Getting counters from Interface via snmp shows wrong result (ifHCInOctets and ifName)

ottomueller
Level 1
Level 1

Hi people,

 on cisco switches, I am trying to connect the output from ifHCInOctets  to the names of the interfaces via ifName and comparing it to show interfaces counter. I use the last number behind the period to build a relation:

IF-MIB::ifHCInOctets.5 -> .5 -> IF-MIB::ifName.5 -> STRING: Gi2/2 

But the counters don't match.

Gi2/2 0 0 0 0

IF-MIB::ifName.5 = STRING: Gi2/2 = Counter64: 316618425031 

Any ideas what I did wrong? Here is the output?

snmpwalk -c XXXXX  -v 2c 11.11.11.11 ifHCInOctets


IF-MIB::ifHCInOctets.2 = Counter64: 4679059808612
IF-MIB::ifHCInOctets.3 = Counter64: 18081823282428
IF-MIB::ifHCInOctets.4 = Counter64: 889928393035
IF-MIB::ifHCInOctets.5 = Counter64: 316618425031
IF-MIB::ifHCInOctets.6 = Counter64: 317632951365
IF-MIB::ifHCInOctets.7 = Counter64: 236829130669
IF-MIB::ifHCInOctets.8 = Counter64: 64061982573
IF-MIB::ifHCInOctets.9 = Counter64: 0


snmpwalk -c XXXXX  -v 2c 11.11.11.11 ifName

IF-MIB::ifName.2 = STRING: Gi1/1
IF-MIB::ifName.3 = STRING: Gi1/2
IF-MIB::ifName.4 = STRING: Gi2/1
IF-MIB::ifName.5 = STRING: Gi2/2
IF-MIB::ifName.6 = STRING: Gi2/3
IF-MIB::ifName.7 = STRING: Gi2/4
IF-MIB::ifName.8 = STRING: Gi2/5
IF-MIB::ifName.9 = STRING: Gi2/6

show interfaces counters

Te1/1 0 0 0 0
Te1/2 10563158165874 15443691040 120647811 290690918
Gi1/3 0 0 0 0
Gi1/4 0 0 0 0
Gi1/5 0 0 0 0
Gi1/6 0 0 0 0
Gi2/1 71889760549 151749380 761995 224509
Gi2/2 0 0 0 0
Gi2/3 10407430146 22164312 316283 168431
Gi2/4 0 0 0 0
Gi2/5 0 0 0 0
Gi2/6 0 0 0 0

0 Replies 0