watchdog end-user interface

Andriy Gapon avg at FreeBSD.org
Wed Oct 19 11:10:48 UTC 2016


I know that there are people thinking about improving our watchdog
infrastructure.  Maybe it's time to discuss some ideas in public.

I would like to start with discussing the end-user, or rather administrative,
interface to the watchdog system.

watchdogd always had -t timeout option.
Not a too long time ago it has also grown a handful of new options:
--softtimeout
--softtimeout-action action
--pretimeout timeout
--pretimeout-action action

I want to question if those options really belong to watchdogd.
When a watchdog timer expires that results in a system-wide action (like a
system reset).  To me, that implies that there should be a single system-wide
configuration point.  And I am not sure that the daemon is the best choice for it.

Personally I would prefer a sysctl interface for the following reasons:
- easier to change the configuration
- easier to query current values
- easier to signal that a value getting set may be different from a requested value

In my opinion, watchdogd should only be concerned with running a check action
and patting the dog(s).  And, by extension, WDIOCPATPAT should not re-configure
the timeout, it should just reload the timers.

-- 
Andriy Gapon


More information about the freebsd-arch mailing list