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:
- 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):
- (T1) processor_busy=2000000, processor_elapsed_time=3000000
- (T2) processor_busy=2400000 ,processor_elapsed_time=4000000
The user must then perform the following computation to determine processor utilization: 100*(2400000-2000000)/(4000000-3000000) = 40%
So I should be doing
100*(hit_percent2-hit_percent1)/(accesses2-accesses1) ?
I just did some math on this and it looks accurate.
100 * (8691067123-8691066647) / (18276793012-18276789090) = 12.13666496685365