Skip to main content

macOS

Plugin: macos.plugin Module: mach_smi

Overview

Monitor macOS metrics for efficient operating system performance.

The plugin uses three different methods to collect data:

  • The function sysctlbyname is called to collect network, swap, loadavg, and boot time.
  • The functtion host_statistic is called to collect CPU and Virtual memory data;
  • The function IOServiceGetMatchingServices to collect storage information.

This collector is only supported on the following platforms:

  • macOS

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

Default Behavior

Auto-Detection

This integration doesn't support auto-detection.

Limits

The default configuration for this integration does not impose any limits on data collection.

Performance Impact

The default configuration for this integration is not expected to impose a significant performance impact on the system.

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

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

Alerts

The following alerts are available:

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

Setup

Prerequisites

No action required.

Configuration

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

Options

There are three 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.
Config options
NameDescriptionDefaultRequired
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

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


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