It is currently March 29th, 2024, 12:30 pm

Advanced CPU monitoring [UPDATED 22/10/18]

Skins that monitor system information
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Advanced CPU monitoring

Post by balala »

kyriakos876 wrote: October 21st, 2018, 8:28 pm I can pull the minimum temperature from the Core temp software, then I can put it in a variable.
Now let's assume the minimum temperature returned is 20. We don't know the scale. Just the number.
Put that in a variable MinimumTemp=20
That number can only be Celsius or Fahrenheit.
If the scale is Fahrenheit it means it's -6,6 degrees Celsius which is impossible (for a normal setup), thus it's Celsius.
Ok, post a sample code if you have one, please. I'm curious how do you get it working...
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Advanced CPU monitoring

Post by kyriakos876 »

balala wrote: October 21st, 2018, 8:37 pm Ok, post a sample code if you have one, please. I'm curious how do you get it working...
Turns out I couldn't pull the minimum value using the plugin so I changed it to pulling the TjMax.... When you use Celsius TjMax is 100 and when you use Fahrenheit it's 212. Try this and tell me if it works.

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,255
DynamicWindowSize=1

[MeasureMax]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=TjMax
CoreTempIndex=0
IfCondition=#CurrentSection# = 100
IfTrueAction=[!SetOption MeterScale Text "CoreTemp is displaying Celsius."]
IfCondition2=#CurrentSection# = 212
IfTrueAction2=[!SetOption MeterScale Text "CoreTemp is displaying Fahrenheit."]
IfCondition3=(#CurrentSection# = 100) || (#CurrentSection# = 212)
IfFalseAction3=[!SetOption MeterScale Text "CoreTemp is not running."]

[MeterScale]
Meter=String
Text=
FontColor=255,255,255
AntiAlias=1
DynamicVariables=1
That way I can even check if CoreTemp is running and warn the user if it's not.

EDIT: Little did I know that this is not the case for everyone.... I read here that TjMax varies with processors... Well I guess I'll have to figure another way or check what are the possible TjMax for all the processors... if it's like 3-4 or different possibilities I can do the same and implement those too in the if conditions.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Advanced CPU monitoring

Post by kyriakos876 »

I did a quick research and found out that most CPU's have TjMax under 120 which is extreme. So this should be pretty accurate try it and let me know how it worked:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,255
DynamicWindowSize=1

[MeasureMax]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=TjMax
CoreTempIndex=0
IfCondition=(#CurrentSection# < 170) && (#CurrentSection# > 0)
IfTrueAction=[!SetOption MeterScale Text "CoreTemp is displaying Celsius."]
IfCondition2=#CurrentSection# >= 170
IfTrueAction2=[!SetOption MeterScale Text "CoreTemp is displaying Fahrenheit."]
IfCondition3=MeasureMax = 0
IfTrueAction3=[!SetOption MeterScale Text "CoreTemp is not running."]

[MeterScale]
Meter=String
Text=
FontColor=255,255,255
AntiAlias=1
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Advanced CPU monitoring

Post by balala »

kyriakos876 wrote: October 21st, 2018, 9:18 pm I did a quick research and found out that most CPU's have TjMax under 120 which is extreme. So this should be pretty accurate try it and let me know how it worked:
For me at least, both codes are working well, showing up the correct scale. However as yourself said, I'm not sure if this method will work for everyone. For me it does. :thumbup:
And just a small inconsequence I'd fix in the last code: if in the IfCondition and IfCondition2 options you've used the #CurrentSection# variable, use it into IfCondition3 as well. That's why I'd replace the IfCondition3=MeasureMax = 0 option with IfCondition3=#CurrentSection# = 0. Definitely not something which impedes the skin to work properly, but just to be consequent with yourself.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Advanced CPU monitoring

Post by kyriakos876 »

balala wrote: October 22nd, 2018, 1:06 pm For me at least, both codes are working well, showing up the correct scale. However as yourself said, I'm not sure if this method will work for everyone. For me it does. :thumbup:
And just a small inconsequence I'd fix in the last code: if in the IfCondition and IfCondition2 options you've used the #CurrentSection# variable, use it into IfCondition3 as well. That's why I'd replace the IfCondition3=MeasureMax = 0 option with IfCondition3=#CurrentSection# = 0. Definitely not something which impedes the skin to work properly, but just to be consequent with yourself.
There first code happened to work by luck then. The second one should be pretty accurate.
As for the in-consequence, yea I missed that one by accident. In my actual code all are #CurrentSection#.
Glad the second works as well.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Advanced CPU monitoring

Post by balala »

kyriakos876 wrote: October 22nd, 2018, 1:36 pm Glad the second works as well.
As I said both are working.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Advanced CPU monitoring [UPDATED 22/10/18]

Post by kyriakos876 »

New version 22.10.2018 fixing many issues updated on the first post.
+ additions such as: Infinite scrolling for when you have too many cores for your screens height*
Last edited by kyriakos876 on October 22nd, 2018, 5:20 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Advanced CPU monitoring [UPDATED 22/10/18]

Post by balala »

kyriakos876 wrote: October 22nd, 2018, 5:06 pm New version 22.10.2018 fixing many issues updated on the first post.
Ok, it works well and it follows the settings of CoreTemp, related to the temperature scale.
One single update I'd do: I'd change the numbering of cores, to start it from 1, not from 0, as it is now. I know the CoreTemp plugin uses the numbering so, but in my opinion would be more expresive to have numbered those cores from 1.
User avatar
kyriakos876
Posts: 919
Joined: January 30th, 2017, 2:01 am
Location: Greece

Re: Advanced CPU monitoring [UPDATED 22/10/18]

Post by kyriakos876 »

balala wrote: October 22nd, 2018, 5:20 pm Ok, it works well and it follows the settings of CoreTemp, related to the temperature scale.
One single update I'd do: I'd change the numbering of cores, to start it from 1, not from 0, as it is now. I know the CoreTemp plugin uses the numbering so, but in my opinion would be more expresive to have numbered those cores from 1.
I've done this on purpose because most monitoring software I've user, names the first core "0".
Even windows in task manager (See the tool tip on the first core of the picture below)
Core0.png
I will add an option that can change the name of the first core though, for people that prefer it. :D
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Advanced CPU monitoring [UPDATED 22/10/18]

Post by balala »

kyriakos876 wrote: October 22nd, 2018, 5:26 pm I will add an option that can change the name of the first core though, for people that prefer it. :D
It definitely is up to you, as the author, but me personally at least, would prefer the numbering starting from 1.