Releases: troglobit/watchdogd
watchdogd v4.0
Breaking changes: the
generic
script monitor has new syntax, the
status files have moved, and the format has changed. Also, the
default value forsafe-exit
in the .conf file has been changed.
Changes
-
Support for multiple watchdog devices added, issue #26
-
The format of
watchdogctl status
and/run/watchdogd/status
has
been changed to JSON and includes more information about the currently
running daemon and the capabilities of watchdog devices in use -
The
configure --with-$MONITOR=SEC
flag has been changed to not
take an argument (this was never used). To change the poll interval
of a system monitor, use the configuration file -
A new file system monitor:
fsmon /var { ... }
, multiple monitors,
fsmon /path
, are supported -
A new temperature monitor:
tempmon /path/to/sensor {...}
. It
supports multiple sensors, both thermal and hwmon type. See the
documentation for details -
The syntax for the generic monitor script has changed. This is a
breaking change, everyone must update. New syntax:generic /path/to/montor-script.sh { ... }
-
The generic scripts monitor now supports running multiple scripts
-
Documentation of the libwdog supervisor API by Andreas Helbech Kleist
-
API docs at https://codedocs.xyz/troglobit/watchdogd/wdog_8h.html
-
State file location changed from
/var/lib/
to/var/lib/misc/
.
This is the recommended location in the Linux FHS, and what most
systems use. Both the defaultwatchdogd.conf
and documentation has
been updated. Unless a file is specified by the user, the daemon will
automatically relocate to the new location at runtime. If the new
directory does not exist, the daemon will fall back to use the old
path, if it exists, issue #36 -
The default
watchdogd.conf
now enables reset reason by default.
This is a strong recommendation since it is then possible to trace
the reset cause also for system monitors -
Simplified README by splitting it into multiple files, some text even
moved entirely to man pages instead -
The status files cluttering up
/run
have been moved to their own
subdirectory,/run/watchdogd
. This includes the PID file, last boot
status, and the socket forwatchdogctl
. The latter remains the
recommended tool to query status and interact with the daemon -
The configure script flags for enabling system monitors have been
simplified. None of the monitors take an argument (poll seconds),
this because that is configured inwatchdogd.conf
Fixes
- Fix #28:
watchdogd
crash in case "Label" or "Reset date" field in
reset reason is empty. Found and fixed by Christian Theiss - Fix #30: replace Finit compile-time detection with runtime check, this
allows synchronized reboot usingwatchdogd
with Finit in Buildroot - Fix #39: generic monitoring script with runtime > 1 second cause
system to reboot. Found and fixed by Senthil Nathan Thangaraj - Fix #41: calling custom supervisor script cause
watchdogd
to disable
monitoring, regardless of script exit code. - Fix #43:
watchdogctl clear
, andwdog_reset_reason_clr()
API, does
not work. Regression introduced in v3.4. - The generic script plugin can now be disabled at runtime. Prior to
this release, it was not possible when once enabled. - The label (cause) of the system monitor forcing a reset is now saved in
the reset reason file. Previously only "forced reset" was the only
message, which without persistent logs did not say much.
watchdogd v3.5
Minor compat release; integration with Finit and new libite.
Changes
- Migrate from Travis-CI to GitHub Actions
- Use SIGTERM to signal PID 1, SIGINT Stops working in Finit v4.1
- Updated examples and manual page(s) with new 'enabled' setting
- Updated README with exact build example for correct paths
- Add support for new libite namespace, as of libite v2.5.0
watchdogd v3.4
Changes
- Clarify nomenclature: reset cause vs. reset reason
- Change layout and formatting of
watchdogctl
status output - Change defaults for supervisor, still disabled by default but now also with priority set to zero by default. This allows running the supervisor in cgroups v2 systems without realtime priority.
Fixes
- Fix missing pidfile touch on
SIGHUP
- Fix problem with plugins being enabled (but incomplete) by default. Now all sections have an
enabled = [true|false]
setting, and all are disabled by default. You need to uncomment end enable.
watchdogd v3.4-rc1
Changes
- Clarify nomenclature: reset cause vs. reset reason
- Change layout and formatting of watchdogd status output
Fixes
- Fix missing pidfile touch on
SIGHUP
watchdogd v3.3
Changes
- Increased severity of syslog messages preceding reboot, instead of
LOG_ERROR
all messages that result in a reboot useLOG_EMERG
because manysyslogd
services default to log emerg to console - Add handy summary of options to
configure
script
Fixes
- Fix possible garbled
next_ack
for users oflibwdog
due to badly handled timeout inpoll()
when connecting towatchdogd
- Fix
configure
script defaults for the following settings:--enable-compat
, was always enabled--enable-exampels
, were always enabled--enable-syslog-mark
, was always enabled
- Fix use-after-free bug in new script monitor, introduced in v3.2
watchdogd v3.2
Changes
- Issue #17: When the process supervisor is enabled
watchdogd
now always runs with elevated RT priority. Previous releases changed toSCHED_RR
only when the first supervised process connected, and conversely disbled RT prio when the last process disconnected. This change gives a more predictable behavior and also meanswatchdogd
can be relied upon until the system has been properly diagnosed - If the (optional) supervisor script returns OK (0) the timer for the offending process is now disarmed and the system is not rebooted.
- Retry handover from Finit buit-in watchdog if first attempt fails
- New generic script monitor, thanks to Tom Deblauwe. Can periodically call a site specific script, with timeout in case the script hangs
Fixes
- Fix #16: Only force reboot on exit if
watchdogd
is enabled - When disabling and the re-enabling
watchdogd
using the API the daemon was sometimes stopped by Finit. This happened because the daemon re-issued a watchdog handover signal to Finit. The fix is to only do the handover once. - When re-enabling
watchdogd
the supervisor was not properly elevating the RT priority, instead it remained as aSCHED_OTHER
process. This fix makes sure to save and re-use the configured RT priority.
watchdogd v3.2-rc1
Changes
- Issue #17: When the process supervisor is enabled
watchdogd
now always runs with elevated RT priority. Previous releases changed toSCHED_RR
only when the first supervised process connected, and conversely disbled RT prio when the last process disconnected. This change gives a more predictable behavior and also meanswatchdogd
can be relied upon until the system has been properly diagnosed - If the (optional) supervisor script returns OK (0) the timer for the offending process is now disarmed and the system is not rebooted.
- Retry handover from Finit buit-in watchdog if first attempt fails
- New generic script monitor, thanks to Tom Deblauwe. Can periodically call a site specific script, with timeout in case the script hangs
Fixes
- Fix #16: Only force reboot on exit if
watchdogd
is enabled - When disabling and the re-enabling
watchdogd
using the API the daemon was sometimes stopped by Finit. This happened because the daemon re-issued a watchdog handover signal to Finit. The fix is to only do the handover once. - When re-enabling
watchdogd
the supervisor was not properly elevating the RT priority, instead it remained as aSCHED_OTHER
process. This fix makes sure to save and re-use the configured RT priority.
watchdogd v3.1
Changes
- Supervised processes can now also cause reset if the ACK sequence is wrong when kicking or unsubscribing
- Issue #7: Add support for callback script to the process supervisor:
script = /path/to/script.sh
in thesupervisor {}
section enables it. When enabled all action is delegated to the script, which is called as:script.sh supervisor CAUSE PID LABEL
. For more information, see the manual forwatchdogd.conf
- A new command 'fail' has been added to
watchdogctl
. It can be used with the supervisor script to record the reset cause and do a WDT reset. The resetCAUSE
can be forwarded by the script to record the correct (or another) reset cause - Add
-p PID
towatchdogctl
. Works with reset and fail commands - Always warn at startup if driver/WDT does not support safe exit, i.e. "magic close"
- Issue #4: Add warning if
.conf
file cannot be found - Issue #5: Add recorded time of reset to reset cause state file
Fixes
- Omitting critical/reboot level from a checker plugin causes default value of 95% to be set, causing reboot by loadavg plugin. Fixed by defaulting to 'off' for checker/monitor critical/reboot level
- Issue #6: mismatch in label length between supervised processes and that in
wdog_reason_t
=> increase from 16 to 48 chars - Issue #11: problem disabling the process supervisor at runtime, it always caused a reboot
watchdogd v3.0
This release includes major changes to both the build system and the watchdogd
command line interface, making it incompatible with previous versions. Therefore the major version number has been bumped.
Application writes can now ask pkg-config
for CFLAGS
and LIBS
to use the process supervisor interface in libwdog.so
Reset cause is now queried and saved in /var/lib/watchdogd.state
at boot. Use the new watchdogctl
tool to interact with and query status from the daemon.
A configuration file, /etc/watchdogd.conf
, with many more options for the health monitor plugins, the process supervisor, and the reset cause.
Changes
- A configuration file,
/etc/watchdogd.conf
, has been added - A new tool,
watchdogctl
, to interact with daemon has been added - New official Watch Dog Detective logo, courtesy of Ron Leishman, licensed for use with the watchdogd project
- New or updated manual pages for daemon, ctrl tool, and the .conf file
- Health monitor plugins now support running external script instead of default reboot action
- Health monitor plugins no longer need critical/reboot level set, only warning is required to enable a monitor
- Completely overhauled
watchdogd
command line options and arguments. Some options in previous releases were not options but optional arguments, while others were useless options for a daemon:- Watchdog device node is now an argument not a
-d
option - No more
--logfile=FILE
option, redirectstderr
instead -n
now prevents the daemon from forking to the background-f
is now used by the--config
file option- When running in the foreground, output syslog also to
stderr
, unless the-s
, or--syslog
, option is given -l, --loglevel
replaces--verbose
option- Use BusyBox options
-T
and-t
for WDT timeout and kick, this replaces the previous-w
and-k
options
- Watchdog device node is now an argument not a
- No more support for attaching an external supervisor process using
SIGUSR1
andSIGUSR2
- Conversion to GNU Configure and Build system
- Native support for building Debian packages
- Default install prefix changed, from
/usr/local
to/
- Added
pkg-config
support tolibwdog
- Save reset cause in
/var/lib/watchdogd.state
, by default disabled enable with the .conf file - Possible to disble default reset cause backend and plug in your own. See
src/rc.h
for the API required of your own backend - Updates to
libwdog
API, including a compatiblity mode for current customer(s) usingwatchdogd
2.0 with a supervisor patch - Added
libwdog
example clients - Added customer specific compat
/var/run/supervisor.status
- Support for delayed reboot in user API,
wdog_reset_timeout()
- Fully integrated with Finit, PID 1. Both
reboot(1)
and reset viawatchdogd
, e.g.watchdogctl reset
, is delegated via Finit to properly shut down the system, sync and unmount all file systems before delegating the actual reset to the WDT.
watchdogd v3.0-beta1
This release includes some major changes to the build system and is incompatible with previous version due to changes in the command line options.
Changes
- Completely overhauled command line options and arguments. Some
options in previous releases were not options but optional arguments,
while others were useless options for a daemon.- No more
--logfile=FILE
option, redirectstderr
instead. - When running foreground, output syslog also to
stderr
, unless
the--syslog
option is given. - XXX: more changes later, e.g. device, safe-exit, etc.
- No more
Fixes
- XXX: Fix outstanding issues found by Coverity Scan