watchdogd, the daemon that can decide your Mac has hung
watchdogd is the daemon that checks macOS is still making progress, and it can deliberately restart a Mac that has hung. Measured on a real Mac: two seconds of CPU a day.
By Chethan Kumar S N · Updated
Every daemon in this series has been measured by the work it does. How much processor time, how much memory, how many doors it opens. watchdogd is the first one worth measuring by the work it prevents. Two seconds of CPU a day, 1.2 MB of memory, and standing authority to restart the entire machine.
The name is the job. A watchdog timer is an old idea from servers and embedded systems: a timer that must be reset periodically by something proving it is alive, and if the resetting stops, the timer expires and the hardware reboots. The assumption is blunt. A hung machine fixes nothing, serves nobody, and cannot even report that it is hung, so the cheapest recovery is a restart nobody has to be present for.
macOS runs that idea as /usr/libexec/watchdogd, and this page is the usual treatment: what Apple says about it, what it does on a real Mac, and what to do when its name shows up next to the word panic.
What the manual says
Here is the entire description, verbatim:
watchdogd ensures that the system is healthy and able to make forward progress throughout the system lifecycle. If watchdogd or the Watchdog KEXT determine that the system is unhealthy they will attempt to take corrective action and ultimately may panic the system to get it back to a usable state. This command is not intended to be invoked directly.
The file is /usr/share/man/man8/watchdogd.8, 531 bytes, dated November 9 2018. Three sentences, and every one of them earns its place. The first names the standard the daemon holds the system to: forward progress. The second admits the endgame: panic. The third tells you not to run it yourself, which is the same advice this page will end on.
A detail worth knowing before anything else: unlike most of the lowercase daemons in this series, the file is not in /usr/sbin with the others. It lives in /usr/libexec, the directory of helpers the system starts for itself. You can read it yourself:
man watchdogd
ls -l /usr/share/man/man8/watchdogd.8
ls -l /usr/libexec/watchdogd
The measurements
Everything below was measured read only, on one Mac: macOS 27.0.1, an M1 Pro with ten cores, twenty six days and eleven hours past its last boot.
ps -Awwo pid,ppid,user,rss,time,etime,args | grep [w]atchdogd
436 1 root 1200 0:53.10 26-11:07:39 /usr/libexec/watchdogd
Read it the way the series has learned to. Parent process 1 is launchd, so it started at boot and belongs to no user session. The user is plain root, not one of the reserved accounts like _trustd or _coreaudiod, because a watchdog must survive the deaths of everything that might be watched. The memory figure, 1,200 KB, is the smallest resident footprint measured in this series, smaller than the sandbox clerk’s 4 MB and a rounding error next to the sound server’s 20 to 33 MB.
Fifty three seconds of processor time across twenty six days works out to about two seconds a day, or roughly two thousandths of one percent of a single core. This is a daemon that costs nothing to run, on purpose. Its value is not in doing. Its value is in being there.
The binary is 568,160 bytes, built for x86_64, arm64e and arm64e.x1, so unlike the newest arrivals in this series it still carries an Intel slice. Its signing record reports Identifier=com.apple.watchdogd with platform identifier 26, Apple’s own class of signature for operating system files. And its entire vocabulary is 621 strings, in the same lean register as the preferences daemon’s six, which tells you most of the work is not done in this process at all. It is done in the kernel and the chip.
A heartbeat every ten seconds
The unified log shows what those two seconds a day buy. In one day, watchdogd wrote 32,240 lines, from a thread whose registered name is service-monitoring-thread. They arrive in bursts on a ten second tick, timestamped to fractions of a millisecond:
21:07:14.412 watchdogd[436] [com.apple.watchdogd:service-monitoring-thread]
21:07:24.412 watchdogd[436] [com.apple.watchdogd:service-monitoring-thread]
21:07:34.412 watchdogd[436] [com.apple.watchdogd:service-monitoring-thread]
21:07:44.413 watchdogd[436] [com.apple.watchdogd:service-monitoring-thread]
That is the heartbeat. Services check in, the daemon records who answered, and the record of the round is written with a precision that exists so a hang can be timed after the fact. Eight times a minute, every minute, all day, on every Mac.
There is a second fact about those 32,240 lines, and it is the quiet one: every single one of them is redacted. The log system prints <private> where the content would be. A daemon whose whole job is noticing when the system is stuck keeps even its healthy-state records closed, which is consistent with everything else about it. You can watch it tick, but not read what it says, and both of those are by design.
Four watchdogs in the silicon
The manual’s second sentence splits the job between watchdogd and something called the Watchdog KEXT, a kernel extension. On an Apple silicon Mac, that partner is visible in the device tree, and it is worth seeing, because it holds the actual teeth:
ioreg -r -c AppleARMWatchdogTimer -l
The node reports, among other properties:
"IOClass" = "AppleARMWatchdogTimer"
"PanicWatchdogEnabled" = Yes
"PanicSMCWatchdogEnabled" = Yes
"ShutdownWatchdogEnabled" = Yes
"IOKitQuiesceWatchdogEnabled" = Yes
"IOPlatformPanicAction" = 1000
"IOPlatformSleepAction" = 350
"IONameMatched" = "wdt,s5l8960x"
Count them. Four distinct watchdogs in one hardware node: a panic watchdog, an SMC watchdog, a shutdown watchdog, and a quiesce watchdog for the moment drivers settle. The panic action is set to 1000, which reads as its timeout budget in milliseconds, one second. When the kernel stops making forward progress, the chip itself is willing to pull the plug, with no operating system present to help.
The last line is a small piece of archaeology. wdt,s5l8960x is a device tree name, and s5l8960x is the Apple A7, the chip in the iPhone 5s from 2013. The watchdog block was named when the A7 was new, the name was kept for every chip since, and the M1 Pro in the Mac measured here answers to it still. Thirteen years of Apple silicon have shipped with a node named after the first one.
The panic connection
The search that brings most people to this daemon’s name is the pair of words kernel panic, and the connection is real in both directions.
In the daemon’s own 621 strings is the line it writes into the record when it acts:
, %lld seconds since last crashed by watchdogd,
That is a format string, and the blank is a count of seconds. When watchdogd forces a panic, the report can say how long it had been since the last time the same thing happened. Beside it sit paths for the diagnostics it saves on the way down, files named like watchdog-%s.tailspin and watchdog-%s-ddt-%s.txt, which land in the system’s diagnostic reports folder when the event occurs.
It is worth being precise about what that means for the panic you may be reading this page after. When a report names watchdogd, the daemon is nearly always the reporter, not the cause. The system hung for some reason, the watchdog’s ten second rounds stopped getting answers, and the restart it forced is the thing you noticed. Apple’s own article on the subject, “If your Mac restarted because of a problem”, puts the usual causes plainly: unexpected restarts are usually caused by software installed on your Mac, or by devices connected to your Mac. It also describes the failure mode of a reboot loop, where a Mac that restarts every time it attempts to start up eventually shuts down, and it walks through the software and hardware checks for exactly that case.
For the record of what a healthy run looks like: across the twenty six days measured here, the diagnostic reports folder held no kernel panic files at all. The watchdog stood every round, nothing hung long enough to expire, and the daemon’s two seconds a day were the entire visible cost.
The test harness, and the word defanged
The smallest interesting corner of this daemon is what its strings reveal about how Apple tests it. Six internal helper paths are compiled in:
/usr/local/libexec/watchdogtestcontroller
/usr/local/libexec/watchdogtestdaemon
/usr/local/libexec/watchdogtestephemeral
/usr/local/libexec/watchdogtestexclave
/usr/local/libexec/watchdogtestoptin
/usr/local/libexec/watchdogtestunblock
None of those files exist on a customer Mac. They are the harness engineers point at the watchdog to prove it bites, and the methods the daemon can call on its kernel partner are named just as directly: test a CPU hang, test an IOKit busy loop, test the SoC watchdog. There are boot arguments to match, including one that means exactly what it says, panic immediately, and one to skip a reactive unblock action.
One method name in the set is the most telling word in the binary: kIOWatchdogDaemonCheckUserspaceDefanged. Defanged. Alongside it sit calls to disable and re-enable userspace monitoring. The picture the vocabulary paints is of a watchdog whose teeth in hardware are permanent, while the userspace half can be dialed back, and of an engineering team that needs the ability to blunt it on test machines so a lab Mac can hang on purpose without restarting itself.
You can check the boot arguments on your own Mac with nvram boot-args. On the Mac measured here, none are set. That is the shipping state: the watchdog runs at full attention, unmodified, and there is no reason to change it.
The system watches the watcher
The launch job that starts watchdogd is /System/Library/LaunchDaemons/com.apple.watchdogd.plist, and it differs from every other plist in this series in one respect. It carries a private key, _PanicOnCrash, with PanicOnConsecutiveCrash set to true. launchctl’s summary of the job prints the plain consequence: panic on consecutive crashes.
Sit with that for a second. The daemon whose job is to panic a hung system is itself configured so that if it starts crash looping, the system panics. A watchdog that dies quietly is a watchdog nobody has, so the system treats the watcher’s own death as an emergency of the same class as the hangs it watches for. The floor is load bearing all the way down.
The rest of the job description is what you would expect for something that must never be gone: launchd keeps it alive, it is stopped with a signal at shutdown rather than merely asked to exit, and its record on the Mac measured here is the cleanest launchd line in the series:
launchctl print system/com.apple.watchdogd
state = running
runs = 1
last exit code = (never exited)
immediate reason = semaphore
One start, no exits, since boot. The start reason, semaphore, differs from the Mach message starts of most daemons here, because this job is triggered when the kernel’s watchdog driver appears in the device tree, an event launchd is told to watch for. The system brings the watchdog up as early as the hardware allows.
The plist names two services, and their names describe the whole contract. One is com.apple.unblock, the door a stuck system state gets cleared through, with a matching string in the binary about a reactive unblock action. On the Mac measured here its state reads active = 0, meaning no client was checked in at the moment of reading, which is what healthy looks like. The other is com.apple.watchdogd.optin.registration, the door services use to volunteer for extra watching, with a stash file under /var/db/ for the list. That file does not exist here. Nobody on this Mac has asked the watchdog to watch them specially. The default round is enough.
Three other pages in this series have met the word watchdog before. The network daemon configd reserves a Mach service named after a watchdog for itself, the window server registers one too, and the device discovery daemon remoted counts one among its six Mach services, but those are per-daemon liveness checks, private arrangements between launchd and one service. watchdogd is the other thing: the system wide one, the one with the hardware timer behind it, the one that answers to nobody when it decides the machine has hung.
What to do about it
Nothing, in the normal case. It runs as root, so it is filtered out of Activity Monitor’s default My Processes view; switch the View popup to All Processes and it appears near the bottom of the memory sort, too small to matter. The commands that fail without an administrator password tell the truth about access. Sampling it produces:
sample watchdogd 1 1
sample cannot find any existing process you have access to which has a
name like 'watchdogd'; try running with `sudo`.
If this page found you after a restart you did not choose, the order of operations is Apple’s, and it works: read the report the Mac offers after the restart, install available updates, check the apps and devices connected to the machine, and let the pattern of repeats tell you whether it is software, a peripheral or hardware. The watchdog will have done its part, which is to bring the machine back to a state where you can.
Related guides
- What is kernel_task on a Mac?, the other half of system self protection, the one that slows things down instead of restarting them
- What Is WindowServer on a Mac?, whose own private watchdog service is the per-app pattern this page distinguishes from the system one
- What Is configd on Mac?, the network daemon that reserves a watchdog door for itself
- Why is my Mac running slow?, for reading a busy Mac honestly before deciding anything is broken
Questions
What is watchdogd on Mac?
It is the system's own watchdog. Its manual, three sentences from 2018, says it ensures the system is healthy and able to make forward progress, and that if watchdogd or the Watchdog KEXT determine the system is unhealthy, they will attempt to take corrective action and ultimately may panic the system to get it back to a usable state. In practice it taps services on a ten second tick, watches for hangs, and cooperates with a hardware timer in the chip that can restart the whole machine. On the Mac measured here it spent two seconds of processor time a day on this, which is the whole cost of the insurance.
Why is watchdogd connected to kernel panics?
Because forcing a restart is part of its job when the system stops making progress. The daemon's own binary carries the string that goes into panic reports, seconds since last crashed by watchdogd, and it writes diagnostic files whose names begin `watchdog-` when it acts. But note the direction of the arrow. When you see watchdogd next to a panic, it is almost always the reporter, not the cause. Something else hung the system, the watchdog noticed, and the restart it forced is what produced the message. Apple's article on unexpected restarts says they are usually caused by software installed on your Mac, or by devices connected to it, and that is where to look.
Why is watchdogd running, and is its CPU usage normal?
It has been running since your Mac booted, as a root system daemon, and it should be nearly invisible. On the Mac measured here it used 53 seconds of processor time across 26 days of uptime, about two seconds a day, with 1.2 MB of memory. If Activity Monitor shows watchdogd doing noticeable work for a sustained period, treat it as a symptom rather than a culprit. Something is repeatedly blocking or starving the system, and the interesting entry is whatever sits next to it in the CPU column. Killing the daemon does nothing about that, and it comes straight back.
Can you stop or disable watchdogd?
You should not, and the system is built to make sure you cannot do it by accident. The launch job is configured so launchd restarts it if it exits, and the plist carries a setting that panics the system on consecutive crashes of this very daemon. The hardware watchdog in the chip can be influenced with boot arguments, and Apple's own engineers have flags for tests, with names like the one for panicking immediately, but none of that belongs on a Mac you use. There is no setting in System Settings for it, because it is not a feature. It is part of the floor.
What is /usr/libexec/watchdogd, and is it a virus?
It is the watchdog daemon's program file, and it is Apple's. You can check in five seconds: the command codesign with the dv flags on that path reports Identifier=com.apple.watchdogd with a platform signature, the class of signing Apple reserves for the operating system's own files, and the file sits in the system's read only sealed volume. Malware does imitate system process names, so the path column in Activity Monitor is the honest test. A real watchdogd always lives at /usr/libexec/watchdogd. If a process with this name is running from anywhere else, that is worth a much closer look.
Ready? Buy Ribbon for $15, or read all the guides.