Blob Blame History Raw
From 51a993c94f70e1d18838dae05e10047a7b25c2f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Fri, 27 Dec 2013 17:14:24 -0500
Subject: [PATCH] core: show timeouts when watchdog howls

(cherry picked from commit a7850c7d1339b490ac021ff82c2081285ea28503)
---
 src/core/service.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/core/service.c b/src/core/service.c
index 2d8aa01445..73a0e849e8 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2550,11 +2550,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;