It is currently April 24th, 2024, 7:14 pm

Need help with inaccurate CPU usage measures

Get help with creating, editing & fixing problems with skins
Nomad
Posts: 2
Joined: July 13th, 2017, 5:00 am

Need help with inaccurate CPU usage measures

Post by Nomad »

Hello community,

New member posting here for the first time...

I need help with one particular skin that I have been playing around with. The skin is called Seamod by Izzuthug.
I have attached a screenshot of my desktop for reference. The area I am concerned with is the CPU usage information.

1) The Top Process (in this case qbitorrent) reads as using 39% of CPU. Task Manger shows it only using 4.3%.

2) The overall CPU usage (Processor=0) is shown as 43%, and Task Manager shows 16%.

I can't see what is wrong with the code so any help would be greatly appreciated!

The code being used is as follows:

Under Measures:

Code: Select all

;---------------CPU------------


[CPU0]
Measure=CPU
Processor=0

[CPU1]
Measure=CPU
Processor=1

[CPU2]
Measure=CPU
Processor=2

[CPU3]
Measure=CPU
Processor=3

[CPU4]
Measure=CPU
Processor=4

[TOPname]
Measure=Plugin
Plugin=AdvancedCPU
CPUExclude=Idle
TopProcess=2

[TOP%]
Measure=Plugin
Plugin=AdvancedCPU
CPUExclude=Idle
TopProcess=1
Under Meters:

Code: Select all

[mTopProcess%]
Meter=String
MeasureName=TOP%
FontFace=Sony Sketch EF
X=65
Y=155
W=80
H=15
AntiAlias=1
AutoScale=1
Percentual=1
NumOfDecimals=0
FontSize=#fsize1#
FontColor=#fcolor2#
StringAlign=Right
Postfix=%


[mTopProcess]
Meter=String
MeasureName=TOPname
FontFace=Sony Sketch EF
X=65
Y=155
W=90
H=15
AntiAlias=1
ClipString=1
FontSize=#fsize1#
FontColor=#fcolor#

[mCPU0text]
Meter=String
FontFace=Sony Sketch EF
X=30
Y=170
W=80
H=15
AntiAlias=1
FontSize=#fsize1#
FontColor=#fcolor#
Text=CPU:

[mCPU0]
Meter=String
MeasureName=CPU0
FontFace=Sony Sketch EF
X=75
Y=170
W=80
H=15
AntiAlias=1
FontSize=#fsize1#
FontColor=#fcolor2#
Postfix=%
Note my processor is a quad core AMD A8-7410 APU (AMD Radeon R5 Graphics) 2.20 GHz
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16167
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help with inaccurate CPU usage measures

Post by balala »

Nomad wrote:1) The Top Process (in this case qbitorrent) reads as using 39% of CPU. Task Manger shows it only using 4.3%.
The help page of the AdvancedCPU plugin says
The value is a calculation of process CPU time scaled by the number of CPU cores.
To make the code to show the proper values, you have to add the following measure to your code:

Code: Select all

[MeasureCPUMax]
Measure=Plugin
Plugin=AdvancedCPU
then add the following two options to the [TOP%] measure:

Code: Select all

[TOP%]
...
MaxValue=[MeasureCPUMax]
DynamicVariables=1
Leave untouched all other options of the measure.
Nomad wrote:2) The overall CPU usage (Processor=0) is shown as 43%, and Task Manager shows 16%.
This part of the code is working well for me and I don't see anything in the posted code which could explain those exaggerated values. Sorry, but here I can't help.
Nomad
Posts: 2
Joined: July 13th, 2017, 5:00 am

Re: Need help with inaccurate CPU usage measures

Post by Nomad »

Thank you balala for your response. To confirm, i've added the following code as you suggested. Under measures it now reads:

Code: Select all

[MeasureCPUMax]
Measure=Plugin
Plugin=AdvancedCPU

[CPU0]
Measure=CPU
Processor=0

[CPU1]
Measure=CPU
Processor=1

[CPU2]
Measure=CPU
Processor=2

[CPU3]
Measure=CPU
Processor=3

[CPU4]
Measure=CPU
Processor=4

[TOPname]
Measure=Plugin
Plugin=AdvancedCPU
CPUExclude=Idle
TopProcess=2

[TOP%]
Measure=Plugin
Plugin=AdvancedCPU
CPUExclude=Idle
TopProcess=1
MaxValue=[MeasureCPUMax]
DynamicVariables=1
The Top Process CPU usage has dropped dramatically. Compared to what Task Manager is showing, however, the measure reading is now almost identical to the average/overall CPU usage, rather than the Top Process.
User avatar
balala
Rainmeter Sage
Posts: 16167
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Need help with inaccurate CPU usage measures

Post by balala »

Nomad wrote:The Top Process CPU usage has dropped dramatically. Compared to what Task Manager is showing, however, the measure reading is now almost identical to the average/overall CPU usage, rather than the Top Process.
As far as I can tell, for me it's working well, showing approximately the same value as on Task Manager.