It is currently October 21st, 2021, 3:38 pm

Help with GPU usage % and CPU temps please

Help with creating, editing & fixing problems with skins
CMV
Posts: 2
Joined: September 14th, 2021, 2:41 pm

Help with GPU usage % and CPU temps please

Post by CMV »

I have a couple things I'd like to fix/do with rainmeter and am a bit lost. If possible, I would like to display core temp (or some other CPU temp monitor) into the skin. As I have it today, I have a core temp window next to rainmeter skin but would prefer that all n the rainmeter skin. Secondly, I can't seem to get the GPU usage % to display. The bar moves and is accurate, but the percent stays at 0% - anything I try to do to fix that changes 0% to the word TOTAL. Any help is appreciated - I am a novice with this so talk to me like i'm 6 :)

Image

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=System
Author=poiru
Information=Displays basic system stats.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[MeasureCPU1]
Measure=CPU
Processor=1

[MeasureCPU2]
Measure=CPU
Processor=2

[MeasureCPU3]
Measure=CPU
Processor=3

[MeasureCPU4]
Measure=CPU
Processor=4

[MeasureCPU5]
Measure=CPU
Processor=5

[MeasureCPU6]
Measure=CPU
Processor=6

[MeasureCPU7]
Measure=CPU
Processor=7

[MeasureCPU8]
Measure=CPU
Processor=8

[MeasureCPU9]
Measure=CPU
Processor=9

[MeasureCPU10]
Measure=CPU
Processor=10

[MeasureCPU11]
Measure=CPU
Processor=11

[MeasureCPU12]
Measure=CPU
Processor=12

[MeasureCPU13]
Measure=CPU
Processor=13

[MeasureCPU14]
Measure=CPU
Processor=14

[MeasureCPU15]
Measure=CPU
Processor=15

[MeasureCPU16]
Measure=CPU
Processor=16


[measureRAM]
; Returns the amount of RAM used in bytes.
Measure=PhysicalMemory
UpdateDivider=20
; UpdateDivider sets the rate at which the value of the measure is updated. It is
; calculated as follows: UpdateDivider x Update. In this case, Update is set to
; 1000 milliseconds (in the [Rainmeter] section). 1000 x 20 = 20000 ms or 20 seconds.

[measureSWAP]
; Returns the amount of SWAP (pagefile) used in bytes.
Measure=SwapMemory
UpdateDivider=20

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

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=System
; Even though the text is set to System, Rainmeter will display
; it as SYSTEM, because styleTitle contains StringCase=Upper.
LeftMouseUpAction=["taskmgr.exe"]
; Left-clicking this meter will launch taskmgr.exe (the Task Manager).
ToolTipText=Open Task Manager
; Hovering over this meter will display a tooltip with the text above.

[meterLabelCPU1]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text="CPU1 Usage"

[meterValueCPU1]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU1
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU1]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU1
X=10
Y=12r
W=190
H=1

[meterLabelCPU2]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text="CPU2 Usage"

[meterValueCPU2]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU2
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU2]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU2
X=10
Y=12r
W=190
H=1

[meterLabelCPU3]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text="CPU3 Usage"

[meterValueCPU3]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU3
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU3]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU3
X=10
Y=12r
W=190
H=1

[meterLabelCPU4]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=100
W=190
H=14
Text="CPU4 Usage"

[meterValueCPU4]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU4
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU4]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU4
X=10
Y=12r
W=190
H=1

[meterLabelCPU5]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=120
W=190
H=14
Text="CPU5 Usage"

[meterValueCPU5]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU5
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU5]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU5
X=10
Y=12r
W=190
H=1

[meterLabelCPU6]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=140
W=190
H=14
Text="CPU6 Usage"

[meterValueCPU6]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU6
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU6]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU6
X=10
Y=12r
W=190
H=1

[meterLabelCPU7]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=160
W=190
H=14
Text="CPU7 Usage"

[meterValueCPU7]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU7
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU7]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU7
X=10
Y=12r
W=190
H=1

[meterLabelCPU8]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=180
W=190
H=14
Text="CPU8 Usage"

[meterValueCPU8]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU8
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU8]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU8
X=10
Y=12r
W=190
H=1

[meterLabelCPU9]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=200
W=190
H=14
Text="CPU9 Usage"

[meterValueCPU9]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU9
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU9]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU9
X=10
Y=12r
W=190
H=1

[meterLabelCPU10]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=220
W=190
H=14
Text="CPU10 Usage"

[meterValueCPU10]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU10
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU10]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU10
X=10
Y=12r
W=190
H=1

[meterLabelCPU11]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=240
W=190
H=14
Text="CPU11 Usage"

[meterValueCPU11]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU11
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU11]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU11
X=10
Y=12r
W=190
H=1

[meterLabelCPU12]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=260
W=190
H=14
Text="CPU12 Usage"

[meterValueCPU12]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU12
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU12]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU12
X=10
Y=12r
W=190
H=1

