I've had a couple of issues with measures and their initial values in conjunction with mins and maxes. Whenever I monitored a measure with a line meter, it would load zeros across the meter then spike up to 100% right before displaying the measure's value. Because all the zeros were being sent to the meter, my MinValue would be overwritten. I eventually got around this by shifting the range I wanted down to zero, so the rewriting wouldn't affect my meter visually.
I'm currently stuck trying to record a max value on a meter monitoring cpu usage. Since the measure spikes up to 100% at the start, my max value is now 100%. Now no matter what values load into the meter, that 100% will not change.
Here's the code related to the green items. (CPU Load shown in string and roundline meters)
Code: Select all
[CPU]
Measure=CPU
Processor=0
[Arc1]
Meter=Roundline
MeasureName=CPU
MeterStyle=StyleArc | StyleArc1 | StyleFGColor
[TextOuter]
Meter=String
MeterStyle=StyleText | StyleOuterText | StyleFGColor
MeasureName=CPU
Text="Load: %1%"
Percentual=1
Here's the code related to the blue items. (max CPU load shown in the meters)
Code: Select all
[CPUMax]
Measure=Calc
Formula=CPU > CPUMax ? CPU : CPUMax
[Arc1Max]
Meter=Roundline
MeasureName=CPUMax
MeterStyle=StyleArc | StyleArc1 | StyleArcMax
[TextOuterMax1]
Meter=String
MeterStyle=StyleText | StyleOuterMaxText
MeasureName=CPUMax
Text="%1%"
Percentual=1
How might I go about getting the CPU Load max? Is there a way to reset a variable after the meter has been loaded? It looks like Bangs could reset variables, but it seems to require cursor events. I'd rather not have to mouseover the meter every time it's refreshed to correct the max value. I guess one other thing I could do is use another plugin, but I'd like to avoid that if I can.