It is currently October 16th, 2018, 11:59 pm

UsageMonitor Discussions

Share your custom plugins and applications to enhance Rainmeter.
User avatar
tjhrulz
Developer
Posts: 221
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: UsageMonitor Discussions - GPU oddity?

tjhrulz » May 4th, 2018, 1:16 pm

SilverAzide wrote:Hello,

A question for the devs: I've noticed an oddity with the new UsageMonitor plugin... if you monitor the Rainmeter process, it appears that Rainmeter does use GPU, but the memory used is 0 bytes. Is this really true? (PerfMon shows the same thing, by the way...)

Code: Select all

[Rainmeter]
AccurateText=1
DynamicWindowSize=1
Update=1000

[MeasureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Percent=0
Name=Rainmeter

[MeasureVRAM]
Measure=Plugin
Plugin=UsageMonitor
Alias=VRAM
Percent=0
Name=Rainmeter

[MeasureVRAMShared]
Measure=Plugin
Plugin=UsageMonitor
Alias=VRAMSHARED
Percent=0
Name=Rainmeter

[MeterText]
Meter=String
SolidColor=0,0,0,255
FontColor=255,255,255,255
FontSize=16
Padding=8,8,8,8
X=0
Y=0
Text="Rainmeter: [MeasureGPU:2]%, [MeasureVRAM:]B, [MeasureVRAMShared:]B"
DynamicVariables=1
There are a few small parts of Rainmeter that do use GPU, most of them reference data allocated on your CPU so thus there is no memory on the GPU allocated for them.
buckb
Posts: 34
Joined: February 12th, 2018, 12:47 am

Re: UsageMonitor Discussions

buckb » June 1st, 2018, 7:24 pm

I have finally had a chance to experiment with the UsageMonitor plugin. Some testing led me to the following note in the Rainmeter documentation:
Note: Any Index which returns a current value of 0 will return an empty string as the string value. An instance without a value can't be sorted, and can't exist in this indexed list, as it is indistinguishable from all other instances that are 0.
If I understand correctly, the indexed list of counter instances maintained by the plugin does not include any counter instance whose current value is zero. So there is no way to distinguish between a non-existant instance of a counter, and a counter whose current value is zero? For example, using UsageMonitor alone, I cannot tell if a given program is running but currently using zero percent processor, versus not running at all?

If I am missing something, a *light* tap to the head would be appreciated.

--buckb
User avatar
jsmorley
Developer
Posts: 18088
Joined: April 19th, 2009, 11:02 pm
Location: Mt. Vernon, Virginia, USA

Re: UsageMonitor Discussions

jsmorley » June 1st, 2018, 8:42 pm

buckb wrote:I have finally had a chance to experiment with the UsageMonitor plugin. Some testing led me to the following note in the Rainmeter documentation:



If I understand correctly, the indexed list of counter instances maintained by the plugin does not include any counter instance whose current value is zero. So there is no way to distinguish between a non-existant instance of a counter, and a counter whose current value is zero? For example, using UsageMonitor alone, I cannot tell if a given program is running but currently using zero percent processor, versus not running at all?

If I am missing something, a *light* tap to the head would be appreciated.

--buckb
You can tell if a program is running by using the name of the program in Name, and getting the PID for it. If the PID is "0", it's not running.

You can using the program name in Name, and get the amount of CPU it is using, but as you say, that doesn't tell if it is just "parked" or "not running".
buckb
Posts: 34
Joined: February 12th, 2018, 12:47 am

Re: UsageMonitor Discussions

buckb » June 2nd, 2018, 12:22 am

jsmorley wrote:You can using the program name in Name, and get the amount of CPU it is using, but as you say, that doesn't tell if it is just "parked" or "not running".
Thanks for figuring out what I was getting at, despite my poor example. Allow me to try again with a real-world example.

I have a skin that uses PhysicalDisk counters. I find it useful to distinguish between removable drives that are "offline" (instance does not exist) versus "online" but with no data transfers occurring (counter values of zero). I had hoped to be able to do this using UsageMonitor alone.

If UsageMonitor could return all instances of a given counter, even for counters whose values are zero, then a skin could more easily build a list of online LogicalDisks or PhysicalDisks. Or obtain a list of all running processes. Or do something else useful based upon retrieving a list of all valid Instances for a given Category.


--buckb
rxtd
Posts: 43
Joined: April 30th, 2017, 11:51 am

Re: UsageMonitor Discussions

rxtd » August 1st, 2018, 10:07 pm

I have old skin that uses PerfMon plugin to read disk information. Particularly total disk transfer since last boot.
Using PerfMon it looks like this:

Code: Select all

[Measure]
Measure=Plugin
Plugin=PerfMon.dll
PerfMonObject=PhysicalDisk
PerfMonCounter="Disk Read Bytes/sec"
PerfMonInstance="_Total"
PerfMonDifference=0
Without "PerfMonDifference=0" perfmon gives me current value and with it — total since boot.

I can't find anything like it in the new UsageMonitor plugin. There is no "total read since boot" counter, there is no option in UsageMonitor plugin similar to "PerfMonDifference".
If I use "RawValue=1" with this counter then number value of measure is 0.

NomFerp plugin also had the ability to retrieve total value using "Mode=Normal".

Any help?
rxtd
Posts: 43
Joined: April 30th, 2017, 11:51 am

Re: UsageMonitor Discussions

rxtd » August 2nd, 2018, 2:59 am

Can blacklist be changed using bangs?
When I try to do it measure's values become 0.0/''.
Here is simple test skin:

Code: Select all

[test]
Measure=Plugin
Plugin=UsageMonitor
Category=PhysicalDisk
Counter=% Idle Time
Index=1
OnUpdateAction=[!SetOption test Blacklist "_Total|Idle|0 E:"]
;Blacklist=_Total|Idle|0 E:
DynamicVariables=1

[background]
meter=image
w=100
h=100
SolidColor=000000
If I remove ";" from "Blacklist" option and add it before "OnUpdateAction" option then everything works.