I am trying to use the 'perf-object-get-instances' method of the DataONTAP Manageability API to access performance parameters for various objects. I am a little confused with the 'Type' property of counters. For eg, the CIFS object has a counter called 'cifs_latency'. The 'Type' of this counter has been defined as 'Average'. So does that mean that the values returned from this counter is already the average latency or do I need to calculate the average using the formula given?
Similarly, the counter 'cifs_ops' has a type of 'Rate'. Does that mean that the value returned from this counter is already the rate value i.e (cifs_ops at t2 - cifs_ops at t1)/t2-t1 ? Or do I have to do this calculation once I get the data over 2 intervals?
This is documented in the NMSDK docs. Here is a snippet from the perf API call documentation that describes how to interpret the different types of counters:
Each counter has a property which indicates how it's raw value should be interpreted. This property is available as part of the static counter metadata returned by a call to perf-object-counter-list-info. Possible properties are 'raw', 'rate', 'delta', 'average', 'percent', 'string', and 'no-display'. String counters report textual information, such as volume or disk identifiers. No-display counters are not intended for direct use, and this property is typically assigned to base counters. The other properties are interpreted as follows:
raw: single counter value is used
delta: change in counter value between two samples is used
rate: delta divided by the time in seconds between samples is used
average: delta divided by the delta of a base counter is used
percent: 100*average is used
For 'average' and 'percent' counters, the 'base-counter' element will be set to the name of the base counter. Some counters are multidimensional, and for these the counter description includes a list of labels of the counter subelements, and a 'type' element indicating the counter is an array.For example, again consider the processor::processor_busy counter. The description and properties of this counter state that it is a percentage, but a call to perf-object-get-instances will return a raw number which must be further processed by the user. Because the counter is a percentage, the user must note the value of its base counter, (processor::processor_elapsed_time) and then make a second call to perf-object-get-instances and again note the raw value of the counter and base counter. Suppose the user made the calls at time T1 and later at time T2, and these raw values were returned (the object and instance name are not shown):