mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-17 18:19:04 +02:00
3.9 KiB
3.9 KiB
logical_disk collector
The collector reads the LogicalDisk PDH object with pdh.CounterTypeRaw.
The object exists on every Windows host; no role is needed. It is
multi-instance. These notes were recorded on a Windows Server 2025
(build 26100) Hyper-V guest.
- Instances are drive letters (
C:),HarddiskVolumeNfor volumes without a drive letter (hereHarddiskVolume1andHarddiskVolume4) and the aggregate_Total.internal/pdhdrops_Totalbecause the collector asks forpdh.InstancesAll. The other instances pass through the volume include and exclude regular expressions, and the instance name is thevolumelabel. % Free SpaceisPERF_RAW_FRACTION. Its raw value equalsFree Megabytes(49907) and its base is the volume size in megabytes (129254). The collector reads the base (,secondvalue) as the size in MB. Both values are in units of 1,048,576 bytes per the help text.- The time counters share one raw value.
% Disk Read Time,Avg. Disk Read Queue Lengthand the first value ofAvg. Disk sec/Readwere all 9858832; the write counters were all 11319205, andAvg. Disk sec/Transfer(21178037) is their sum. The raw value is the cumulative busy time in 100 ns ticks.internal/pdhconverts thePERF_PRECISION_100NS_TIMERcounters to seconds. The queue length andPERF_AVERAGE_TIMERvalues arrive in ticks and need the 1e-7 factor; the counter time base is 10 MHz here. The queue length counters duplicate the busy time, so the collector no longer reads them; the average queue length israte(windows_logical_disk_{read,write}_seconds_total[5m]). Avg. Disk sec/Read,/Writeand/TransferarePERF_AVERAGE_TIMER. Their base is the operation count and equalsDisk Reads/sec(3073),Disk Writes/sec(1698) and their sum (4771).% Idle Timeis a cumulative 100 ns timer as well, not a percentage. OnC:it was 115960642 ticks, about 11.6 seconds.Disk Read Bytes/secandDisk Write Bytes/sec(PERF_COUNTER_BULK_COUNT) and thePERF_COUNTER_COUNTERrates are cumulative counts since boot.Current Disk Queue Lengthis an instantaneous snapshot (gauge) and was 0.Free Megabytesis a gauge. The collector code notes that Windows caches it; the volume is queried directly when possible.
Counter reference
Recorded on Windows Server 2025 (build 26100). Raw and Base are the first and second
values that pdh.CounterTypeRaw returns for the sample instance.
LogicalDisk
Multi-instance. Instances: _Total, C:, HarddiskVolume1, HarddiskVolume4. Sample instance: C:.
Counters the collector reads:
| Counter | Type | Raw | Base |
|---|---|---|---|
% Disk Read Time |
PERF_PRECISION_100NS_TIMER |
9858832 | |
% Disk Write Time |
PERF_PRECISION_100NS_TIMER |
11319205 | |
% Free Space |
PERF_RAW_FRACTION |
49907 | 129254 |
% Idle Time |
PERF_PRECISION_100NS_TIMER |
115960642 | |
Avg. Disk sec/Read |
PERF_AVERAGE_TIMER |
9858832 | 3073 |
Avg. Disk sec/Transfer |
PERF_AVERAGE_TIMER |
21178037 | 4771 |
Avg. Disk sec/Write |
PERF_AVERAGE_TIMER |
11319205 | 1698 |
Current Disk Queue Length |
PERF_COUNTER_RAWCOUNT |
0 | |
Disk Read Bytes/sec |
PERF_COUNTER_BULK_COUNT |
131518976 | |
Disk Reads/sec |
PERF_COUNTER_COUNTER |
3073 | |
Disk Write Bytes/sec |
PERF_COUNTER_BULK_COUNT |
139952640 | |
Disk Writes/sec |
PERF_COUNTER_COUNTER |
1698 | |
Free Megabytes |
PERF_COUNTER_RAWCOUNT |
49907 | |
Split IO/Sec |
PERF_COUNTER_COUNTER |
134 |
Not read by the collector:
PERF_AVERAGE_BULK:Avg. Disk Bytes/Read,Avg. Disk Bytes/Transfer,Avg. Disk Bytes/WritePERF_COUNTER_100NS_QUEUELEN_TYPE:Avg. Disk Queue Length,Avg. Disk Read Queue Length(raw 9858832),Avg. Disk Write Queue Length(raw 11319205)PERF_COUNTER_BULK_COUNT:Disk Bytes/secPERF_COUNTER_COUNTER:Disk Transfers/secPERF_PRECISION_100NS_TIMER:% Disk Time