Skip to main content

macOS

Plugin: macos.plugin Module: mach_smi

Overview

Monitor macOS metrics for efficient operating system performance, power sources, thermal pressure, sensors, fans, storage, and networking.

The plugin uses eight different methods to collect data:

  • The function sysctlbyname is called to collect network, swap, loadavg, and boot time.
  • The function host_statistics is called to collect CPU and virtual memory data.
  • The function IOServiceGetMatchingServices is called to collect storage information.
  • The function IOPSCopyPowerSourcesInfo is called to collect battery and UPS power source data.
  • The private Apple IOReport framework is loaded at runtime to collect Apple Silicon GPU utilization, performance-state residency, clock frequency, and power draw without root privileges when macOS exposes the required channels.
  • AppleSMC and IOHID are sampled directly to collect hardware temperature, fan, voltage, current, and power sensors without requiring powermetrics.
  • The native Apple powermetrics command is sampled in continuous loop mode to collect thermal pressure, plus fallback SMC temperatures, fan speed, and fallback GPU power when the macOS sampler is available.
  • The native IOKit NVMe SMART user client is sampled to collect NVMe health data when macOS exposes readable SMART-capable NVMe services.

This collector is only supported on the following platforms:

  • macOS

This collector only supports collecting metrics from a single instance of this integration.

Battery, UPS power-source, native Apple Silicon GPU, direct AppleSMC/IOHID hardware sensors, and native NVMe SMART metrics do not require external tools. Apple Silicon GPU metrics use the private IOReport framework loaded at runtime and gracefully disappear when unavailable. Exact thermal pressure and fallback GPU-power readings use the native Apple powermetrics command, which requires netdata to run with sufficient macOS privileges. The default sampler falls back through available sampler sets; without required privileges, the thermal sampler disables itself after repeated startup probe failures.

Default Behavior

Auto-Detection

The collector auto-detects macOS power sources, Apple Silicon IOReport GPU channels, AppleSMC/IOHID hardware sensors, and readable NVMe SMART-capable services, and only creates charts for values exposed by the hardware and operating system.

Limits

Power-source, AppleSMC, IOHID, and NVMe SMART enumeration are capped internally to avoid unexpected chart cardinality. IOReport GPU sampling is in-process and single-device. The powermetrics sampler runs as one long-lived loop process and only publishes newly received samples.

Performance Impact

Power-source, direct IOHID sensor, and IOReport GPU collection are lightweight. AppleSMC sensor key discovery is rate-limited, and AppleSMC sensor values default to a ten-second cadence because AppleSMC reads can generate macOS CoreAnalytics log traffic. Native NVMe SMART reads default to the same ten-second cadence as the existing NVMe collector, while device discovery is rate-limited. Thermal pressure collection keeps one powermetrics process running in loop mode at a configurable output interval, defaulting to once per second.

Setup

Prerequisites

No action required.

Configuration

Options

There are eight sections in the file which you can configure:

  • [plugin:macos:sysctl] - Enable or disable monitoring for network, swap, loadavg, and boot time.
  • [plugin:macos:mach_smi] - Enable or disable monitoring for CPU and Virtual memory.
  • [plugin:macos:iokit] - Enable or disable monitoring for storage device.
  • [plugin:macos:power_sources] - Enable or disable battery and UPS power-source metrics.
  • [plugin:macos:gpu] - Enable or disable Apple Silicon IOReport GPU monitoring.
  • [plugin:macos:sensors] - Configure direct AppleSMC and IOHID hardware sensor monitoring.
  • [plugin:macos:powermetrics] - Configure thermal and fan sampling through native Apple powermetrics.
  • [plugin:macos:nvme_smart] - Configure native IOKit NVMe SMART sampling.
