Incorrect Maxspeed calculation
search cancel

Incorrect Maxspeed calculation

book

Article ID: 373187

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Incorrect calculation of maxspeed property in case the result should be decimal number.

Environment

Watch4net | M&R 7.x

Cause

longValue()is used in variable handling filter vhf-pah-maxspeed-format.xml located at below location, hence decimal value is truncated. 

/APG_BASEDIR/Collecting/Variable-Handling-Filter/<collector-instance>/conf/

 

Resolution

As a workaround use floatValue()instead of longValue()in vhf-pah-maxspeed-format.xml located at /APG_BASEDIR/Collecting/Variable-Handling-Filter/<collector-instance>/conf/

Additional Information

  • Maxspeed value for an interface is fetched by querying the MIB variable 1.3.6.1.2.1.2.2.1.5.
    • <snmp-reference-table name="ifTable.ifSpeed" referenceTableOid=".1.3.6.1.2.1.2.2" parentTablecolIdxOidPositions="1" refTableColIdxOid=".1.100" indexEntryMask="oid._._.100" propertyName="maxspeed" propertyValueAppendOid=".1.5" usePropertyValueInVariableName="false" hexValue="false" longLifeCaching="false" useCredentialsContext="false"/>
    • .1.3.6.1.2.1.2.2.1.5.1 GAUGE-32 1000000000
    • .1.3.6.1.2.1.2.2.1.5.2 GAUGE-32 2500000000
    • .1.3.6.1.2.1.2.2.1.5.4 GAUGE-32 4294967295 
  • When maxspeed value is 2500000000, division by 1000000000 in variable handling filter <APG_BASEDIR>/Collecting/Variable-Handling-Filter/<collector-instance>/conf/vhf-pah-maxspeed-format.xml gives 2.5. As longValue() is used, decimal value is truncated, resulting in "2" concatenated with "Gbps" gives "2Gbps".
  • When floatValue() is used all maxspeed values are shown. For example:
    • (mxhspeed=2500,maxspeed=2.5Gbps)
    • (mxhspeed=10000,maxspeed=10.0Gbps)