SNMPCollector: Interface utilization calculation

Document ID : KB000013140
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

Noticing a strange calculation in the snmpcollector v3.30 depending on the devices.

The snmpcollector is reporting strange values for the interface utilizationdepending on the model being monitored. 

So, for Cisco Nexus 5000 it reports the Utilization as the greater of the values between UtilizationIn andUtilzationOut

Customer is expecting that for a full duplex device it would be the sum of UtilizationIn and UtilizationOutdivided by 2.

Please see the following information:

For Cisco Nexus 5000 (the larger of UtilzationIn/UtilzationOut is taken)

NormalizedPortInfo port-channel7 IfXTableMib Utilization (CalculatedSpeedIn > 20000000 && isdef(CalculatedIfHCInOctets)) ? (isdef(dot3StatsDuplexStatus) ? (dot3StatsDuplexStatus==3 ?(snmpProtectedDiv((snmpMax(CalculatedIfHCInOctets,CalculatedIfHCOutOctets)*8), (CalculatedSpeedIn*_rspDuration))*100):snmpProtectedDiv(((CalculatedIfHCInOctets+CalculatedIfHCOutOctets)*8), (CalculatedSpeedIn*_rspDuration))*100):snmpProtectedDiv(((CalculatedIfHCInOctets+CalculatedIfHCOutOctets)*8), (CalculatedSpeedIn*_rspDuration))*100) : (isdef(dot3StatsDuplexStatus) ? (dot3StatsDuplexStatus==3?snmpProtectedDiv((snmpMax(CalculatedIfInOctets,CalculatedIfOutOctets)*8), (CalculatedSpeedIn*_rspDuration))*100:(snmpProtectedDiv(((CalculatedIfInOctets+CalculatedIfOutOctets)*8),(CalculatedSpeedIn*_rspDuration)))*100) :(snmpProtectedDiv(((CalculatedIfInOctets+CalculatedIfOutOctets)*8),(CalculatedSpeedIn*_rspDuration)))*100) 2017 02 10 07:33:13 4.653500362033898
NormalizedPortInfo port-channel7 IfXTableMib UtilizationIn (CalculatedSpeedIn > 20000000 && isdef(CalculatedIfHCInOctets)) ?
snmpProtectedDiv((CalculatedIfHCInOctets*8),(CalculatedSpeedIn*_rspDuration))*100 : snmpProtectedDiv((CalculatedIfInOctets*8),(CalculatedSpeedIn*_rspDuration))*100 2017 02 10 07:33:13 4.653500362033898
NormalizedPortInfo port-channel7 IfXTableMib UtilizationOut (CalculatedSpeedOut > 20000000 && isdef(CalculatedIfHCOutOctets)) ? snmpProtectedDiv((CalculatedIfHCOutOctets*8),(CalculatedSpeedOut*_rspDuration))*100 : snmpProtectedDiv((CalculatedIfOutOctets*8),(CalculatedSpeedOut*_rspDuration))*100 2017 02 10 07:33:13 4.150232707796611

Cisco Nexus 6000 (here, it is taking the sum)

NormalizedPortInfo Vlan500 IfXTableMib Utilization (CalculatedSpeedIn > 20000000 && isdef(CalculatedIfHCInOctets)) ? (isdef(dot3StatsDuplexStatus) ? (dot3StatsDuplexStatus==3 ?(snmpProtectedDiv((snmpMax(CalculatedIfHCInOctets,CalculatedIfHCOutOctets)*8), (CalculatedSpeedIn*_rspDuration))*100):snmpProtectedDiv(((CalculatedIfHCInOctets+CalculatedIfHCOutOctets)*8), (CalculatedSpeedIn*_rspDuration))*100):snmpProtectedDiv(((CalculatedIfHCInOctets+CalculatedIfHCOutOctets)*8), (CalculatedSpeedIn*_rspDuration))*100) : (isdef(dot3StatsDuplexStatus) ? (dot3StatsDuplexStatus==3?snmpProtectedDiv((snmpMax(CalculatedIfInOctets,CalculatedIfOutOctets)*8), (CalculatedSpeedIn*_rspDuration))*100:(snmpProtectedDiv(((CalculatedIfInOctets+CalculatedIfOutOctets)*8),(CalculatedSpeedIn*_rspDuration)))*100) :(snmpProtectedDiv(((CalculatedIfInOctets+CalculatedIfOutOctets)*8),(CalculatedSpeedIn*_rspDuration)))*100) 2017 02 10 07:30:14 0.024913544000000003
NormalizedPortInfo Vlan500 IfXTableMib UtilizationIn (CalculatedSpeedIn > 20000000 && isdef(CalculatedIfHCInOctets)) ? snmpProtectedDiv((CalculatedIfHCInOctets*8),(CalculatedSpeedIn*_rspDuration))*100 : snmpProtectedDiv((CalculatedIfInOctets*8),(CalculatedSpeedIn*_rspDuration))*100 2017 02 10 07:30:14 0.006242677333333334
NormalizedPortInfo Vlan500 IfXTableMib UtilizationOut (CalculatedSpeedOut > 20000000 && isdef(CalculatedIfHCOutOctets)) ? snmpProtectedDiv((CalculatedIfHCOutOctets*8),(CalculatedSpeedOut*_rspDuration))*100 : snmpProtectedDiv((CalculatedIfOutOctets*8),(CalculatedSpeedOut*_rspDuration))*100 2017 02 10 07:30:14 0.018670866666666668

 

 

Question:

 

How To Calculate Bandwidth Utilization Using SNMP?

 

Environment:
UIM 8.5 snmpcollector 3.30
Answer:

That is what the calculation in the vendor certification does. The rationale is described in this paper on how to calculate utilization on Cisco’s web site.

 

http://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/8141-calculate-bandwidth-snmp.html