Well, not sure. tjhrulz will have to weigh in on this.SilverAzide wrote:I assume you mean on the measure? OK, I did, but for me the code snippet above is returning a value hovering around 600%.
It is currently October 6th, 2024, 7:36 am
NomFerp Plugin
-
- Developer
- Posts: 22821
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: New PerfMon Plugin
-
- Developer
- Posts: 22821
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: New PerfMon Plugin
Code: Select all
[MeasureDiskIdleTimeAll]
Measure=Plugin
Plugin=UsageMonitor
Category=LogicalDisk
Counter="% Idle Time"
Name=_Total
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: New PerfMon Plugin
New issue: % Idle Time measures are somehow reporting values of >100%, e.g. 100.03543. Because of this, my read/write time calc measures (Formula=(100 - MeasureDiskAIdleTime)) will go into the negatives, causing the meter to show a negative percentage of disk read/write time.
I've worked around this by adding an absolute value argument to the calc measure, but that is only temporary. The old PerfMon plugin always went up to exactly 100.0.
Edit: code
I've worked around this by adding an absolute value argument to the calc measure, but that is only temporary. The old PerfMon plugin always went up to exactly 100.0.
Edit: code
Code: Select all
[MeasureDiskAIdleTime]
Measure=Plugin
Plugin=UsageMonitor
Category=LogicalDisk
Counter=% Idle Time
Name=A:
Group=DiskA
Disabled=#hideDiskA#
[MeasureDiskARWTime]
Measure=Calc
Formula=abs(100 - MeasureDiskAIdleTime)
MaxValue=100
MinValue=0
Group=DiskA
Disabled=#hideDiskA#
-
- Developer
- Posts: 268
- Joined: October 13th, 2016, 1:28 am
- Location: Earth
Re: New PerfMon Plugin
While uncommon it is possible for that counter to end up with a value of greater than 100, even in the perfmon.exe. I don't think there is nothing I can do about that, blame microsoft there.raiguard wrote:New issue: % Idle Time measures are somehow reporting values of >100%, e.g. 100.03543. Because of this, my read/write time calc measures (Formula=(100 - MeasureDiskAIdleTime)) will go into the negatives, causing the meter to show a negative percentage of disk read/write time.
I've worked around this by adding an absolute value argument to the calc measure, but that is only temporary. The old PerfMon plugin always went up to exactly 100.0.
Not sure why though you did not have that happening before though, mind posting the old PerfMon version of the code?
-
- Developer
- Posts: 22821
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: New PerfMon Plugin
Code: Select all
[MeasureDiskARWTime]
Measure=Calc
Formula=100 - (MeasureDiskAIdleTime > 100 ? 100 : MeasureDiskAIdleTime)
MaxValue=100
MinValue=0
-
- Posts: 660
- Joined: June 25th, 2015, 7:02 pm
- Location: The Sky, USA
Re: New PerfMon Plugin
Aha, I was actually wrong. The PerfMon measures did report >100% as well, it's just that it never showed up in the meters because the meters had Percentual=1 when I was using PerfMon, but got removed when I switched to UsageMonitor.tjhrulz wrote:While uncommon it is possible for that counter to end up with a value of greater than 100, even in the perfmon.exe. I don't think there is nothing I can do about that, blame microsoft there.
Not sure why though you did not have that happening before though, mind posting the old PerfMon version of the code?
So this is actually a much older bug...
Code: Select all
[MeasureDiskAIdleTime]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter="% Idle Time"
PerfMonInstance="A:"
Group=DiskA
Disabled=#hideDiskA#
[MeasureDiskARWTime]
Measure=Calc
Formula=(100 - ((MeasureDiskAIdleTime / (#gadgetUpdateRate# / 1000)) / 100000))
MaxValue=100
MinValue=0
Group=DiskA
Disabled=#hideDiskA#
-
- Developer
- Posts: 22821
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: New PerfMon Plugin
Better yet...
Code: Select all
[MeasureDiskARWTime]
Measure=Calc
Formula=100 - Clamp(MeasureDiskAIdleTime,0,100)
MaxValue=100
MinValue=0
-
- Rainmeter Sage
- Posts: 2742
- Joined: March 23rd, 2015, 5:26 pm
Re: New PerfMon Plugin
Holy CRAP... That actually works! It's actually working even better than the old PerfMon; PerMon always returns a value that is scaled weirdly, but UsageMonitor is returning a proper value.jsmorley wrote:See if that doesn't work.Code: Select all
[MeasureDiskIdleTimeAll] Measure=Plugin Plugin=UsageMonitor Category=LogicalDisk Counter="% Idle Time" Name=_Total
I'm looking forward to reading the documentation on this... Index=0 and Name=Total returns totals and Name=_Total returns an average -- sometimes....
-
- Developer
- Posts: 22821
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: New PerfMon Plugin
There is no Name=Total, just Name=_Total.SilverAzide wrote:Holy CRAP... That actually works! It's actually working even better than the old PerfMon; PerMon always returns a value that is scaled weirdly, but UsageMonitor is returning a proper value.
I'm looking forward to reading the documentation on this... Index=0 and Name=Total returns totals and Name=_Total returns an average -- sometimes....
Here is the best I could come up with for now, as I'm not sure there is any hard and fast rule for when Index=0 or Name=_Total is the best bet. Perfmon is a bit of a swamp.
https://docs.rainmeter.net/manual-beta/plugins/usagemonitor/#Name
-
- Rainmeter Sage
- Posts: 2742
- Joined: March 23rd, 2015, 5:26 pm
Re: New PerfMon Plugin
Oops, yes, I got things twisted around. Index=0 shows "Total" as the string value of the measure, while Name=_Total returns "_Total" -- which might be an average instead of a total, thank you Microsoft.jsmorley wrote:There is no Name=Total, just Name=_Total.
Here is the best I could come up with for now, as I'm not sure there is any hard and fast rule for when Index=0 or Name=_Total is the best bet. Perfmon is a bit of a swamp.
https://docs.rainmeter.net/manual-beta/plugins/usagemonitor/#Name