It is currently April 20th, 2024, 6:42 am

totalhostwrites / totalhostreads from HWiNFO

Get help with creating, editing & fixing problems with skins
User avatar
Indy
Posts: 40
Joined: August 8th, 2013, 10:40 pm

totalhostwrites / totalhostreads from HWiNFO

Post by Indy »

Hello,

i need help whit the values of totalhostwrites / totalhostreads from HWiNFO.

In HWiNFO the unit of quantity (18202.000000) is "GB" but Rainmeter display the unit of quantity (17.8) "kB".

Code: Select all

[MeasureTotalHostWrites]
Measure=Plugin
Plugin=Plugins\HWiNFO.dll
HWiNFOSensorId=0xf0000100
HWiNFOSensorInstance=0x2
HWiNFOEntryId=0x8000002
HWiNFOType=CurrentValue
UpdateDivider=1

[DriveWrite]
Meter=STRING
MeasureName=MeasureTotalHostWrites
X=5
Y=95
FontFace=Arial Rounded MT Bold
FontColor=#fontColor.Text#
FontSize=8
AntiAlias=1
AutoScale=1
NumOfDecimals=1
Prefix="Total Writes: "
PostFix="B"
What i do wrong?


greeting Indy
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: totalhostwrites / totalhostreads from HWiNFO

Post by jsmorley »

Seems to me that if HWInfo is returning the value in GB, you don't want to use AutoScale on the meter, which will treat the value as bytes and scale it. Just return the value as is, and stick "GB" at the end of the text.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: totalhostwrites / totalhostreads from HWiNFO

Post by jsmorley »

If you want to use AutoScale, and I can see the charm in that, you might want to do something like:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureTotalHostWrites]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000100
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x8000002
HWiNFOType=CurrentValue

[MeasureUpScaleWrites]
Measure=Calc
Formula=MeasureTotalHostWrites * 1000000000

[MeterWrites]
Meter=String
MeasureName=MeasureUpScaleWrites
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
AutoScale=2
NumOfDecimals=1
Text=%1B

Then the value of 9677.000000 returned for me in HWInfo will end up as "9.7 TB" which is what makes sense.

Note that I used AutoScale=2, not AutoScale=1. This is not a count in "bytes", but a pure "count" in individual units. You don't want to scale as if it was bytes of data.
User avatar
Indy
Posts: 40
Joined: August 8th, 2013, 10:40 pm

Re: totalhostwrites / totalhostreads from HWiNFO

Post by Indy »

jsmorley wrote: December 2nd, 2020, 2:05 pm Seems to me that if HWInfo is returning the value in GB, you don't want to use AutoScale on the meter, which will treat the value as bytes and scale it. Just return the value as is, and stick "GB" at the end of the text.
Yes, but then i have 18231 GB.
And how i can Autoscale to 18.231 TB?
I think the Autoscale is necessary because the value is changes over the Time.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: totalhostwrites / totalhostreads from HWiNFO

Post by jsmorley »

Indy wrote: December 2nd, 2020, 2:25 pm Yes, but then i have 18231 GB.
And how i can Autoscale to 18.231 TB?
I think the Autoscale is necessary because the value is changes over the Time.
See my immediately preceding post...
User avatar
Indy
Posts: 40
Joined: August 8th, 2013, 10:40 pm

Re: totalhostwrites / totalhostreads from HWiNFO

Post by Indy »

Oh, thank you.

Crosspost my question whit your answere :oops:
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: totalhostwrites / totalhostreads from HWiNFO

Post by jsmorley »

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
MyTBW=425

[MeasureTotalHostWrites]
Measure=Plugin
Plugin=HWiNFO
HWiNFOSensorId=0xf0000100
HWiNFOSensorInstance=0x0
HWiNFOEntryId=0x8000002
HWiNFOType=CurrentValue

[MeasureUpScaleWrites]
Measure=Calc
Formula=MeasureTotalHostWrites * 1000000000
MinValue=0
MaxValue=(#MyTBW# * 1000000000000)

[MeterWrites]
Meter=String
MeasureName=MeasureUpScaleWrites
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
AutoScale=2
NumOfDecimals=1
Text=%1B

[MeterWritesBar]
Meter=Bar
X=10R
W=300
H=26
MeasureName=MeasureUpScaleWrites
BarOrientation=Horizontal
BarColor=0,255,0,255
SolidColor=47,47,47,255

1.jpg
You do not have the required permissions to view the files attached to this post.