It is currently April 25th, 2024, 3:55 pm

Disk I/O as percentile

Get help with creating, editing & fixing problems with skins
minaretsmodder
Posts: 1
Joined: November 23rd, 2014, 9:00 am

Disk I/O as percentile

Post by minaretsmodder »

I have a widget that shows my disk usage as a function of time, the only problem is that it "scales" to whatever the most recent maximum was. Is there any way to set the max to say 150 MB/sec, and it will scale the graph to that?
My widget is in the spoiler

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Author=Ahmed90
AppVersion=1003000
Update=1000


[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
disk1=C:
disk2=D:
colorBarDisk1=141,198,63,255
colorBarDisk11=141,255,63,255
colorBarDisk12=0,0,255,255
colorBarDisk2=141,198,63,255
@include=#SKINSPATH#ForceX\FXSM_V3_Settings.inc

graphH=42
 
; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------


[measureTotalDisk1]
; This measure returns the total disk space
Measure=FreeDiskSpace
Drive=#disk1#
Total=1
UpdateDivider=120

[measureUsedDisk1]
; Returns inverted value of free disk space (i.e. used disk space)
Measure=FreeDiskSpace
Drive=#disk1#
InvertMeasure=1
UpdateDivider=120

[measureTotalDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
Total=1
UpdateDivider=120

[measureUsedDisk2]
Measure=FreeDiskSpace
Drive=#disk2#
InvertMeasure=1
UpdateDivider=120


[Drive1Access]
Measure=Plugin
Plugin=Plugins\PerfMon.dll
PerfMonObject=LogicalDisk
PerfMonCounter="Disk Bytes/sec"
PerfMonInstance=C:

[Drive2Access]
Measure=Plugin
Plugin=Plugins\PerfMon.dll
PerfMonObject=LogicalDisk
PerfMonCounter="Disk Bytes/sec"
PerfMonInstance=D:



; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=CENTER
StringCase=UPPER
StringEffect=SHADOW
FontEffectColor=0,0,0,40
FontColor=#colorText#
FontFace=#fontName#
FontSize=12
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=LEFT
StringCase=NONE
StringEffect=SHADOW
FontEffectColor=0,0,0,40
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=0

[styleRightText]
StringAlign=RIGHT
StringCase=NONE
StringEffect=SHADOW
FontEffectColor=0,0,0,40
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

[styleBarDisk1]
BarColor=#colorBarDisk1#
BarOrientation=Vertical
SolidColor=0,0,0,50

[styleBarDisk2]
BarColor=#colorBarDisk2#
BarOrientation=Vertical
SolidColor=0,0,0,50

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterHeader]
Meter=IMAGE
ImageName=#SKINSPATH#\SystemInformation\img\Header.png
X=0
Y=0
H=50
W=180

[meterBody]
Meter=IMAGE
ImageName=#SKINSPATH#\SystemInformation\img\Body.png
Tile=1
X=0r
Y=0R
H=160
W=180

[meterFooter]
Meter=IMAGE
ImageName=#SKINSPATH#\SystemInformation\img\Footer.png
X=0
Y=0R
H=38
W=180

[meterTitle]
Meter=STRING
MeterStyle=styleTitle
X=90
Y=15
W=180
H=20
Text="Disks"

[MeterLabelDisk1]
Meter=STRING
MeterStyle=styleLeftText
X=15
Y=15R
W=145
H=14
Text="#disk1#\"


[meterValueDisk1]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk1
MeasureName2=measureTotalDisk1
X=153r
Y=1r
W=145
h=14
Text="%1B/%2B used"
NumOfDecimals=1
AutoScale=1

[meterBarDisk1]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureUsedDisk1
X=15
Y=0R
W=145
H=1


[meterAccessDisk1]
Meter=String
MeterStyle=styleRightText
MeasureName=Drive1Access
X=153r
Y=5r
W=145
h=14
Text="%1B/s"
NumOfDecimals=0
AutoScale=1




;----------------------------------------------------------
[meterHLGraphBG]
Meter=IMAGE
ImageName=#SKINSPATH#\SystemInformation\img\Graphbg.png
X=15
Y=15r
H=#graphH#
W=137

[Disk1UsageGraphLine]
Meter=Line
MeasureName=Drive1Access
Percentual=1
Autoscale=1
LineColor=#colorBarDisk1#
MeterStyle=styleBarDisk1
X=1r
Y=1r
H=#graphH#
W=135
LineWidth=1
LineCount=1


[meterHLBarCDisk1BG]
Meter=IMAGE
ImageName=#SKINSPATH#\SystemInformation\img\CoreBG.png
X=2R
Y=-1r
H=#graphH#
W=12

[meterBarDisk1Usage]
Meter=BAR
MeterStyle=styleBarDisk1
MeasureName=Drive1Access
Percentual=1
Autoscale=1
X=0r
Y=0r
Barimage=#SKINSPATH#\SystemInformation\img\Core1f.png
W=12
H=#graphH#



;--------------------------------------------------------------------------------------






[MeterLabelDisk2]
Meter=STRING
MeterStyle=styleLeftText
X=15
Y=10R
W=145
H=14
Text="#disk2#\"


[meterValueDisk2]
Meter=String
MeterStyle=styleRightText
MeasureName=measureUsedDisk2
MeasureName2=measureTotalDisk2
X=153r
Y=0r
W=145
h=14
Text="%1B/%2B used"
NumOfDecimals=1
AutoScale=1

[meterBarDisk2]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureUsedDisk2
X=15
Y=0R
W=145
H=1

[meterAccessDisk2]
Meter=String
MeterStyle=styleRightText
MeasureName=Drive2Access
X=153r
Y=5r
W=145
h=14
Text="%1B/s"
NumOfDecimals=0
AutoScale=1


[meterHLGraphBG2]
Meter=IMAGE
ImageName=#SKINSPATH#\SystemInformation\img\Graphbg.png
X=15
Y=0R
H=#graphH#
W=137

[Disk2UsageGraphLine]
Meter=Line
MeasureName=Drive2Access
LineColor=#colorBarDisk2#
MeterStyle=styleBarDisk2
X=1r
Y=1r
H=40
W=135
LineWidth=1
LineCount=1
AutoScale=0
AntiAlias=1

[meterHLBarCDisk2BG]
Meter=IMAGE
ImageName=#SKINSPATH#\SystemInformation\img\CoreBG.png
X=2R
Y=-1r
H=#graphH#
W=12

[meterBarDisk2Usage]
Meter=BAR
MeterStyle=styleBarDisk2
MeasureName=Drive2Access
X=0r
Y=0r
Barimage=#SKINSPATH#\SystemInformation\img\Core1f.png
W=12
H=#graphH#
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Disk I/O as percentile

Post by jsmorley »

Simply set MinValue and MaxValue on the measures. Any meter that requires a percentage will know what to do with that, String meters will need Percentual=1 on them.

Figuring out what those should be will take a little leg-work, as every hardware setup will be different. One way is to do some really disk intensive stuff and watch the values in Perfmon.exe to see what kind of maximums you are hitting.

Code: Select all

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

[Drive1Reads]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Reads/sec
PerfMonInstance=C:
PerfmonDifference=1
MinValue=0
MaxValue=100

[Drive1Writes]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Writes/sec
PerfMonInstance=C:
PerfmonDifference=1
MinValue=0
MaxValue=100

[Drive1ReadBytes]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Read Bytes/sec
PerfMonInstance=C:
PerfmonDifference=1
MinValue=0
MaxValue=50000000

[Drive1WriteBytes]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Write Bytes/sec
PerfMonInstance=C:
PerfmonDifference=1
MinValue=0
MaxValue=50000000

[MeterBack]
Meter=Image
W=390
H=175
SolidColor=255,255,255,255

[MeterGraphBack]
Meter=Image
X=19
Y=19
W=352
H=42
SolidColor=150,150,150,255

[MeterDrive1Reads]
Meter=Line
MeasureName=Drive1ReadBytes
MeasureName2=Drive1WriteBytes
X=20
Y=20
W=350
H=40
LineCount=2
HorizontalLines=1
HorizontalLineColor=150,150,150,255
LineColor=28,184,54,255
LineColor2=184,59,28,255
SolidColor=255,255,255,255

[MeterDriveLetter]
Meter=String
X=20
Y=67
FontSize=70
FontColor=220,220,220,255
AntiAlias=1
Text=C

[MeterDriveText]
Meter=String
X=87
Y=115
FontSize=22
FontColor=220,220,220,255
AntiAlias=1
Text=Drive

[MeterDrive1ReadsText]
Meter=String
X=180
Y=80
FontSize=11
FontColor=0,0,0,255
AntiAlias=1
Text=Reads/sec

[MeterDrive1ReadsValue]
Meter=String
MeasureName=Drive1Reads
X=368
Y=0r
FontSize=11
FontColor=0,0,0,255
StringAlign=Right
AntiAlias=1
Text=%1

[MeterDrive1WritesText]
Meter=String
X=180
Y=5R
FontSize=11
FontColor=0,0,0,255
AntiAlias=1
Text=Writes/sec

[MeterDrive1WritesValue]
Meter=String
MeasureName=Drive1Writes
X=368
Y=0r
FontSize=11
FontColor=0,0,0,255
StringAlign=Right
AntiAlias=1
Text=%1

[MeterDrive1ReadBytesText]
Meter=String
X=180
Y=5R
FontSize=11
FontColor=0,0,0,255
AntiAlias=1
Text=Read Bytes/sec

[MeterDrive1ReadBytesValue]
Meter=String
MeasureName=Drive1ReadBytes
X=368
Y=0r
FontSize=11
FontColor=0,0,0,255
StringAlign=Right
NumOfDecimals=1
Percentual=1
AutoScale=1
AntiAlias=1
Text=%1 %

[MeterDrive1WriteBytesText]
Meter=String
X=180
Y=5R
FontSize=11
FontColor=0,0,0,255
AntiAlias=1
Text=Write Bytes/sec

[MeterDrive1WriteBytesValue]
Meter=String
MeasureName=Drive1WriteBytes
X=368
Y=0r
FontSize=11
FontColor=0,0,0,255
StringAlign=Right
NumOfDecimals=1
Percentual=1
AutoScale=1
AntiAlias=1
Text=%1 %
1.jpg
You do not have the required permissions to view the files attached to this post.