What happens when a counter rolls over in CAPM?

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

What happens when a counter rolls over between polls?

 

When a 32 bit counter is associated with a 64 bit metric, it is common for the values to exceed the limit of the 32 bit counter and 'rollover'

 

When this happens, the value we get makes for an impossible delta.

 

But even a 64 bit counter can rollover if the metric is busy.

 

 

So here is what happens in CAPM when a counter rolls over.

Question:

How does CAPM handle a counter rollover?

Environment:
CAPM 2.x, 3.x
Answer:

On the DCs, there is a /opt/IMDataCollector/apache-karaf-2.4.3/data/log/CounterRollover.log file.

 

You'll see messages like:

 

This one tells you the threshold for 64 bit counters.

 

2016-12-22 16:55:11,061 | INFO | xtenderThread-65 | CounterRollover | core.rdp.AbstractDeltaController 291 | 186 - com.ca.im.data-collection-manager.core.interfaces - 2.8.0.SNAPSHOT | | Setting (64 bit) largeDeltaValueThreshold to 9223372036854775807

 

 

32 bit is 2147483648:

 

Here is an example of a delta being > 2147483648, so we drop it.

2017-01-06 13:02:43,211 | INFO | ecutor-thread-93 | CounterRollover | .dm.snmp.rdp.impl.SnmpDeltaCache 327 | 186 - com.ca.im.data-collection-manager.core.interfaces - 2.8.0.SNAPSHOT | | Delta calculated is greater than or equal to 2147483648; dropping response: previous=5 / current=0 for ip 138.42.96.32, OID 1.3.6.1.4.1.9.9.42.1.3.5.1.39.2222, itemID 3727, in poll group 3742.

 

 

We also indicate when rollover happens… But in this case we don't drop, we calculate the delta and use it.

 

2017-01-17 18:29:39,854 | INFO | cutor-thread-670 | CounterRollover | .dm.snmp.rdp.impl.SnmpDeltaCache 850 | 186 - com.ca.im.data-collection-manager.core.interfaces - 2.8.0.SNAPSHOT | | 32 bit counter rollover. Previous value was 4284843441, current value is 25661039. For ip 138.42.96.36, OID 1.3.6.1.2.1.2.2.1.16.54, itemID 4277 

Additional Information:

https://docops.ca.com/ca-performance-management/3-0/en/configure-counter-behavior-340142542.html

..

Increase logging:

By default, we only keep 2 files, 100MB each.

 

If you wish to keep more, edit "org.ops4j.pax.logging.cfg" on the DC, and look for "log4j.appender.CounterRollover.maxBackupIndex=",

 

 and increase the number to like 4 or 5 to save 5 or 6 files.