macOS 下的 configd 是什么?







configd 是 macOS 系统上负责许多本地系统配置的(核心)守护进程。目前,configd 承载的大多数配置代理用于建立和维护网络配置(接口名称、建立和维护IP地址、路由、网络代理等)。

configd is a system configuration daemon that runs behind Mac OS X, most users will never notice or see the core OS X process running in the background of their Macs. With that said, configd can sometimes act up and cause unusual CPU spikes and fan activity making your Mac sound like a wind tunnel. Odd configd behavior is easily diagnosed by launching Activity Monitor, sorting by the “% CPU” option, and seeing the ‘configd’ root user process sitting at the top taking up somewhere between 20-95% CPU. If that behavior lasts for a minute or so it’s usually not a big deal, temporary spikes can be normal so just let it run and ignore it, but there are times where configd can go inexplicably errant and it’ll sit around 50% CPU utilization or more for hours for no obvious reason – that is what we’re looking to resolve here.

$ man configd
The configd daemon is responsible for many configuration aspects of the local system.  configd maintains data reflecting the desired and current state of the system, provides notifications to applications when this data changes, and hosts a number of configuration agents in the form of loadable bundles.

Each configuration agent is responsible for a well-defined aspect of configuration management. The agents look to one or more input sources (preferences, low-level kernel events, configd notifications, etc) and, through a set of policy modules, interacts with the system to establish the desired operational configura-

Access to the data maintained by configd is via the SystemConfiguration.framework SCDynamicStore APIs.

At the present time, the majority of the configuration agents (or bundles) hosted by configd are used to establish and maintain the network configuration.  These agents include:

This bundle is responsible for monitoring kernel events and conveying changes to the network state (e.g. link status) to other configuration agents and interested applications.

This bundle provides a name to each of the system's network interfaces.  The bundle queries the IOKit Registry for a list of network devices attached to the system and gives them BSD style names such as "en0".

This agent is responsible for establishing and maintaining IPv4 and IPv6 addresses on the system.  These addresses may be manually specified in the network preferences or acquired using DHCP (or BOOTP), DHCPv6, and RTADV.

This agent is responsible for establishing and maintaining the primary network service, the default route, the active DNS configuration, and the active network proxies on the system.

This agent is responsible for establishing and maintaining the media type, media options, and MTU for ethernet interfaces.

This agent is responsible for conveying the network configuration preferences specified by the administrator to the various configuration agents (IPv4, IPv6, ...).

This agent is responsible for establishing and maintaining PPP connections on the system.


log show --predicate '(processImagePath contains "configd") && (eventMessage contains "en0: SSID ")' --style syslog --last 1d

根据我本机的实际测试,macOS 下的 log 命令记录了大概1个月以内的数据(这个应该和个人的实际使用产生的日志量大小有关,日志越多,记录的时间相应越短),一般排查还是够用了的。


configd: Fixing High CPU Usage Problems with the configd Process in Mac OS X

What Is configd, and Why Is It Running On My Mac?


What Is This Process and Why Is It Running on My Mac?


声明: 除非注明,ixyzero.com文章均为原创,转载请以链接形式标明本文地址,谢谢!


电子邮件地址不会被公开。 必填项已用*标注