It is currently April 26th, 2024, 8:06 pm

Rainmeter 4: how to show all cores plus HT?

Get help with creating, editing & fixing problems with skins
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Rainmeter 4: how to show all cores plus HT?

Post by anbr07 »

Hi!

How can i change the default Rainmeter's CPU usage to show all 8 cores of my i7, 4 normal cores, plus those 4 of the hyperthreading? Thanks!
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter 4: how to show all cores plus HT?

Post by balala »

anbr07 wrote:Hi!

How can i change the default Rainmeter's CPU usage to show all 8 cores of my i7, 4 normal cores, plus those 4 of the hyperthreading? Thanks!
I'm not sure I understood well, but if you'd like to add to the "default" illustro skin some meters to show the CPU usage on those cores, you'll have to:
1. Replace the [measureCPU] measure with the following ones:

Code: Select all

[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
Each of this measure will return the appropriate core usage.
2. Then replace the [meterLabelCPU], [meterValueCPU] and [meterBarCPU] meters with the followings:

Code: Select all

[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
3. And just to not overlap the meters showing the RAM and the SWAP, replace the Y options of the appropriate meters with the following values:

Code: Select all

[meterLabelRAM]
...
Y=200

[meterValueRAM]
...
Y=0r

[meterBarRAM]
...
Y=12r

[meterLabelSWAP]
...
Y=220

[meterValueSWAP]
...
Y=0r

[meterBarSWAP]
...
Y=12r
Please let me know if this is what you wanted, because I'm not sure I understood precisely.
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: Rainmeter 4: how to show all cores plus HT?

Post by anbr07 »

Hey, that's much better already. Is there any way to have graphs (like a time window of 2 minutes) for every core? Ideally, the layout would be core 1-4 on the left side, then a gap, then cores 5-8 on the right side. Also, the graphs are now appearing as underlinings of "Core 1", "Core 2" etc. (i have changed that bit to "Core"), instead of appearing behind the labels. But it's much better, already, thank you!
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: Rainmeter 4: how to show all cores plus HT?

Post by anbr07 »

Yet another problem, Core 3 always shows a bar of the same length, even though the percentage changes. As i compared to the other entries, i don't see the reason why.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter 4: how to show all cores plus HT?

Post by balala »

anbr07 wrote:Is there any way to have graphs (like a time window of 2 minutes) for every core? Ideally, the layout would be core 1-4 on the left side, then a gap, then cores 5-8 on the right side.
I think you'll have to use some Line meters, instead of those bars: replace the [meterLabelCPU1], [meterValueCPU1], [meterBarCPU1] - [meterLabelCPU8], [meterValueCPU8], [meterBarCPU8] meters with the following two:

Code: Select all

[MeterCPU14]
Meter=LINE
MeasureName=MeasureCPU1
MeasureName2=MeasureCPU2
MeasureName3=MeasureCPU3
MeasureName4=MeasureCPU4
X=6
Y=20
W=89
H=40
LineCount=4
LineColor=#Color1#
LineColor2=#Color2#
LineColor3=#Color3#
LineColor4=#Color4#
AntiAlias=1
HorizontalLines=1

[MeterCPU58]
Meter=LINE
MeasureName=MeasureCPU5
MeasureName2=MeasureCPU6
MeasureName3=MeasureCPU7
MeasureName4=MeasureCPU8
X=6R
Y=0r
W=89
H=40
LineCount=4
LineColor=#Color1#
LineColor2=#Color2#
LineColor3=#Color3#
LineColor4=#Color4#
AntiAlias=1
HorizontalLines=1
In this meters, Color1 - Color4 are the four colors you want to use to those lines. In the [Variables] section you'll have to declare them:

Code: Select all

[Variables]
...
Color1=255,242,0
Color2=0,211,122
Color3=255,0,0
Color4=25,63,209
Be careful to not remove none of the existing variables.
Obviously if you want, you can use different colors for the second meter. In this case, you'll have to declare four other colors (as Color5 - Color8) and use them in [MeterCPU58]:

Code: Select all

[MeterCPU58]
...
LineColor=#Color5#
LineColor2=#Color6#
LineColor3=#Color7#
LineColor4=#Color8#
Now if you find this good enough, will have to put the labels. Please let me know how would you like to place them.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter 4: how to show all cores plus HT?

Post by balala »

anbr07 wrote:Yet another problem, Core 3 always shows a bar of the same length, even though the percentage changes. As i compared to the other entries, i don't see the reason why.
You mean that the length of the Core 3 bar is never changing?
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: Rainmeter 4: how to show all cores plus HT?

Post by anbr07 »

Now i have changed everything, but instead of having 8 different line meters separately (grouped 4 left, 4 right), they are all stacked, like this:

Image

Also, they can all have the same color, like white, when arranged separately. Maybe i should post all the code i have, so far (i will be back late at night, so in won't answer until then). But thanks, it's making progress! :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter 4: how to show all cores plus HT?

Post by balala »

anbr07 wrote:Now i have changed everything, but instead of having 8 different line meters separately (grouped 4 left, 4 right), they are all stacked, like this:

Image

Also, they can all have the same color, like white, when arranged separately.
So, if I'm not wrong, you would like the lines into different meters, one by one. Right?
If so, replace the [MeterCPU14] and [MeterCPU58] meters with the followings:

Code: Select all

[MeterCore1]
Meter=LINE
MeasureName=MeasureCPU1
MeterStyle=LineStyle
X=12
Y=30

[MeterCore2]
Meter=LINE
MeasureName=MeasureCPU2
MeterStyle=LineStyle
X=6R
Y=0r

[MeterCore3]
Meter=LINE
MeasureName=MeasureCPU3
MeterStyle=LineStyle
X=12
Y=6R

[MeterCore4]
Meter=LINE
MeasureName=MeasureCPU4
MeterStyle=LineStyle
X=6R
Y=0r

[MeterCore5]
Meter=LINE
MeasureName=MeasureCPU5
MeterStyle=LineStyle
X=12
Y=6R

[MeterCore6]
Meter=LINE
MeasureName=MeasureCPU6
MeterStyle=LineStyle
X=6R
Y=0r

[MeterCore7]
Meter=LINE
MeasureName=MeasureCPU7
MeterStyle=LineStyle
X=12
Y=6R

[MeterCore8]
Meter=LINE
MeasureName=MeasureCPU8
MeterStyle=LineStyle
X=6R
Y=0r
To simplify a bit the code, I used here meter styles (precisely the [LineStyle] style). You'll have to add it to your code (usually at the beginning of your code, but that's just a habit, not a rule):

Code: Select all

[LineStyle]
W=88
H=40
LineCount=1
LineColor=#Color1#
AntiAlias=1
HorizontalLines=1
You can use here any color you'd like. All lines will use the Color1 color.
anbr07 wrote:Maybe i should post all the code i have, so far (i will be back late at night, so in won't answer until then). But thanks, it's making progress! :thumbup:
If what I've replied above is not good enough, please do so.
anbr07
Posts: 82
Joined: July 17th, 2016, 12:19 pm

Re: Rainmeter 4: how to show all cores plus HT?

Post by anbr07 »

That's quite close now. I have changed the graph colors to green, which looks quite good. What could be still better? The height could be less, maybe even only 50% of what i have now, because it will sit below the browser on my screen. Is the left side CPU 1-4 or are the upper four cores numbers 1-4? Just for information ;-)

Maybe each core graph could have the core number somewhere? Since the graphs are mostly low, it could be in the upper left corners of each graph unit? But maybe it's just enough to know, how the core numbers are arranged, line wise, or column wise. Anyway, it starts to get interesting now. Thanks!
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Rainmeter 4: how to show all cores plus HT?

Post by balala »

anbr07 wrote:That's quite close now. I have changed the graph colors to green, which looks quite good. What could be still better? The height could be less, maybe even only 50% of what i have now, because it will sit below the browser on my screen. Is the left side CPU 1-4 or are the upper four cores numbers 1-4? Just for information ;-)
In the first line, on left is core 1 and on right is core2. Below are core 3 (left) and core 4 (right) and so on. But those meters can be arranged otherwise too. Let me know if you want to do this and don't know how.
anbr07 wrote:Maybe each core graph could have the core number somewhere? Since the graphs are mostly low, it could be in the upper left corners of each graph unit? But maybe it's just enough to know, how the core numbers are arranged, line wise, or column wise. Anyway, it starts to get interesting now.
Just add the following sections to your code:

Code: Select all

[LabelStyle]
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
FontSize=24
FontFace=Calibri
StringStyle=BOLD
StringAlign=CENTERCENTER
AntiAlias=1
DynamicVariables=1

[MeterCore1Label]
Meter=STRING
MeterStyle=LabelStyle
X=([MeterCore1:X]+[MeterCore1:W]/2)
Y=([MeterCore1:Y]+[MeterCore1:H]/2)
W=[MeterCore1:W]
H=[MeterCore1:H]
Text=Core 1

[MeterCore2Label]
Meter=STRING
MeterStyle=LabelStyle
X=([MeterCore2:X]+[MeterCore2:W]/2)
Y=([MeterCore2:Y]+[MeterCore2:H]/2)
W=[MeterCore2:W]
H=[MeterCore2:H]
Text=Core 2

[MeterCore3Label]
Meter=STRING
MeterStyle=LabelStyle
X=([MeterCore3:X]+[MeterCore3:W]/2)
Y=([MeterCore3:Y]+[MeterCore3:H]/2)
W=[MeterCore3:W]
H=[MeterCore3:H]
Text=Core 3

[MeterCore4Label]
Meter=STRING
MeterStyle=LabelStyle
X=([MeterCore4:X]+[MeterCore4:W]/2)
Y=([MeterCore4:Y]+[MeterCore4:H]/2)
W=[MeterCore4:W]
H=[MeterCore4:H]
Text=Core 4

[MeterCore5Label]
Meter=STRING
MeterStyle=LabelStyle
X=([MeterCore5:X]+[MeterCore5:W]/2)
Y=([MeterCore5:Y]+[MeterCore5:H]/2)
W=[MeterCore5:W]
H=[MeterCore5:H]
Text=Core 5

[MeterCore6Label]
Meter=STRING
MeterStyle=LabelStyle
X=([MeterCore6:X]+[MeterCore6:W]/2)
Y=([MeterCore6:Y]+[MeterCore6:H]/2)
W=[MeterCore6:W]
H=[MeterCore6:H]
Text=Core 6

[MeterCore7Label]
Meter=STRING
MeterStyle=LabelStyle
X=([MeterCore7:X]+[MeterCore7:W]/2)
Y=([MeterCore7:Y]+[MeterCore7:H]/2)
W=[MeterCore7:W]
H=[MeterCore7:H]
Text=Core 7

[MeterCore8Label]
Meter=STRING
MeterStyle=LabelStyle
X=([MeterCore8:X]+[MeterCore8:W]/2)
Y=([MeterCore8:Y]+[MeterCore8:H]/2)
W=[MeterCore8:W]
H=[MeterCore8:H]
Text=Core 8
The properties of the Core X strings are set in the [LabelStyle] section. You'll have to find some well visible settings and update this section. The position of each string is in accord to the position of the appropriate line meter. If you move any of those line meters, the appropriate string will follow it.