Disk metrics
Sources: Collectors/DiskCollector.swift (DiskCollector, DiskMath, VolumeInfo, PhysicalDisk, DiskCounters, DiskActivitySample), Metrics/Metric.swift, App/Sources/Features/SystemViews.swift (DiskView).
Logical volumes versus physical disks
The Disk page has two separate tables because macOS storage has two separate layers, and mixing them produces wrong totals.
Logical volume (VolumeInfo) |
Physical block device (PhysicalDisk) |
|
|---|---|---|
| What it is | A mounted file system: "Macintosh HD", "Data", an external drive's partition, a network share, a mounted disk image | A device the kernel does block I/O on: the internal SSD, an external drive, the virtual device behind a disk image |
| Identified by | Mount point (/, /Volumes/…) and BSD name such as disk3s1 |
BSD name of the whole device such as disk0 |
| What it has | Capacity: total, available, free | Activity: bytes and operations read and written |
| Source | FileManager / URLResourceValues, DiskArbitration |
IOKit IOBlockStorageDriver statistics |
| Tier | Slow (30 s by default, and on mount/unmount) | Fast (2 s by default) |
Two consequences the interface states explicitly:
- Volume capacities must not be added together. With APFS, several volumes share one container and one pool of free space. Each of them reports the container's size and the same available space.
VolumeInfo.containerBSDName(shown asdisk3s1 ⊂ disk3) makes the sharing visible. ORIX Monitor never sums capacities. - Throughput is counted on physical devices, not on volumes. There is no per-volume I/O rate. Disk images appear as block devices, but their I/O is already counted on the device that stores the image file, so they are listed and excluded from the totals.
Stored metrics
Key (MetricID) |
Name | Unit | Quality | Source API | Stored value | Refresh |
|---|---|---|---|---|---|---|
disk.read (diskRead) |
Disk read | bytes per second | derived | IOKit IOBlockStorageDriver "Statistics" |
Σ Δ"Bytes (Read)" / Δ time over physical block devices, disk images excluded |
fast tier |
disk.write (diskWrite) |
Disk write | bytes per second | derived | same | Σ Δ"Bytes (Write)" / Δ time, same exclusion |
fast tier |
disk.free (diskFree) |
Startup volume available | bytes | measured | URLResourceValues.volumeAvailableCapacityForImportantUsage |
Available space of the volume flagged as root file system; includes purgeable space | read on the slow tier (30 s), stored on every tick with the last reading |
Default fast tier: 2 s while a window is visible, 5 s with only the menu bar, doubled on battery when the battery saver is on (see telemetry).
There is no percentage convention for throughput. Volume usage is shown as used / total where used = total − available.
Volumes
DiskCollector.volumes() enumerates FileManager.mountedVolumeURLs(includingResourceValuesForKeys:options: [.skipHiddenVolumes]) and skips volumes whose total capacity is zero.
| Field | Source | Meaning |
|---|---|---|
name |
volumeName |
Display name |
mountPoint |
URL path | Also the row identity |
format |
volumeLocalizedFormatDescription |
e.g. APFS |
total |
volumeTotalCapacity |
Size of the volume (of the container for APFS) |
free |
volumeAvailableCapacity |
Space free right now, without purging anything |
available |
max(volumeAvailableCapacityForImportantUsage, free) |
Space macOS says is available for important usage: free space plus what it can purge |
isRoot |
volumeIsRootFileSystem |
The startup volume |
isInternal, isRemovable, isReadOnly |
resource values | Shown as tags |
isNetwork |
!volumeIsLocal |
Network share |
bsdName |
DADiskGetBSDName |
e.g. disk3s1; absent for network volumes |
containerBSDName |
DADiskCopyWholeDisk → BSD name |
The whole disk or APFS container |
deviceModel, connection |
DADiskCopyDescription |
Device model, protocol |
"Available" versus "free"
Both are shown for every volume: "X available of Y" and "Z free without purging".
- Free is what the file system has unallocated now.
- Available additionally counts purgeable space (local snapshots, caches the system may delete, optimised storage). It is the figure Finder shows and the one that matters when deciding whether something fits.
disk.free— despite its key — stores the available figure of the startup volume. Its display name is "Startup volume available", and its catalogue method says "includes purgeable space". The default alert ("below 20 GB") and thediskExhaustionfinding work on this series.
max(important, free) guards against volumes for which the "important usage" key returns zero (some external and network volumes).
Physical activity
DiskCollector.activity(now:) iterates IOBlockStorageDriver services.
PhysicalDisk field |
Source |
|---|---|
bsdName |
Child media entry, BSD Name |
size |
Child media entry, Size |
model |
Parent device Device Characteristics["Product Name"]; "Disk Image" for virtual devices; the BSD name as a last resort |
mediumType |
Device Characteristics["Medium Type"] (e.g. solid state) |
interconnect |
Protocol Characteristics["Physical Interconnect"] |
isInternal |
Protocol Characteristics["Physical Interconnect Location"] == "Internal" |
isDiskImage |
Interconnect is Virtual Interface |
totalBytesRead, totalBytesWritten |
Statistics["Bytes (Read)"], ["Bytes (Write)"] — cumulative since boot (or since the device attached) |
readRate, writeRate |
DiskMath.rates: Δ bytes / Δ time |
readOpsRate, writeOpsRate |
Δ "Operations (Read/Write)" / Δ time — collected, not displayed |
Rate rules
CounterMath.deltatreats the counters as 64-bit: a decrease is a reset (device detached and re-attached), and the rate for that interval isnil, not a spike (detachedAndReattachedDiskGivesNoRate).- A device seen for the first time has no rate until its second sample.
- The machine totals are
nil(nothing stored) until at least one non-image device has produced a rate. - Elapsed time is monotonic and shared by all devices of one sample.
Displayed values
Disk page (DiskView):
| Card | Content |
|---|---|
| Volumes | Per volume: name, tags (Startup, Read-only, Removable), "available of total", usage meter (turns to the danger colour above 90 % used), format, mount point, BSD name and container, connection, "free without purging" |
| Throughput | Read and write readouts and a two-series live chart |
| Available space, startup volume | Readout ("Includes space macOS can purge") and live chart |
| Block devices | Device, model, connection and medium, size, read rate, write rate, total read, total written; disk images shown dimmed; note "Totals count from the last restart." |
| Not available | SSD health / wear / temperature; per-process disk throughput |
Elsewhere: dashboard "Storage" widget (first three volumes) and "Disk activity" widget, menu bar "Disk" indicator (R/W), History, Storage Analysis and System Overview reports.
Per-process cumulative disk bytes (ri_diskio_bytesread, ri_diskio_byteswritten) appear in the Processes inspector as "Read from disk" / "Written to disk" for the user's own processes.
Quality classes
derived— read and write rates.measured— available space, as reported by the system.
Limitations
- Network and non-block volumes have no activity. Traffic to a network share appears in network metrics, not here.
- Throughput is at the block layer. It includes everything the device does (paging, snapshots, Spotlight, other users), not only file I/O of visible apps.
- "Available" is a system estimate of reclaimable space; purging is at macOS's discretion and may not happen immediately.
disk.freetracks only the startup volume. Other volumes are shown live but have no history and no alert.- Slow-tier granularity. Available space is re-read every 30 s by default; the series repeats the last reading in between.
- Depends on IORegistry layout. A storage driver that publishes no
Statisticsdictionary is not listed. - Hidden volumes are skipped (
.skipHiddenVolumes): system volumes such as Preboot or Recovery do not appear.
Deliberately not shown
| Item | Reason |
|---|---|
| SSD health, wear level, SMART attributes, SSD temperature | NVMe SMART data is only reachable through privileged or private interfaces. ORIX Monitor "shows none rather than guess". |
| Per-process disk throughput (rates) | Only cumulative per-process bytes are available; no rate ranking is built from them. |
| Per-volume throughput | The kernel counts I/O per block device, not per volume. |
| A sum of volume capacities | It would double-count shared APFS containers. |
| Disk-image I/O in the totals | Already counted on the backing device. |
| Read/write operation rates (IOPS) and latency | Operation counts are collected by DiskMath but not surfaced; I/O latency is not collected at all. |
| File-level usage ("what takes space") | Out of scope; findings point to System Settings › General › Storage. |