Spectrum watches stop working when an expression increases the size of the output to greater than data type range of the input.
search cancel

Spectrum watches stop working when an expression increases the size of the output to greater than data type range of the input.

book

Article ID: 280653

calendar_today

Updated On:

Products

Network Observability

Issue/Introduction

In a watch, If I use an integer input in an expression to multiply the output, the watch stop working when it exceeds the data range of the input data type. 

Data Type Integer
Expression ( snmpEngineTime * 100 )

Environment

Any Spectrum version

Cause

e.g snmpEngineTime is an integer and we need to convert to a larger output via a Watch expression

 

Once the value of the resulting Watch attribute exceeds the integer value range limit, the watch goes into an error state and stops working.

Resolution

Covert the integer input to a larger data type for output. E.g. use Counter or 64Counter as the watch data type and convert as follows.

Data Type 64 bit Counter

(UNSIGNED64(snmpEngineTime)*100)

Additional Information

If bracket placement is incorrect, the calculation will be performed on an integer data type and produce an error.