It is currently April 18th, 2024, 8:57 pm

Disk Usage % with PerfMon

Get help with creating, editing & fixing problems with skins
User avatar
GioRgSaVv
Posts: 62
Joined: February 7th, 2017, 10:02 pm

Disk Usage % with PerfMon

Post by GioRgSaVv »

Hello,

I want to create a skin that shows the disk space, total gb usage etc.. but I don't know how to make it show the disk usage

I want to use PerfMon but I don't know much about this or how to do it

what am I missing here?

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,200

[DiskUsage]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=PhysicalDisk
PerfMonCounter=% Disk Usage
PerfMonInstance=C:

[DiskUsage2]
Meter=String
MeasureName=DiskUsage
FontFace=No More Lies
FontColor=255,255,0
FontSize=16
AutoScale=1
Text=Disk usage: %1
also what's the difference between PhysicalDisk and LogicalDisk and which one should I use? it shows values from both of them

I want to create something similar to this skin
Image

right now I'm this far
Image

but I would like it to be like this
Image
But I'm completely stuck, I'm searching around the web for 2 hours and I haven't found anything yet :???:
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: Disk Usage % with PerfMon

Post by FreeRaider »

I don't think you can use PerfMon for disk usage.

For disk usage percentual you need to use free disk space.

For example

Code: Select all

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

[MeasureTotalDiskSpace]
Measure=FreeDiskSpace
Drive=C:
Total=1
UpdateDivider=5

[MeasureUsedDiskSpace]
Measure=FreeDiskSpace
Drive=C:
InvertMeasure=1
UpdateDivider=5

[MeasureUsedDiskPercentual]
Measure=Calc
Formula=Round(([MeasureUsedDiskSpace:]/[MeasureTotalDiskSpace:])*100,2)
DynamicVariables=1

[MeterDriveUsage]
Meter=String
X=0
Y=0
FontSize=10
FontColor=255,255,255,255
SolidColor=0,0,0,255
AntiAlias=1
Text="[MeasureUsedDiskPercentual:]%"
DynamicVariables=1
User avatar
GioRgSaVv
Posts: 62
Joined: February 7th, 2017, 10:02 pm

Re: Disk Usage % with PerfMon

Post by GioRgSaVv »

eh thats not what I meant, I don't want to see a value of GB in %, I want the skin to show the usage of drive, like the skin of Gadgets in the image I uploaded.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Disk Usage % with PerfMon

Post by eclectic-tech »

GioRgSaVv wrote:eh thats not what I meant, I don't want to see a value of GB in %, I want the skin to show the usage of drive, like the skin of Gadgets in the image I uploaded.
From Gadgets:

Code: Select all

[MeasureDiskIdleTimeAll]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter="% Idle Time"
PerfMonInstance="_Total"

[MeasureDiskTimeAll]
Measure=Calc
Formula=(100.0 - (MeasureDiskIdleTimeAll / 100000))
MaxValue=100.0
MinValue=0.0

User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: Disk Usage % with PerfMon

Post by FreeRaider »

So, I'm sorry for missunderstand you,

This is what perfmon can do for disk usage https://blogs.technet.microsoft.com/askcore/2012/03/16/windows-performance-monitor-disk-counters-explained/ (external link)

Tell me (us) if it helps.
User avatar
GioRgSaVv
Posts: 62
Joined: February 7th, 2017, 10:02 pm

Re: Disk Usage % with PerfMon

Post by GioRgSaVv »

it doesn't work, I still cant make it work

I don't know what am I missing here, I've tried everything :???:
User avatar
GioRgSaVv
Posts: 62
Joined: February 7th, 2017, 10:02 pm

Re: Disk Usage % with PerfMon

Post by GioRgSaVv »

I finally made it work

I had to use another measure

Code: Select all

[Rainmeter]
BackgroundMode=2
Update=1000

[MeasureDiskIdleTime]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter="% Idle Time"
PerfMonInstance="C:"

[MeasureDiskTime]
Measure=Calc
Formula=(100.0 - (MeasureDiskIdleTime / 100000))
MaxValue=100.0
MinValue=0.0

[DriveUsage]
Meter=String
MeasureName=MeasureDiskTime
FontFace=Arial
FontSize=16
FontColor=255,255,255
StringEffect=Border
AntiAlias=1
Percentual=1
Text="%1%"
thanks for your time guys :great:
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Disk Usage % with PerfMon

Post by CyberTheWorm »

GioRgSaVv wrote:I finally made it work

I had to use another measure

Code: Select all

[Rainmeter]
BackgroundMode=2
Update=1000

[MeasureDiskIdleTime]
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter="% Idle Time"
PerfMonInstance="C:"

[MeasureDiskTime]
Measure=Calc
Formula=(100.0 - (MeasureDiskIdleTime / 100000))
MaxValue=100.0
MinValue=0.0

[DriveUsage]
Meter=String
MeasureName=MeasureDiskTime
FontFace=Arial
FontSize=16
FontColor=255,255,255
StringEffect=Border
AntiAlias=1
Percentual=1
Text="%1%"
thanks for your time guys :great:
Glad you got it to work,this is what I did as another option but I'm crating a graph.

Code: Select all

[MeasureDiskAccess]
; Measures disk access of the C: drive.
Measure=Plugin
Plugin=PerfMon
PerfMonObject=LogicalDisk
PerfMonCounter=Disk Bytes/sec
PerfMonInstance=C:
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
bad1080
Posts: 3
Joined: June 9th, 2018, 2:04 pm

Re: Disk Usage % with PerfMon

Post by bad1080 »

GioRgSaVv wrote:I finally made it work

I had to use another measure

Code: Select all

...
thanks for your time guys :great:
i got this working for my 'c:' drive, but i cant figure out how to make it work for my other drives as well. my guess is the calculation would have to use diferent values but i have no idea what to change or add since nothing other than "PerfMonInstance="C:"" seems to point to a specific drive and i changed that to "d:" or more specific "#disk2#" in my case.

so i am guessing that something here would have to be changed as well:

Code: Select all

[MeasureDiskTime]
Measure=Calc
Formula=(100.0 - (MeasureDiskIdleTimeC / 100000))
MaxValue=100.0
MinValue=0.0
since i just installed rainmeter yesterday and tinkered around with it for a day i am out of ideas, so if anybody could help me with this it would be greatly appreciated!

thanks for reading
User avatar
SilverAzide
Rainmeter Sage
Posts: 2603
Joined: March 23rd, 2015, 5:26 pm

Re: Disk Usage % with PerfMon

Post by SilverAzide »

GioRgSaVv wrote:also what's the difference between PhysicalDisk and LogicalDisk and which one should I use? it shows values from both of them
A simple way to think of it, is PhysicalDisk relates to your physical device (actual hard drive device), whereas LogicalDisk relates to the drive that you have a drive letter assigned to. These are often the same thing. Where it is different is when you have partitioned your physical drive. For example, you could have Western Digital HDD with 3 partitions, assigned letters C:, D:, and E:. So your HDD is 1 physical disk, while your 3 partitions are 3 logical disks.

You won't find PhysicalDisk of much value: 1) because of partitioning, the read/write data for PhysicalDisk applies to all logical drives on that physical drive, and 2) the biggest issue is that the PhysicalDisk identifier (an integer) is determined at boot time, so if you have multiple hard drives, one may be device #0 today, and tomorrow it could be device #1.
Last edited by SilverAzide on June 9th, 2018, 3:44 pm, edited 2 times in total.
Gadgets Wiki GitHub More Gadgets...