It is currently April 8th, 2020, 3:55 pm

HWiNFO CPU & GPU clock sensors

Help with creating, editing & fixing problems with skins
Kermit51
Posts: 3
Joined: March 14th, 2017, 8:00 pm

HWiNFO CPU & GPU clock sensors

Post by Kermit51 »

Having some trouble getting the correct units to display for clock speeds using HWiNFO.

Current code for CPU:

Code: Select all

[measureCPUspeed]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000016
HWiNFOType=CurrentValue
DynamicVariables=1
MinValue=0
MaxValue=100

[CPUspeed]
Meter=String
MeasureName=measureCPUspeed
NumOfDecimals=2
FontFace=Century Gothic
Text=CPU Clock:     %1 GHz
FontColor=255,255,255,100
FontSize=10
Antialias=1
X=30
Y=265
This is the sensor from HWiNFO.
Image

And this is how my dashboard is displaying the sensor readings
Image

Looks to me like the sensor is reading in MHz, but the dashboard is displaying in GHz. Also, the GHz reading is totally wrong as Task Manager is showing 3.xx GHz at idle.
Last edited by balala on March 20th, 2020, 6:40 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are you posting code snippets. It's the </> button.
mak_kawa
Posts: 564
Joined: December 30th, 2015, 9:47 am

Re: HWiNFO CPU & GPU clock sensors

Post by mak_kawa »

Did you read about the Effective Clock by the HWiNFO autohr? From this explanation, it is normal that the EC value is different from traditional clock values.

And...you are wondering that the value is displayed as GHz, but you have specified by yourself in the line Text=CPU Clock: %1 GHz?

Further, two lines of MinValue and MaxValue are not necessary?
User avatar
balala
Rainmeter Sage
Posts: 10094
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HWiNFO CPU & GPU clock sensors

Post by balala »

mak_kawa wrote:
March 20th, 2020, 9:05 pm
And...you are wondering that the value is displayed as GHz, but you have specified by yourself in the line Text=CPU Clock: %1 GHz?
Right, what is seen in the posted image (CPU Clock: 836.43 GHz) is definitely not a value in GHz. So there is a simple solution, just have to replace the GHz in the Text option of the [CPUspeed] meter with MHz: Text=CPU Clock: %1 MHz
mak_kawa
Posts: 564
Joined: December 30th, 2015, 9:47 am

Re: HWiNFO CPU & GPU clock sensors

Post by mak_kawa »

Hi Kermit51

If you want to get traditional CPU clock values and their average, you have to get Core X Clock for each core and calculate average from them using Calc measure, such as;

Code: Select all

[MeasureCPUMHz0]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000000
HWiNFOType=CurrentValue

[MeasureCPUMHz1]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000001
HWiNFOType=CurrentValue

[MeasureCPUMHz2]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000002
HWiNFOType=CurrentValue

[MeasureCPUMHz3]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000300
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x6000003
HWiNFOType=CurrentValue

[MeasureAverageCPUMHz]
Measure=Calc
Formula=([MeasureCPUMHz0] + [MeasureCPUMHz1] + [MeasureCPUMHz2] + [MeasureCPUMHz3]) / 4
DynamicVariables=1
Ps. HWiNFO parameters may be different by your hardware.
Kermit51
Posts: 3
Joined: March 14th, 2017, 8:00 pm

Re: HWiNFO CPU & GPU clock sensors

Post by Kermit51 »

mak_kawa wrote:
March 20th, 2020, 9:05 pm
Did you read about the Effective Clock by the HWiNFO autohr? From this explanation, it is normal that the EC value is different from traditional clock values.

And...you are wondering that the value is displayed as GHz, but you have specified by yourself in the line Text=CPU Clock: %1 GHz?

Further, two lines of MinValue and MaxValue are not necessary?
I had not read that. So basically just change it to MHz and assume this read out will never agree to the speed clock in Task Manager.
User avatar
balala
Rainmeter Sage
Posts: 10094
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HWiNFO CPU & GPU clock sensors

Post by balala »

Kermit51 wrote:
March 20th, 2020, 9:49 pm
assume this read out will never agree to the speed clock in Task Manager.
I'm not using HWiNFO, so can't say extremely precisely, but I suppose it won't. The plugin and the Task Manager are not reading the values absolutely simultaneously and this can give a small difference between the two values.
Again, this might be wrong, it is just my assumption. Sorry if I am indeed wrong.
mak_kawa
Posts: 564
Joined: December 30th, 2015, 9:47 am

Re: HWiNFO CPU & GPU clock sensors

Post by mak_kawa »

Hi balala and Kermit51

The difference between the effective clock and traditional(real) clock is huge. The HWinFO author has explained about it in the thread sited above as;
The Effective frequency does not represent a particular real clock, but the average clock value where sleeping states do not contribute to clock.
So for example when a core is running: 800 MHz, 0 (sleep), 0 (sleep), 0 (sleep)
the average value (effective clock) is: (800 + 0 + 0 + 0) / 4 = 200 MHz
User avatar
balala
Rainmeter Sage
Posts: 10094
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HWiNFO CPU & GPU clock sensors

Post by balala »

mak_kawa wrote:
March 20th, 2020, 10:13 pm
The difference between the effective clock and traditional(real) clock is huge. The HWinFO author has explained about it in the thread sited above as;
Yep, make sense...