2013-08-14 03:07 PM - last edited on 2014-09-25 12:10 PM by alissa
I've been building up my cacti templates to monitor my netapp arrays and I'm not having any luck getting flashcache stats in.
perf_operationpl <filer> <username> <password> get-counter-values ext_cache_obj | grep percent
|Counter Name = hit_percent||Counter Value = 7706202468|
These numbers are not a percent...
|Counter Name = cache_utilization||Counter Value = 92|
This one is
If I go on to my filer and run the command
filer01> stats show ext_cache_obj:ec0:hit_percent
OnCommand returns the right data, but I'd like to get this data into my cacti system to be able to correlate data with all of the other things cacti monitors.
Does anyone know whats up with this counter?
2013-08-14 10:47 PM
Please see API documentation - percentage counters are raw values which must be post-processed in relation to other (“base”) counters. Unfortunately, I do not know whether full list of counters and their properties exists so you will need to retrieve them yourself …
2013-08-15 09:42 AM
Found what you are referring to in the API documentation. It means this figure is going to be a little harder to get into cacti than I originally hoped but it should be possible.
The base counter for hit_percent is accesses
|Counter Name = hit_percent||Base Counter = accesses||Privilege_level = basic||Unit = percent|
per the API documentation how to convert the hit_percent counter into an actual percent
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 I should be doing
I just did some math on this and it looks accurate.
100 * (8691067123-8691066647) / (18276793012-18276789090) = 12.13666496685365
2013-08-15 09:15 PM
Cacti actually does that part for me automatically as part of the graphing function. Now I just need to figure out how to reprogram the data collection script to return two counter results at the same time instead of slightly delayed, it's not perfectly accurate right now, but is pretty close.
2013-08-16 11:02 AM