I am trying to understand the values returned by "Get-CimInstance -Class Win32_PerfRawData_PerfDisk_LogicalDisk"
There seems to be a formular to convert the raw data returned by the wmi/cim class into something usefull: ((N1-N0)/F)/(D1-D0)
Any suggestions? Thanks!
There are public articles on the topic and that formula, is how the default display is achieved not what you use to format later.
Have you read the MSDN docs or other WMI docs on these properties and what they mean?
There are native built-in formatting that PoSH provides...
...but you can you normal math to construct your own.
See these articles:
For example, looking at MSDN data, the value is returned as a integer and based on notes from a few years ago.
AvgDiskSecPerWrite Data type: uint32 Access type:
Average time, in seconds, of a write operation of data to the disk.
"Displaying AvgDisksecPerRead dataset `n"
\\WS01\root\cimv2:Win32_PerfRawData_PerfDisk_PhysicalDisk.Name="2 E:".name : 0.438804798083772
"Displaying AvgDisksecPerWrite dataset `n"
\\WS01\root\cimv2:Win32_PerfRawData_PerfDisk_PhysicalDisk.Name="2 E:".name : 0.382004014543939
Anyway, I hope this gets you closer to whatever your use case is.
Get-Help -Name Get-Counter -Full
Notes regarding Disk Metrics:
Property Name Command
Thanks for your detailed answer and your implementation of the formula is exactly what I needed!
The reason I don't use get-counter but get-ciminstance is that I also collect other performance data (CPU, memory) from the same machines. To speed things up i establish a single cimsession to every machine and use this session to pull the different data points from all targets.
I was always under the impression this would be the way to go or am I wrong here?
Wrong about any given approach is really a matter of use case, possibilities and position / opinion.
Personally, I've not really used PowerShell to get this sort of thing, we have enterprise tools (for Example, MS SCCM/SCOM) that do this.
You can do the Get-Counter thing (even with multiple counters, well, in a loop through effort) with multiple machines of course and the parse only for what you need.
So, it's best to use your own judgement for your environment and use case for what works and is maintainable for the long term.
I say, put something together, see if it works, and or post back here to see if the forum can shed more light on your effort.
You must be logged in to reply to this topic.