From a6927d7ffc18c51fbb9940f5f1e89f5c7695ed63 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 1 Feb 2012 17:17:12 +0100 Subject: service: add watchdog timestamp This patch adds WatchdogTimestamp[Monotonic] to the systemd service D-Bus API. The timestamp is updated to the current time when the service calls 'sd_nofity("WATCHDOG=1\n")'. Using a timestamp instead of an 'alive' flag has two advantages: 1. No timeout is needed to define when a service is no longer alive. This simplifies both configuration (no timeout value) and implementation (no timeout event). 2. It is more robust. A 'dead' service might not be detected should systemd 'forget' to reset an 'alive' flag. It is much less likely to get a valid new timestamp if a service died. --- man/sd_notify.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'man/sd_notify.xml') diff --git a/man/sd_notify.xml b/man/sd_notify.xml index 020914607c..9797a5f801 100644 --- a/man/sd_notify.xml +++ b/man/sd_notify.xml @@ -151,6 +151,18 @@ itself. Example: "MAINPID=4711" + + + WATCHDOG=1 + + Tells systemd to + update the watchdog timestamp. + Services using this feature should do + this in regular intervals. A watchdog + framework can use the timestamps to + detect failed + services. + It is recommended to prefix variable names that -- cgit v1.2.3-54-g00ecf