The PercentDiskTime_Base
property represents the private timer for the PercentDiskTime
used in calculations FormattedData_PerfDisk from RawData_PerfDisk:
PERF_PRECISION_100NS_TIMER
Description: This counter type shows a value that consists of two counter values: the count of the elapsed time of the event being
monitored, and the "clock" time from a private timer in the same
units. It measures time in 100 ns units.
This counter type differs from other counter timers in that the clock
tick value accompanies the counter value eliminating any possible
difference due to latency from the function call. Precision counter
types are used when standard system timers are not precise enough for
accurate readings.
Generic type: Percentage
Formula: NX – N0 / D1 – D0
where the numerator (N
) represents the counter value and the denominator (D
) is the value of the
private timer. The private timer has the same frequency as the 100 ns
timer.
Average: NX – N0 / D1 – D0
Example: PhysicalDisk\% Disk Time
For details and explanation, let's start analyzing Qualifiers of the following properties (sorry, Microsoft is no longer updating linked content regularly):
PercentDiskTime: Data type: uint64
, Access type: Read-only
Qualifiers: CounterType (542573824) , DefaultScale (0) , PerfDetail (100)
Percentage of elapsed time that the selected disk drive is busy
servicing read or write requests.
PercentDiskTime_Base: Data type: uint64
, Access type: Read-only
Qualifiers: CounterType (1073939712) , DefaultScale (0) , PerfDetail (100)
Base value for PercentDiskTime
.
Note that:
- DefaultScale (
sint32
) = Power of 10 to use for display of the counter. For zero, the estimated maximum is 10^0
, or 1
, and
- PerfDetail (
sint32
) = Audience level of knowledge. Not used. The value is always 100
.
PercentDiskTime: Data type: uint64
, Access type: Read-only
Qualifiers: CookingType ("PERF_PRECISION_100NS_TIMER") , Counter ("PercentDiskTime") , PerfTimeStamp ("TimeStamp_Sys100NS") ,
PerfTimeFreq ("Frequency_Sys100NS") , Base ("PercentDiskTime_Base")
Percentage of elapsed time that the selected disk drive is busy
servicing read or write requests.
Take a look into Property Qualifiers for Performance Counter Classes as well.
A simple usage example:
$xxx = Get-WmiObject Win32_PerfRawData_PerfDisk_PhysicalDisk
$x0 = $xxx | Where-Object Name -eq '_Total' |
Select-Object -Property Name, PercentDiskTime*
$x0
Start-Sleep -Seconds 1
$xxx = Get-WmiObject Win32_PerfRawData_PerfDisk_PhysicalDisk
$xN = $xxx | Where-Object Name -eq '_Total' |
Select-Object -Property Name, PercentDiskTime*
'----'
$xn
'----'
$FormattedPercentDiskTime = ( $xn.PercentDiskTime - $x0.PercentDiskTime ) /
( $xn.PercentDiskTime_Base - $x0.PercentDiskTime_Base )
100*$FormattedPercentDiskTime # not sure about the `100*` multiplier
Output: D:\PShell\SO\58712142.ps1
Name PercentDiskTime PercentDiskTime_Base
---- --------------- --------------------
_Total 2863146220 132202140117518636
----
_Total 2863151515 132202140128078551
----
0,0501424490632737