Vendredi 16 Octobre 2026 11:03:18 GMT+02:00

Netcrook

AccueilManifeste
Actualités
Techcrook
Geocrook
WikicrookÉquipeAppContact
EnglishItaliano

TECHCROOK

Hardware Watchdog Timer

A hardware watchdog timer is a small supervisory circuit that expects regular keepalive signals from a system and can force a reset if those signals stop. It is used to recover machines that stop making progress, including servers, appliances, and embedded controllers.

What it is

A hardware watchdog timer is an independent timing circuit, often built into a motherboard, system-on-chip, or add-on controller. Its job is simple: if the main processor and operating system do not periodically signal that they are still healthy, the watchdog assumes something has gone wrong and triggers a predefined action, usually a reset.

Unlike a software health check, the watchdog runs outside the normal code path. That makes it useful when the CPU is stuck in a deadlock, the kernel is spinning in a livelock, or the operating system has frozen far enough that normal services cannot respond.

How it works

Most watchdogs follow a basic pattern:

  • The system boots and starts the watchdog service or driver.
  • The software “pets” or “kicks” the watchdog at a fixed interval.
  • If the interval expires without a refresh, the watchdog times out.
  • The hardware then resets the machine, asserts an interrupt, or logs a fault, depending on its configuration.

Some implementations support a two-stage sequence. The first stage may produce a warning, NMI, or log entry; the second stage performs the reset if the system still does not recover. Others can be wired to an external supervisor or power controller in an embedded environment.

What specifications matter

The most important setting is the timeout window. If it is too short, normal load spikes or temporary pauses can cause unwanted resets. If it is too long, the machine may remain unavailable longer than necessary. Choosing a timeout usually means measuring the worst-case response time of the system under peak load, maintenance tasks, and storage delays.

Other details worth checking include:

  • Reset behavior: full reset, warm reset, power-cycle request, or interrupt-only mode.
  • Persistence: whether the watchdog continues through firmware stages or only after the OS loads.
  • Heartbeat method: driver API, daemon, or direct hardware register access.
  • Pre-timeout logging: support for breadcrumbs, panic dumps, or crash traces before reset.
  • Isolation: independence from the same power rail or software stack being supervised.

Where it helps and where it does not

Watchdogs are best at handling a system that has stopped making forward progress. That includes certain kernel hangs, stuck device drivers, blocked init systems, and embedded controllers that have become unresponsive. They are less useful for problems that still allow the heartbeat task to run, such as partial service failures, data corruption, or a bug that keeps the machine alive but breaks an application.

A watchdog also does not repair the root cause. It may restore service availability, but the underlying defect still needs investigation, patching, and testing. In some environments, repeated resets can even hide a recurring fault if logs and crash data are not preserved first.

Setup and common mistakes

Good deployment starts with a controlled test. Enable the watchdog in a lab or maintenance window, confirm the reset path, and verify that logs survive the event. Then check that the service responsible for petting the watchdog is tied to the right health signals. A process that only confirms “the daemon is alive” may miss a frozen kernel, while a check that is too strict may reboot a system that is merely busy.

Common mistakes include:

  • Using a timeout that is shorter than routine storage or boot delays.
  • Letting the watchdog be kicked by the same code path that might be hung.
  • Ignoring BIOS, BMC, or firmware settings that override the OS configuration.
  • Failing to record why the last reset happened.

Maintenance and operational use

A watchdog should be treated as part of the recovery plan, not a substitute for diagnosis. Periodically confirm that it still arms correctly after kernel updates, firmware changes, and service redesigns. In fleets, document which platforms use a built-in watchdog versus an external supervisor, because the reset behavior and logging can differ.

For operators, the practical value is straightforward: when a machine stops answering because core software is wedged, a hardware watchdog provides an independent path back to a known state. Used carefully, it can reduce time spent waiting on manual intervention and make availability failures easier to contain.

Back