It is currently March 29th, 2024, 9:04 am

HDD activity indicators

Get help with creating, editing & fixing problems with skins
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

HDD activity indicators

Post by sl23 »

I would like my skin to show when any specific disc is being accessed for read or write operations, is there any way Rainmeter can currently do this? Or a possibility of adding such feature?

I have drive letters on a skin to access them and eject removables, so just the ability to have a drive letter change colour to denote a read or write operation would be great. :)

Thanks
- MuLab -
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: HDD activity indicators

Post by jsmorley »

User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: HDD activity indicators

Post by sl23 »

Thank you, I'll look into that :D
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HDD activity indicators

Post by balala »

sl23 wrote:I would like my skin to show when any specific disc is being accessed for read or write operations, is there any way Rainmeter can currently do this? Or a possibility of adding such feature?

I have drive letters on a skin to access them and eject removables, so just the ability to have a drive letter change colour to denote a read or write operation would be great. :)

Thanks
Not very sure why have you posted this into the Feature Suggestions, but what you'd like to achieve is definitely possible, using the PerfMon plugin. The most important options are PerfMonCounter=Disk Read Bytes/sec (on the [MeasureDiskRead1] measure) and PerfMonCounter=Disk Write Bytes/sec (on the [MeasureDiskWrite1] measure) respectively. You can set the disk you'd like to watch, through the Disk1 variable:

Code: Select all

[Rainmeter]
Update=250
AccurateText=1
DynamicWindowSize=1
BevelType=1

[Variables]
Disk1=C:
NoActivityColor=0,0,0,40
ReadingColor=0,255,0
WritingColor=255,0,0
BothColor=255,240,0

[StringStyle]
X=13r
Y=13r
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Border
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
AntiAlias=1

[MeasureDiskRead1]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Read Bytes/sec
PerfMonInstance=#Disk1#

[MeasureDiskWrite1]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Write Bytes/sec
PerfMonInstance=#Disk1#
IfCondition=((MeasureDiskRead1=0)&&(MeasureDiskWrite1=0))
IfTrueAction=[!SetOption MeterDisk1Activity LineColor "#NoActivityColor#"][!UpdateMeter "MeterDisk1Activity"][!Redraw]
IfCondition2=((MeasureDiskRead1>0)&&(MeasureDiskWrite1=0))
IfTrueAction2=[!SetOption MeterDisk1Activity LineColor "#ReadingColor#"][!UpdateMeter "MeterDisk1Activity"][!Redraw]
IfCondition3=((MeasureDiskRead1=0)&&(MeasureDiskWrite1>0))
IfTrueAction3=[!SetOption MeterDisk1Activity LineColor "#WritingColor#"][!UpdateMeter "MeterDisk1Activity"][!Redraw]
IfCondition4=((MeasureDiskRead1>0)&&(MeasureDiskWrite1>0))
IfTrueAction4=[!SetOption MeterDisk1Activity LineColor "#BothColor#"][!UpdateMeter "MeterDisk1Activity"][!Redraw]

[MeasureDiskRead1Total]
Measure=Calc
Formula=( MeasureDiskRead1Total + MeasureDiskRead1 )
Group=Measure

[MeasureDiskWrite1Total]
Measure=Calc
Formula=( MeasureDiskWrite1Total + MeasureDiskWrite1 )
Group=Measure

[MeasureDiskRead1TotalMB]
Measure=Calc
Formula=( MeasureDiskRead1Total / 1024**2 )
Group=Measure

[MeasureDiskWrite1TotalMB]
Measure=Calc
Formula=( MeasureDiskWrite1Total / 1024**2 )
Group=Measure

[MeterDisk1Activity]
Meter=Roundline
X=5
Y=0
W=16
H=16
Padding=5,5,5,5
StartAngle=4.712
RotationAngle=6.283
LineLength=8
Solid=1
AntiAlias=1
AutoScale=1
Group=Disk1
LeftMouseUpAction=["#Disk1#"]

[MeterDisk1]
Meter=String
X=13r
Y=13r
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Border
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=CENTERCENTER
AntiAlias=1
Text=#Disk1#
Group=Disk1
The [MeterDisk1Activity] roundline will change its color according to the activity of the drive: it is grey while no activity is done (neither reading, neither writing to drive, using the color set through the NoActivityColor), is green when reading (color set by the ReadingColor variable), red when a writing (WritingColor), and yellow when both (BothColor variable).
Obviously you can multiply the needed measures and the appropriate meters, to have more then one single disk. The above code just wants to prove how this method can work.

EDIT: Again, jsmorley, you beat me. Sorry...
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: HDD activity indicators

Post by sl23 »

Wow! Thank you for supplying the code :D
I'll check that out when I get more time, thanks again for your speedy replies and great support.

EDIT:
One more quick thing, I hope...
Is it possible to apply this to all discs using, for example, a {STYLES} section of code that can be referenced by all drives?
Last edited by sl23 on June 20th, 2017, 7:51 pm, edited 1 time in total.
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HDD activity indicators

Post by balala »

sl23 wrote:I'll check that out when I get more time, thanks again for your speedy replies and great support.
You're welcome. Let me know if you have further questions.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: HDD activity indicators

Post by sl23 »

You're too darn quick! I did have one more, :oops: see above.
- MuLab -
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: HDD activity indicators

Post by sl23 »

Oh and apologies for posting in the wrong place, I wasn't sure if it was possible. I tried searching the forum, but nothing came up for HDD/Hard drive indicator/activity, so I assumed it may not be possible, hence my request.
It's been a while since I created my own skins and forgot the layout of things, especially the manual! :oops:
- MuLab -
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: HDD activity indicators

Post by sl23 »

Oh, and may I just say a great big thanks for the OpticalDriveStatus skin! :thumbup:
I've been wanting this for ages, my curiosity paid off! I clicked your deviantart link :D
Marvellous, thanks again for the great work you've done :thumbup:
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: HDD activity indicators

Post by balala »

sl23 wrote:Oh and apologies for posting in the wrong place, I wasn't sure if it was possible. I tried searching the forum, but nothing came up for HDD/Hard drive indicator/activity, so I assumed it may not be possible, hence my request.
It's been a while since I created my own skins and forgot the layout of things, especially the manual! :oops:
A while ago, I've posted this code into the Share Your Creations, then eclectic-tech has developed it, creating a skin installer. You can check it here: https://forum.rainmeter.net/viewtopic.php?p=124353#p124353
sl23 wrote:Oh, and may I just say a great big thanks for the OpticalDriveStatus skin! :thumbup:
I've been wanting this for ages, my curiosity paid off! I clicked your deviantart link :D
Marvellous, thanks again for the great work you've done :thumbup:
Thanks for the kind words and your interest. I'm glad if people are appreciating my work.