Software Development Kit (SDK) and API Discussions
Software Development Kit (SDK) and API Discussions
Hello
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?
Any help regarding this is appreciated.
Thanks
Roycey
Solved! See The Solution
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:
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):
The user must then perform the following computation to determine processor utilization: 100*(2400000-2000000)/(4000000-3000000) = 40%
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:
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):
The user must then perform the following computation to determine processor utilization: 100*(2400000-2000000)/(4000000-3000000) = 40%
So although the counter type says 'percent' I still need to calculate the percentage using the formula right?
Can you also share the link to this document. I have the document for SDK 8.2.1 and in that this is not very clear.
Thanks
Roycey
Yes, you do need to calculate it per the formula. Here is a link to the 8.2.1 NMSDK API Docs:
https://communities.netapp.com/docs/DOC-24987
Mike
Thanks!
Roycey