Config options
OptionDescriptionDefaultRequired
enable load averageEnable or disable monitoring of load average metrics (load1, load5, load15).yesno
system swapEnable or disable monitoring of system swap metrics (free, used).yesno
bandwidthEnable or disable monitoring of network bandwidth metrics (received, sent).yesno
ipv4 TCP packetsEnable or disable monitoring of IPv4 TCP total packets metrics (received, sent).yesno
ipv4 TCP errorsEnable or disable monitoring of IPv4 TCP packets metrics (Input Errors, Checksum, Retransmission segments).yesno
ipv4 TCP handshake issuesEnable or disable monitoring of IPv4 TCP handshake metrics (Established Resets, Active Opens, Passive Opens, Attempt Fails).yesno
ECN packetsEnable or disable monitoring of ECN statistics metrics (InCEPkts, InNoECTPkts).autono
TCP SYN cookiesEnable or disable monitoring of TCP SYN cookies metrics (received, sent, failed).autono
TCP out-of-order queueEnable or disable monitoring of TCP out-of-order queue metrics (inqueue).autono
TCP connection abortsEnable or disable monitoring of TCP connection aborts metrics (Bad Data, User closed, No memory, Timeout).autono
ipv4 UDP packetsEnable or disable monitoring of ipv4 UDP packets metrics (sent, received.).yesno
ipv4 UDP errorsEnable or disable monitoring of ipv4 UDP errors metrics (Recieved Buffer error, Input Errors, No Ports, IN Checksum Errors, Ignore Multi).yesno
ipv4 icmp packetsEnable or disable monitoring of IPv4 ICMP packets metrics (sent, received, in error, OUT error, IN Checksum error).yesno
ipv4 icmp messagesEnable or disable monitoring of ipv4 ICMP messages metrics (I/O messages, I/O Errors, In Checksum).yesno
ipv4 packetsEnable or disable monitoring of ipv4 packets metrics (received, sent, forwarded, delivered).yesno
ipv4 fragments sentEnable or disable monitoring of IPv4 fragments sent metrics (ok, fails, creates).yesno
ipv4 fragments assemblyEnable or disable monitoring of IPv4 fragments assembly metrics (ok, failed, all).yesno
ipv4 errorsEnable or disable monitoring of IPv4 errors metrics (I/O discard, I/O HDR errors, In Addr errors, In Unknown protos, OUT No Routes).yesno
ipv6 packetsEnable or disable monitoring of IPv6 packets metrics (received, sent, forwarded, delivered).autono
ipv6 fragments sentEnable or disable monitoring of IPv6 fragments sent metrics (ok, failed, all).autono
ipv6 fragments assemblyEnable or disable monitoring of IPv6 fragments assembly metrics (ok, failed, timeout, all).autono
ipv6 errorsEnable or disable monitoring of IPv6 errors metrics (I/O Discards, In Hdr Errors, In Addr Errors, In Truncaedd Packets, I/O No Routes).autono
icmpEnable or disable monitoring of ICMP metrics (sent, received).autono
icmp redirectsEnable or disable monitoring of ICMP redirects metrics (received, sent).autono
icmp errorsEnable or disable monitoring of ICMP metrics (I/O Errors, In Checksums, In Destination Unreachable, In Packet too big, In Time Exceeds, In Parm Problem, Out Dest Unreachable, Out Timee Exceeds, Out Parm Problems.).autono
icmp echosEnable or disable monitoring of ICMP echos metrics (I/O Echos, I/O Echo Reply).autono
icmp routerEnable or disable monitoring of ICMP router metrics (I/O Solicits, I/O Advertisements).autono
icmp neighborEnable or disable monitoring of ICMP neighbor metrics (I/O Solicits, I/O Advertisements).autono
icmp typesEnable or disable monitoring of ICMP types metrics (I/O Type1, I/O Type128, I/O Type129, Out Type133, Out Type135, In Type136, Out Type145).autono
space usage for all disksEnable or disable monitoring of space usage for all disks metrics (available, used, reserved for root).yesno
inodes usage for all disksEnable or disable monitoring of inodes usage for all disks metrics (available, used, reserved for root).yesno
bandwidthEnable or disable monitoring of bandwidth metrics (received, sent).yesno
system uptimeEnable or disable monitoring of system uptime metrics (uptime).yesno
cpu utilizationEnable or disable monitoring of CPU utilization metrics (user, nice, system, idel).yesno
system ramEnable or disable monitoring of system RAM metrics (Active, Wired, throttled, compressor, inactive, purgeable, speculative, free).yesno
swap i/oEnable or disable monitoring of SWAP I/O metrics (I/O Swap).yesno
memory page faultsEnable or disable monitoring of memory page faults metrics (memory, cow, I/O page, compress, decompress, zero fill, reactivate, purge).yesno
disk i/oEnable or disable monitoring of disk I/O metrics (In, Out).yesno
battery capacityEnable or disable monitoring of battery capacity metrics.yesno
power supply voltageEnable or disable monitoring of battery and UPS voltage metrics.yesno
power supply currentEnable or disable monitoring of battery and UPS current metrics.yesno
battery temperatureEnable or disable monitoring of battery temperature metrics when exposed by macOS.yesno
battery cycle countEnable or disable monitoring of battery cycle count metrics when exposed by macOS.yesno
enabledEnable or disable Apple Silicon GPU monitoring through IOReport. The module creates charts only when macOS exposes the required IOReport GPU channels.yesno
SMC temperature sample everyHow often to read AppleSMC GPU temperature keys when IOHID GPU temperature is unavailable and AppleSMC is used as the fallback source.10sno
enabledEnable or disable direct AppleSMC and IOHID hardware sensor monitoring.yesno
SMC sensorsEnable or disable direct AppleSMC hardware temperature, fan, voltage, current, and power sensor monitoring.yesno
IOHID sensorsEnable or disable direct IOHID temperature, current, and voltage sensor monitoring.yesno
discovery everyHow often to rescan AppleSMC for available hardware sensor keys.300sno
SMC sample everyHow often to read values from discovered AppleSMC hardware sensor keys.10sno
sample everyOutput interval passed to the long-running native powermetrics loop sampler.1sno
sample windowOne-shot sampling window used while probing which powermetrics sampler set is available.1000msno
command timeoutMaximum extra time to wait for one powermetrics probe or loop sample before restarting the sampler.5000msno
use ndsudoRun the native Apple powermetrics sampler through Netdata's setuid ndsudo helper.yesno
command pathPath to the native Apple powermetrics command when use ndsudo is disabled./usr/bin/powermetricsno
thermal pressureEnable or disable monitoring of macOS thermal pressure state.yesno
SMC fan speedEnable or disable monitoring of SMC fan speed when available.yesno
SMC temperaturesEnable or disable monitoring of SMC CPU and GPU die temperatures when available.yesno
SMC thermal levelsEnable or disable monitoring of SMC thermal levels when available.yesno
SMC prochotEnable or disable monitoring of SMC processor-hot assertion flags when available.yesno
GPU powerEnable or disable fallback GPU power monitoring from powermetrics when IOReport GPU power is unavailable and the gpu_power sampler exposes a value.yesno
sample everyHow often to read native NVMe SMART data through IOKit.10sno
discovery everyHow often to rescan IORegistry for NVMe SMART-capable services.300sno