[meterLabelCPU13]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=280
W=190
H=14
Text="CPU13 Usage"

[meterValueCPU13]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU7
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU13]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU13
X=10
Y=12r
W=190
H=1

[meterLabelCPU14]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=300
W=190
H=14
Text="CPU14 Usage"

[meterValueCPU14]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU14
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU14]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU14
X=10
Y=12r
W=190
H=1

[meterLabelCPU15]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=320
W=190
H=14
Text="CPU15 Usage"

[meterValueCPU15]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU15
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU15]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU15
X=10
Y=12r
W=190
H=1

[meterLabelCPU16]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=340
W=190
H=14
Text="CPU16 Usage"

[meterValueCPU16]
Meter=STRING
MeterStyle=styleRightText
MeasureName=measureCPU16
X=200
Y=0r
W=190
H=14
Text="%1%"

[meterBarCPU16]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureCPU16
X=10
Y=12r
W=190
H=1

[meterLabelRAM]
Meter=String
MeterStyle=styleLeftText
X=10
Y=360
W=190
H=14
Text=RAM Usage

[meterValueRAM]
Meter=String
MeterStyle=styleRightText
MeasureName=measureRAM
X=200
Y=0r
W=190
H=14
Text=%1%
Percentual=1
; Percentual=1 needs to be added her because measureRAM returns the amount
; of RAM used in bytes. Using Percentual=1 will convert that into a percentual value.

[meterBarRAM]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureRAM
X=10
Y=12r
W=190
H=1

[meterLabelSWAP]
Meter=String
MeterStyle=styleLeftText
X=10
Y=380
W=190
H=14
Text=SWAP Usage

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

[meterBarSWAP]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureSWAP
X=10
Y=12r
W=190
H=1

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

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

[meterBarGPU]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureGPU
X=10
Y=12r
W=190
H=5
User avatar
balala
Rainmeter Sage
Posts: 13334
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with GPU usage % and CPU temps please

Post by balala »

CMV wrote: September 14th, 2021, 2:52 pm Secondly, I can't seem to get the GPU usage % to display. The bar moves and is accurate, but the percent stays at 0% - anything I try to do to fix that changes 0% to the word TOTAL. Any help is appreciated - I am a novice with this so talk to me like i'm 6 :)
You have to add a DynamicVariables=1 option to the [meterValueGPU] measure, because it uses a section variable ([measureGPU]) and this requires to set on the dynamic variables. However to get displayed correctly the percenatge you have to modify the Text option of the same [meterValueGPU] meter. The [measureGPU] section variable (as it is used) returns the string value of the measure, but in this case you need its numeric value. So replace the above Text option with tomething like this: Text=[measureGPU:1]%. Note here that the number used after the colon indicates the number of decimals. Modify it if needed (0 permited if you want no decimals).
CMV
Posts: 2
Joined: September 14th, 2021, 2:41 pm

Re: Help with GPU usage % and CPU temps please

Post by CMV »

Thank you. That fixed it :)
User avatar
balala
Rainmeter Sage
Posts: 13334
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with GPU usage % and CPU temps please

Post by balala »

CMV wrote: September 14th, 2021, 3:37 pm Thank you. That fixed it :)
Great.
As related to your first question:
CMV wrote: September 14th, 2021, 2:52 pm If possible, I would like to display core temp (or some other CPU temp monitor) into the skin. As I have it today, I have a core temp window next to rainmeter skin but would prefer that all n the rainmeter skin.
Definitely possible, but unfortunately you have to use an application. For instance Core Temp (has to be installed) and the appropriate plugin.
If you can't deal with them, later I'm gonna post an example (if someone else doesn't do it in meantime), but unfortunately right now have no enough time (sorry...).
User avatar
balala
Rainmeter Sage
Posts: 13334
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with GPU usage % and CPU temps please

Post by balala »

To measure the temperatures of cores, add the following measures to you code:

Code: Select all

[MeasureCore1Temp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=0
MinValue=0
MaxValue=100

[MeasureCore2Temp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=1
MinValue=0
MaxValue=100

[MeasureCore3Temp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=2
MinValue=0
MaxValue=100

[MeasureCore4Temp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=3
MinValue=0
MaxValue=100

...
Add further such measures, one for each core you'd like to measure the temperature to (so a total of 16). Modify the names of the measures and their CoreTempIndex options.
To can see the measured temperatures, for first we'll modify the existing [meterValueCPU1] - [meterValueCPU16] string meters, to show not the CPU usages, but the temperatures. We do this only for testing, if everything proofs to be alright, will modify them back and will add the temperatures as well.
So replace the MeasureName options of these meters ([meterValueCPU1] - [meterValueCPU16]) with MeasureName=MeasureCore1Temp - MeasureName=MeasureCore16Temp and their Text options with Text=%1[\x00B0].
Is this alright? Does the skin properly show the temperatures?