summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-27 17:14:24 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-07-18 21:45:41 -0400
commita7850c7d1339b490ac021ff82c2081285ea28503 (patch)
tree3e5761b83993875179161cc2f7e16de589f6a9c9 /src
parentf7a5bb2842037fa27dbc99d92c3fee7fe1bbbc2a (diff)
core: show timeouts when watchdog howls
Diffstat (limited to 'src')
-rw-r--r--src/core/service.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 0f542edb4f..6a4665a1ae 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2551,11 +2551,15 @@ static int service_dispatch_timer(sd_event_source *source, usec_t usec, void *us
static int service_dispatch_watchdog(sd_event_source *source, usec_t usec, void *userdata) {
Service *s = SERVICE(userdata);
+ char t[FORMAT_TIMESPAN_MAX];
assert(s);
assert(source == s->watchdog_event_source);
- log_error_unit(UNIT(s)->id, "%s watchdog timeout!", UNIT(s)->id);
+ log_error_unit(UNIT(s)->id,
+ "%s watchdog timeout (limit %s)!",
+ UNIT(s)->id,
+ format_timespan(t, sizeof(t), s->watchdog_usec, 1));
service_enter_signal(s, SERVICE_STOP_SIGTERM, SERVICE_FAILURE_WATCHDOG);
return 0;