$linuxjunkies
>

NMI watchdog

also: lockup detector, hardlockup detector, NMI

A kernel mechanism that detects and responds to system hangs by monitoring CPU activity through non-maskable interrupts (NMIs), triggering a panic or reboot when a CPU stops responding.

The NMI watchdog is a hardware-based safety feature that uses non-maskable interrupts to periodically check if each CPU core is still functioning and responsive. When enabled, a timer sends NMI signals that cannot be ignored by the kernel, ensuring detection even if normal interrupt handling is broken.

If a CPU fails to respond to the NMI within a timeout period (typically a few seconds), the watchdog assumes the system is deadlocked or hung. It can then trigger a kernel panic with a stack trace, allowing the system to reboot or be debugged before becoming completely unresponsive.

This is particularly valuable for remote servers or production systems where a hung kernel would otherwise require manual power cycling. You can control the watchdog via /proc/sys/kernel/nmi_watchdog or kernel parameters like nmi_watchdog=0 to disable it.

Related terms