via File

The configuration file name for this integration is netdata.conf.

The file format is a modified INI syntax. The general structure is:

[section1]
option1 = some value
option2 = some other value

[section2]
option3 = some third value

You can edit the configuration file using the edit-config script from the Netdata config directory.

cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config netdata.conf
Examples
Disable swap monitoring

A basic example that discards swap monitoring

Config
[plugin:macos:sysctl]
system swap = no
[plugin:macos:mach_smi]
swap i/o = no

Disable complete Machine SMI section

A basic example that discards swap monitoring

Config
[plugin:macos:mach_smi]
cpu utilization = no
system ram = no
swap i/o = no
memory page faults = no
disk i/o = no

Disable thermal and fan sampling

Disable the privileged powermetrics sampler while keeping the rest of macos.plugin enabled.

Config
[plugin:macos]
powermetrics = no

Disable Apple Silicon GPU monitoring

Disable IOReport GPU monitoring while keeping other macOS metrics enabled.

Config
[plugin:macos]
gpu = no

Disable direct hardware sensor monitoring

Disable direct AppleSMC and IOHID hardware sensor monitoring while keeping the rest of macos.plugin enabled.

Config
[plugin:macos]
sensors = no

Disable native NVMe SMART sampling

Disable native IOKit NVMe SMART health monitoring while keeping generic disk I/O monitoring enabled.

Config
[plugin:macos]
nvme smart = no

Alerts

The following alerts are available:

Alert nameOn metricDescription
interface_speed net.netnetwork interface ${label:device} current speed

Metrics

Metrics grouped by scope.

The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.

Per macOS instance

These metrics refer to hardware and network monitoring.

This scope has no labels.

Metrics:

MetricDimensionsUnit
system.cpuuser, nice, system, idlepercentage
system.ramactive, wired, throttled, compressor, inactive, purgeable, speculative, freeMiB
mem.swapioio, outKiB/s
mem.pgfaultsmemory, cow, pagein, pageout, compress, decompress, zero_fill, reactivate, purgefaults/s
system.loadload1, load5, load15load
mem.swapfree, usedMiB
system.ipv4received, sentkilobits/s
ipv4.tcppacketsreceived, sentpackets/s
ipv4.tcperrorsInErrs, InCsumErrors, RetransSegspackets/s
ipv4.tcphandshakeEstabResets, ActiveOpens, PassiveOpens, AttemptFailsevents/s
ipv4.tcpconnabortsbaddata, userclosed, nomemory, timeoutconnections/s
ipv4.tcpofoinqueuepackets/s
ipv4.tcpsyncookiesreceived, sent, failedpackets/s
ipv4.ecnpktsCEP, NoECTPpackets/s
ipv4.udppacketsreceived, sentpackets/s
ipv4.udperrorsRcvbufErrors, InErrors, NoPorts, InCsumErrors, IgnoredMultievents/s
ipv4.icmpreceived, sentpackets/s
ipv4.icmp_errorsInErrors, OutErrors, InCsumErrorspackets/s
ipv4.icmpmsgInEchoReps, OutEchoReps, InEchos, OutEchospackets/s
ipv4.packetsreceived, sent, forwarded, deliveredpackets/s
ipv4.fragsoutok, failed, createdpackets/s
ipv4.fragsinok, failed, allpackets/s
ipv4.errorsInDiscards, OutDiscards, InHdrErrors, OutNoRoutes, InAddrErrors, InUnknownProtospackets/s
ipv6.packetsreceived, sent, forwarded, deliverspackets/s
ipv6.fragsoutok, failed, allpackets/s
ipv6.fragsinok, failed, timeout, allpackets/s
ipv6.errorsInDiscards, OutDiscards, InHdrErrors, InAddrErrors, InTruncatedPkts, InNoRoutes, OutNoRoutespackets/s
ipv6.icmpreceived, sentmessages/s
ipv6.icmpredirreceived, sentredirects/s
ipv6.icmperrorsInErrors, OutErrors, InCsumErrors, InDestUnreachs, InPktTooBigs, InTimeExcds, InParmProblems, OutDestUnreachs, OutTimeExcds, OutParmProblemserrors/s
ipv6.icmpechosInEchos, OutEchos, InEchoReplies, OutEchoRepliesmessages/s
ipv6.icmprouterInSolicits, OutSolicits, InAdvertisements, OutAdvertisementsmessages/s
ipv6.icmpneighborInSolicits, OutSolicits, InAdvertisements, OutAdvertisementsmessages/s
ipv6.icmptypesInType1, InType128, InType129, InType136, OutType1, OutType128, OutType129, OutType133, OutType135, OutType143messages/s
system.uptimeuptimeseconds
system.ioin, outKiB/s
macos.smc_thermal_levelcpu, gpu, iolevel
macos.smc_prochotcpu, smcstatus

Per gpu

These metrics refer to macOS GPU monitoring.

Labels:

LabelDescription
sourceData source

Metrics:

MetricDimensionsUnit
macos.gpu_utilizationutilizationpercentage
macos.gpu_performance_state_residencypstate_<index>_<mhz>mhzpercentage
macos.gpu_clock_freqfrequencyMHz
macos.gpu_power_drawpower_drawW
macos.gpu_temperaturetemperaturedegrees Celsius

Per power source

These metrics refer to macOS battery and UPS power sources.

Labels:

LabelDescription
deviceSanitized power-source name
sourceData source

Metrics:

MetricDimensionsUnit
powersupply.capacitycapacitypercentage
powersupply.voltagevoltageV
powersupply.currentcurrentA
powersupply.cyclescyclescycles

Per sensor

These metrics refer to macOS battery, CPU, GPU, fan, voltage, current, power, and thermal sensors.

Labels:

LabelDescription
driverSensor driver or macOS API source compatible with Linux hardware sensor grouping
subsystemHardware subsystem inferred from the sensor source, used with driver for Linux-compatible hardware sensor grouping
chip_idSensor chip or macOS service identifier
featureStable sensor feature identifier
nameHuman-readable sensor name
pathStable source path for the sensor
sourceData source
sensorSensor name
deviceSanitized device name when available

Metrics:

MetricDimensionsUnit
system.hw.sensor.temperature.inputinputdegrees Celsius
system.hw.sensor.fan.inputinputrotations per minute
system.hw.sensor.voltage.inputinputV
system.hw.sensor.current.inputinputA
system.hw.sensor.power.inputinputW
system.hw.sensor.state.inputnominal, moderate, heavy, sleeping, trapping, undefinedstatus

Per nvme device

These metrics refer to native macOS NVMe SMART-capable devices.

Labels:

LabelDescription
deviceSanitized NVMe device name
model_numberNVMe model number
sourceData source

Metrics:

MetricDimensionsUnit
nvme.device_estimated_endurance_percusedpercentage
nvme.device_available_spare_percsparepercentage
nvme.device_composite_temperaturetemperaturecelsius
nvme.device_io_transferred_countread, writtenbytes
nvme.device_power_cycles_countpowercycles
nvme.device_power_on_timepower-onseconds
nvme.device_unsafe_shutdowns_countunsafeshutdowns
nvme.device_critical_warnings_stateavailable_spare, temp_threshold, nvm_subsystem_reliability, read_only, volatile_mem_backup_failed, persistent_memory_read_onlystate
nvme.device_media_errors_ratemediaerrors/s
nvme.device_error_log_entries_rateerror_logentries/s

Per disk

This scope has no labels.

Metrics:

MetricDimensionsUnit
disk.ioread, writesKiB/s
disk.opsread, writesoperations/s
disk.utilutilization% of time working
disk.iotimereads, writesmilliseconds/s
disk.awaitreads, writesmilliseconds/operation
disk.avgszreads, writesKiB/operation
disk.svctmsvctmmilliseconds/operation

Per mount point

This scope has no labels.

Metrics:

MetricDimensionsUnit
disk.spaceavail, used, reserved_for_rootGiB
disk.inodesavail, used, reserved_for_rootinodes

Per network device

This scope has no labels.

Metrics:

MetricDimensionsUnit
net.netreceived, sentkilobits/s
net.packetsreceived, sent, multicast_received, multicast_sentpackets/s
net.errorsinbound, outbounderrors/s
net.dropsinbounddrops/s
net.eventsframes, collisions, carrierevents/s

Troubleshooting

GPU charts are missing

Apple Silicon GPU utilization, performance-state residency, clock frequency, and power draw charts require IOReport GPU channels. These channels are exposed by Apple Silicon GPU drivers and are not available on Intel Macs. The collector loads IOReport at runtime and disables the GPU module cleanly when the framework, DVFS table, or GPU channels are unavailable.

GPU power may still appear from powermetrics on systems where the gpu_power sampler exposes a plist gpu_power value and IOReport GPU power is unavailable. GPU temperature uses direct SMC/IOHID reads from the GPU module when available; otherwise, the powermetrics SMC path can still provide the same GPU temperature metric.

Thermal and fan charts are missing

Direct AppleSMC and IOHID hardware sensor charts do not depend on powermetrics. If temperature, fan, voltage, current, or power sensor charts are missing, the hardware or macOS driver may not expose readable AppleSMC or IOHID sensor values, or the [plugin:macos:sensors] module may be disabled.

The thermal pressure state chart depends on the native Apple powermetrics command. On macOS, powermetrics requires superuser privileges, so the default installation runs it through Netdata's setuid ndsudo helper with hard-coded allow-list entries for the probed sampler sets. Some Macs expose hardware sensors through AppleSMC while refusing powermetrics; in that case, hardware sensor charts can still appear while thermal pressure remains absent. If ndsudo is missing, not setuid root, or the allow-list rejects all startup probe commands, the sampler disables itself after repeated startup failures to avoid log noise. If the running loop exits later, Netdata probes again and restarts loop mode.

Battery, UPS power-source, and IOReport GPU charts do not depend on powermetrics and should still appear when macOS exposes their data.

NVMe health charts are missing

Native NVMe health charts appear only when macOS exposes NVMe SMART-capable services through IOKit and allows the native SMART user client to open them. The collector does not use nvme-cli or any external NVMe tool on macOS.

If generic disk I/O charts are present but NVMe health charts are absent, the device, controller, or macOS driver may not expose a readable native NVMe SMART user client. Some Apple internal Apple Fabric SSDs expose disk I/O and filesystem metrics but not detailed public NVMe health fields.


Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.