As the title says, I think the CPU usage for my Rainmeter skin is incorrect. I've tried several different skins but they're all displaying the same thing which is much higher than the reported CPU usage in my Windows Task Manager.
Right now I'm looking at 25% in Rainmeter while Task Manager is reporting only 11%.
Why the disparity?
It is currently March 29th, 2024, 3:53 pm
I believe my skin(s) are showing incorrect CPU usage
-
- Posts: 3
- Joined: December 29th, 2015, 12:17 am
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: I believe my skin(s) are showing incorrect CPU usage
One thing I have found is that if a skin measures a particular core of the CPU, as in:
[MeasureCPU]
Measure=CPU
Processor=1
That that can give somewhat misleading results. Any particular core can be using a much higher percentage of its own individual capabilities than the overall CPU use, which is what something like TaskManager is really showing.
So you might check that you are using something like:
[MeasureCPU]
Measure=CPU
Processor=0
If you continue to get strange results from Measure=CPU, you might consider the AdvancedCPU plugin.
https://docs.rainmeter.net/manual-beta/plugins/advancedcpu/
[MeasureCPU]
Measure=CPU
Processor=1
That that can give somewhat misleading results. Any particular core can be using a much higher percentage of its own individual capabilities than the overall CPU use, which is what something like TaskManager is really showing.
So you might check that you are using something like:
[MeasureCPU]
Measure=CPU
Processor=0
If you continue to get strange results from Measure=CPU, you might consider the AdvancedCPU plugin.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasureCPUMax]
Measure=Plugin
Plugin=AdvancedCPU
[MeasureCPU]
Measure=Plugin
Plugin=AdvancedCPU
CPUExclude=Idle
MaxValue=[MeasureCPUMax]
DynamicVariables=1
[MeterCPU]
Meter=String
MeasureName=MeasureCPU
FontSize=20
FontColor=255,255,255,255
Percentual=1
AntiAlias=1
Text=%1 %
-
- Posts: 3
- Joined: December 29th, 2015, 12:17 am
Re: I believe my skin(s) are showing incorrect CPU usage
Thanks, I'm getting a much more accurate readout now.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: I believe my skin(s) are showing incorrect CPU usage
Great. Which solution did you end up with?
-
- Posts: 3
- Joined: December 29th, 2015, 12:17 am
Re: I believe my skin(s) are showing incorrect CPU usage
I used AdvancedCPU. It's not perfect but it's more accurate than before.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasureCPUMax]
Measure=Plugin
Plugin=AdvancedCPU
[Metadata]
Name=
Config=
Description=
Instructions=
Version=
Tags=
License=
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
BarColor=255, 255, 255
BarBack=255, 255, 255, 50
FontName=Trebuchet MS
FontColor=255, 255, 255, 160
FontHeight=12
AntiAlias=1
[MeasureCPU]
Measure=Plugin
Plugin=AdvancedCPU
CPUExclude=Idle
MaxValue=[MeasureCPUMax]
DynamicVariables=1
[MeterPercent]
Meter=STRING
MeasureName=MeasureCPU
X=195
Y=40
StringAlign=RIGHT
FontColor=#FontColor#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
Text="%1%"
Percentual=1
AutoScale=1
[MeterCPULabel]
Meter=STRING
Text="CPU"
X=7
Y=0
FontColor=#FontColor#
FontSize=#FontHeight#
FontFace=#FontName#
AntiAlias=1
[MeterBar]
MeasureName=MeasureCPU
Meter=BAR
X=10
Y=25
W=180
H=5
BarOrientation=HORIZONTAL
BarColor=#BarColor#
[BarLine]
Meter=IMAGE
X=10
Y=30
W=180
H=5
SolidColor=#BarBack#
-
- Posts: 4
- Joined: March 23rd, 2018, 2:51 am
Re: I believe my skin(s) are showing incorrect CPU usage
I have a similar issue with a skin I'm using but am unable to code it correctly, would you be able to take a look at it for me.
I've added Update=500 and changed it to monitor Processor=0.
All help appreciated
Code: Select all
[Rainmeter]
Author=Media Maggot | Daelnz
MiddleMouseDownAction=[!WriteKeyValue Variables Colour1 #Colour2#][!WriteKeyValue Variables Colour2 #Colour3#][!WriteKeyValue Variables Colour3 #Colour1#][!Refresh]
Update=500
[Metadata]
Name=CPU Display (1 Core)
Information=Displays the current usage of the CPU (1 Core) | Middle Mouse Button changes the colour
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=1.2.0
[Variables]
Colour1=Orange
Colour2=Blue
Colour3=Red
[MeterBorder]
Meter=image
imagename=#@#\images\CPU\1#Colour1#.png
antialias=1
[MeasureCore1]
Measure=CPU
Processor=0
;Bars=======================
[MeasureForBarCore1]
measure=calc
formula=((ROUND(measurecore1/10))/10)
[Meter1CoreBar1]
Meter=Bar
measurename=MeasureForBarCore1
barimage=#@#\images\CPU\1 Core CPU Bar #Colour1#.png
x=0
y=0
antialias=1
All help appreciated
-
- Posts: 2
- Joined: December 10th, 2020, 11:33 am
Re: I believe my skin(s) are showing incorrect CPU usage
Hi, I am experiencing the same problem. I tried the code that was here but it still doesnt meet the acurassi that I wish of. If someone can help I will be glad to hear what you think.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: I believe my skin(s) are showing incorrect CPU usage
The issue with measuring CPU usage is that any measurement is a snapshot of a moment in time. If you use these two measures:DaFlyingDuchman wrote: ↑December 10th, 2020, 12:45 pm Hi, I am experiencing the same problem. I tried the code that was here but it still doesnt meet the acurassi that I wish of. If someone can help I will be glad to hear what you think.
Code: Select all
[MeasureCPUUsageMonitor]
Measure=Plugin
Plugin=UsageMonitor
Alias=CPU
Index=0
[MeasureCPU]
Measure=CPU
Focusing on the exact amount of CPU being used at any given time is a fool's errand in my view. CPU usage changes every millisecond or less, and can wildly swing from one millisecond to the next. What you want to monitor CPU usage for is watching for a trend of a particular process using more resources than you think it should. You want to be watching the CPU levels to see if it is consistently high, not if it is high or low at any given second.
-
- Posts: 2
- Joined: December 10th, 2020, 11:33 am
Re: I believe my skin(s) are showing incorrect CPU usage
Thanks for the reply! OK I will try it!
-
- Posts: 49
- Joined: December 16th, 2020, 8:30 am
- Location: Switzerland
Re: I believe my skin(s) are showing incorrect CPU usage
Hi i was strugeling with this for a some time
since neither of these codes
gave me the same numbers that perfmon did. bouth values seem to be all over the place.
The Alias=CPU uses the counter % Processor Time which returns, idel time of processes on the processor.
I found that this code returns much better result, as it returns the same values then Perfom displays.
I dont know why there needs to be a divider, but it seems to be linked to the nummer of cores, so if one can test this code on a system with more then 4 cores would be great.
since neither of these codes
Code: Select all
[MeasureCPUUsageMonitor]
Measure=Plugin
Plugin=UsageMonitor
Alias=CPU
Index=0
[MeasureCPU]
Measure=CPU
The Alias=CPU uses the counter % Processor Time which returns, idel time of processes on the processor.
I found that this code returns much better result, as it returns the same values then Perfom displays.
Code: Select all
[MeasureProcessorInformationProcessorTime]
Measure=Plugin
Plugin=UsageMonitor
Category=Processor Information
Counter=% Processor Utility
Index=0
[CalcProcessorInformationProcessorTime]
Measure=Calc
Formula=(MeasureProcessorInformationProcessorTime)/5