My main use of rainmeter is to display top cpu usage process with percentage. I am newbie in rainmeter language but I have concluded to a final script that suits me. My problem is that I cannot exclude the rainmeter process from the cpu readings. I have used the lines in my code but they definitely not working
[Rainmeter]
Update=1000
MiddleMouseUpAction=[!Refresh]
DynamicWindowSize=1
AccurateText=1
[Variables]
TextName=Tahoma
TextColor=255,255,255,255
TextColorShadow=0,0,0,255
BGColor=0,0,0,1
TextSize=12
TextScale=1.65
;Increase this number to increase the number of decimals
;in the display of each processes usage. Valid ranges are
;0 and above. No negative numbers.
DecimalAccuracy=2
;The Buffer is the number of pixels worth of padding
;to be added around all sides of each line of text.
;A larger Buffer will mean more spacing between lines
;of text.
Buffer=4
;=== Styles ===;
[sProcess]
X=r
Y=R
H=(#TextSize# * #TextScale#)
Padding=#Buffer#,#Buffer#,#Buffer#,#Buffer#
StringEffect=Shadow
StringAlign=LeftCenter
StringCase=Proper
FontSize=#TextSize#
FontFace=#TextName#
FontColor=#TextColor#
FontEffectColor=#TextColorShadow#
SolidColor=#BGColor#
NumOfDecimals=#DecimalAccuracy#
AntiAlias=1
;=== Measure Max CPU ===;
[mGetMaxCPU]
Measure=Plugin
Plugin=AdvancedCPU
;This grabs the total CPU usage (100%) for use late
;=== Measure Top Process 1 ===;
[mGetTopName_1]
Measure=Plugin
Plugin=AdvancedCPU
CPUExclude=Idle
TopProcess=2
[mGetTopPerc_1]
Measure=Plugin
Plugin=AdvancedCPU
TopProcess=1
CPUExclude=Idle
IfCondition=(#CURRENTSECTION# = 0)
IfTrueAction=[!HideMeter "TopProc_1"][!UpdateMeter "TopProc_1"][!Redraw]
IfFalseAction=[!ShowMeter "TopProc_1"][!UpdateMeter "TopProc_1"][!Redraw]
[mCalcTopPerc_1]
Measure=Calc
Formula=Round((([mGetTopPerc_1] / [mGetMaxCPU]) * 100),#DecimalAccuracy#)
DynamicVariables=1
;Divides current process usage by max CPU usage, scales it by 100 and
;rounds it to the nearest decimal place as determine by the Decimal
;Accuracy variable where a higher number = more decimals.
;=== Display Top Process 1 ===;
[TopProc_1]
Meter=String
MeterStyle=sProcess
MeasureName=mGetTopName_1
MeasureName2=mCalcTopPerc_1
X=0
Y=((#TextSize# * 0.5) + #Buffer#)
Text="%1 (%2%)"
So I need help to exclude above processes from the script.
Also please confirm that on WIN10 x64, its normal for the rainmeter to constantly use 1-2% of CPU
Also please confirm that on WIN10 x64, its normal for the rainmeter to constantly use 1-2% of CPU
How much CPU Rainmeter uses depends on what skins are loaded. You'll hardly notice a simple little skin like this but if you use some fancy Spectrum Analyzer with Update=32 you can expect to use 30% or maybe even more depending on your processor.
Last edited by Mordasius on September 18th, 2019, 9:18 am, edited 1 time in total.
I recommend not to use the AdvancedCPU plugin, because it is deprecated. Instead use the newer UsageMonitor plugin. It's much more versatile.
However if you still want to try the AdvancedCPU plugin, add Rainmeter to the CPUExclude option, as it follows: CPUExclude=Idle;Rainmeter.
How much CPU Rainmeter itself uses will vary a huge amount, depending on two things. How powerful your CPU is to start with, and how many and what kind of skins you have loaded and running.
I have a decently hefty PC, with an 8-core / 16-thread AMD Ryzen 2700X CPU, and a pretty recent nVIDIA 1660 ti GPU sharing the load, and even with 20+ skins running, Rainmeter uses about 0.1%-0.2% of total CPU. Pretty much nothing really. When I had an older machine with an older AMD CPU, it used to take 2.0%-4.0% with pretty much the same skins. Still not much, but the faster CPU and some offloading of cycles to a decent GPU via hardware acceleration certainly makes a difference.
One thing I don't do is use any "music visualizer" skins, which by their nature use a lot of CPU.
So it's hard to quantify. Your mileage will vary...
Here are my percentages, but as I understand the same window that meters rainmeter consumption, actually makes rainmeter use a bit more as its foremost. (I don't know why it got so big in the attachment
rmtr cpu.png
You do not have the required permissions to view the files attached to this post.
Certainly that RainmeterProcess skin will use a tiny, tiny bit of CPU in and of itself, but of course you won't be running that all the time.
There is actually no way to monitor your CPU use without the act of monitoring it using some CPU. Running TaskManager, or ProcessExplorer or whatever you want to use to see what it going on will in and of themselves use a bit of CPU. This Rainmeter skin is actually one of lightest ways I can think of to do this. You already have whatever overhead Rainmeter is using in the mix, and this single skin will use so little extra CPU that it will round to zero.
Thank you for your reply. I had CPU problems only during first post as I was using an outdated script language. After Mordasius' reply my little skin works pretty well, excludes processes I choose and use absolute minimal cpu cycles. I have to study it a bit to display 2nd cpu usage process and top network usage process...
Take a look at the manual section on Usage Monitor for an explanation of what Alias=CPU and Index=1 or Index=2 do in the measures.
And then take a look at Measure Parameters for for an explanation of how Text=%1 [mProcess1:#DecimalAccuracy#]% shows both the string value and the numeric value of the measure mProcess1