It is currently April 25th, 2024, 12:58 pm

Measuring GPU Utilization percentage not working as expected

Get help with creating, editing & fixing problems with skins
fu9ar
Posts: 4
Joined: April 6th, 2019, 6:15 pm

Measuring GPU Utilization percentage not working as expected

Post by fu9ar »

I'm using the UsageMonitor plugin. This is the relevant code.

Code: Select all

[measureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Percent=1

Code: Select all

[meterLabelGPU]
Meter=String
MeterStyle=styleLeftText
X=10
Y=98
W=190
H=14
Text=GPU Usage

[meterValueGPU]
Meter=String
MeterStyle=styleRightText
MeasureName=measureGPU
X=200
Y=0r
W=190
H=14
Text=%1%
Percentual=1

[meterBarGPU]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureGPU
X=10
Y=110
W=190
H=5
All I am getting for meterValueGPU is the string "Total" and I can't figure out how to get it to display the percentage. The thing that is boggling me is the bar meter properly displays the GPU usage, but the string does not.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Measuring GPU Utilization percentage not working as expected

Post by balala »

fu9ar wrote: April 6th, 2019, 6:19 pm All I am getting for meterValueGPU is the string "Total" and I can't figure out how to get it to display the percentage. The thing that is boggling me is the bar meter properly displays the GPU usage, but the string does not.
Replace the Text option of the [meterValueGPU] meter with the following one: Text=[MeasureGPU:], along with adding a DynamicVariables=1 option to the same meter.
You also can remove the MeasureName=measureGPU option from the [meterValueGPU] meter, because it's not needed anymore.
fu9ar
Posts: 4
Joined: April 6th, 2019, 6:15 pm

Re: Measuring GPU Utilization percentage not working as expected

Post by fu9ar »

That works, but it's a ridiculous floating point value. How do I make it show an integer value?

I tried NumOfDecimals, but it ignores that
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Measuring GPU Utilization percentage not working as expected

Post by jsmorley »

Code: Select all

[measureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
;Percent=1

[MeterGPU]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=[measureGPU:1]%
DynamicVariables=1
If you want an integer, (I wouldn't) use Text=[measureGPU:0]%

https://docs.rainmeter.net/manual/variables/section-variables/#MeasureParameters
fu9ar
Posts: 4
Joined: April 6th, 2019, 6:15 pm

Re: Measuring GPU Utilization percentage not working as expected

Post by fu9ar »

Thank you. Perfect.
You do not have the required permissions to view the files attached to this post.
Last edited by fu9ar on April 6th, 2019, 8:53 pm, edited 4 times in total.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Measuring GPU Utilization percentage not working as expected

Post by balala »

jsmorley wrote: April 6th, 2019, 8:46 pm

Code: Select all

[measureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
;Percent=1

[MeterGPU]
Meter=String
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=[measureGPU:1]%
DynamicVariables=1
https://docs.rainmeter.net/manual/variables/section-variables/#MeasureParameters
I just wrote my explanation when this was posted...
fu9ar
Posts: 4
Joined: April 6th, 2019, 6:15 pm

Re: Measuring GPU Utilization percentage not working as expected

Post by fu9ar »

Thank you both for your help.