Paragon-neo/100G: Automation - Getting measurement statistics from CAT

Python wrapper: Yes TCL wrapper: No

Functions to get the statistics associated with a measurement in CAT masks along with other related information.

calnexGetMeasurementStats(to_screen: bool = False, timing_only: bool = True)

calnexGetMeasurementStats()

A utility function to assist with addressing measurement statistics. Queries all currently enabled measurements that currently have statistics associated with them, and returns selected details and the calnexRest.py command to get the individual statistic value directly from a user script. Arguments: to_screen: (Boolean) if set to True, prints the contents of the statistics to the screen. Useful for quickly identifying the script commands. timing_only: (Boolean) if set to True, statistics NOT directly related to timing errors (e.g. message rates, packet counts, clock types) will not be returned. Returns: A list of dictionaries, each dictionary holds: MeasurementName: The API name of the measurement (e.g. "2Way") MetricType: The API name of the metric (e.g. "TIMEERROR") StatisticsName: The full name of the statistic, with its unit StatisticsValue: The current value of the statistic WrapperGetCmd: The command to be used in a user script that will return the value of that statistic Raises: None

Examples:

meas_stats = calnexGetMeasurementStats()

Returns a list of dictionaries of all statistics from all currently enabled measurements and metrics into the variable. Statistics not directly related to timing errors (e.g. message rates, packet counts, clock types) will not be returned.

 

meas_stats = calnexGetMeasurementStats(to_screen=True, timing_only=True)

Prints all statistics to the screen as well as returning the dictionary. This is useful for determining the calnexGetVal() command for an individual mask status for use in a script. All statistics associated with the measurement and metric will be returned, including those not directly related to timing errors.

 

Related pages