It is currently May 29th, 2024, 5:08 am

hard disk load meter

Get help with creating, editing & fixing problems with skins
r.amse.s
Posts: 21
Joined: October 19th, 2012, 4:11 pm

hard disk load meter

Post by r.amse.s »

i want to have a meter that indicates the hard disk load (read/write) in percent.

anybody that has suggestions how to implement something like this?

things that i found till now: the PerfMon plugin could be the start. My problem is that i cannot calculate the percent because i don't have the maximum possible load.
Am i on the wrong trail or isn't this possible at all?

thanks!
User avatar
jsmorley
Developer
Posts: 22635
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: hard disk load meter

Post by jsmorley »

If a measure doesn't return a percentage, or if you can't set MaxValue on a measure to some value that makes sense as the "100%" value, then you really won't get any useful results in meters (like Bar, Rotator, Line, Histogram, Roundline) that require a percentage to work.

Looks to me that the only things in Perfmon that are going to return a percentage are:

Physical (or Logical) Disk:
% Disk Read Time
% Disk Time
% Disk Write Time
% Idle Time

No idea if any of these are what you are looking for, but they would work.

Seems to me that perhaps using the InvertMeasure of "% Idle Time" and using that in a meter might be pretty close to some kind of "load" for a disk. Since a peculiarity of Windows Perfmon.exe has it returning a "maximum" percentage greater than 100% sometimes, you might want to use something else for any "text" display of things.
User avatar
jsmorley
Developer
Posts: 22635
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: hard disk load meter

Post by jsmorley »

Something like this maybe:

Code: Select all

[Rainmeter]
Update=1000

[MeasureDiskLoad]
Measure=Plugin
Plugin=PerfMon.dll
PerfMonObject=LogicalDisk
PerfMonCounter="% Idle Time"
PerfMonInstance=C:
PerfMonDifference=1
InvertMeasure=1

[MeasureDiskBytes]
Measure=Plugin
Plugin=PerfMon.dll
PerfMonObject=LogicalDisk
PerfMonCounter="Disk Bytes/sec"
PerfMonInstance=C:
PerfMonDifference=1

[MeterDiskLoad]
Meter=Bar
MeasureName=MeasureDiskLoad
W=250
H=20
BarColor=217,157,108,255
SolidColor=100,100,100,255
BarOrientation=Horizontal

[MeterDiskBytes]
Meter=String
MeasureName=MeasureDiskBytes
Y=5R
FontSize=12
FontColor=217,157,108,255
StringStyle=Bold
Antialias=1
AutoScale=1
Text=Disk Bytes / Sec : %1
Uses the inverted value of "% Idle Time" to drive the bar, and the value of "Disk Bytes/sec" to show a scaled text value for the bytes read/write for the disk.
User avatar
jsmorley
Developer
Posts: 22635
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: hard disk load meter

Post by jsmorley »

Drat... That won't really work all that well either. What Perfmon is actually "returning" (as opposed to what it displays in the Perfmon.exe app) is not a percentage, but some kind of value that means who knows what. Inside the Perfmon.exe app it is using some formula, based on some unknown entity as the "maximum value", and displaying a percentage. Since the measure is not returning a percentage, the top-end of the "range" of the measure is just the "highest it has been since the skin was started", which gives some nutty results until it has been running for a while and the real "maximum" settles down.

May not be any easy way to get to a decent, accurate result for this...
r.amse.s
Posts: 21
Joined: October 19th, 2012, 4:11 pm

Re: hard disk load meter

Post by r.amse.s »

thanks a lot jsmorley!

yeah, i think also it is not so easy to get a decent final value, but anyway there is a visible indicator for a overloaded disk usage.

this together with an meter for the process that is using the most cpu time can gives you an overview about some blocking behavior.

i want to thank you all of you guys from rainmeter for the great work and excelent support and help!!! you are really cool" :thumbup:
IVaN_000
Posts: 2
Joined: February 9th, 2013, 8:38 pm

Re: hard disk load meter

Post by IVaN_000 »

I'm trying to recreate with Rainmeter an old script made with Samurize. It had two bars, one for "% Disk Read Time" and one for "% Disk Write Time". Samurize used PerfMon as well, and it worked right, the values were between 0 and 100, and after using it for years I can tell they were pretty reliable values.

With Rainmeter I'm having the same issue as you, the crazy mysterious values. Could it possibly be a bug in PerfMon.dll plugin?
IVaN_000
Posts: 2
Joined: February 9th, 2013, 8:38 pm

Re: hard disk load meter

Post by IVaN_000 »

Ok, I did some tests about "% Disk Read Time". Best to explain with some examples:

Rainmeter: 711,000
PerfMon: 7,110
Samurize: 7%

Rainmeter: 5,792,700
PerfMon: 57,927
Samurize: 57%

Rainmeter: 10,677,400
Perfmon: 106,774
Samurize: 100% (not 106%)

So there's no bug, just different interpretations of the same value.