From: Luca Boccassi Date: Wed, 8 Mar 2023 12:59:40 +0000 (+0000) Subject: core: log message when reloading finishes X-Git-Tag: v254-rc1~1094 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af2fb2f250e664973d947554414749e9b94d68a1;p=thirdparty%2Fsystemd.git core: log message when reloading finishes Reloading might be slow, especially when under memory pressure, and watchdogs might be triggered. It is useful to have timestamped telemetry in the journal to see how long a reload takes. --- diff --git a/src/core/main.c b/src/core/main.c index 5469c55da73..0bd7937f54f 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1973,7 +1973,7 @@ static int invoke_main_loop( manager_send_reloading(m); - log_info("Reloading."); + log_info("Reloading..."); /* First, save any overridden log level/target, then parse the configuration file, * which might change the log level to new settings. */ @@ -1998,6 +1998,9 @@ static int invoke_main_loop( /* Reloading failed before the point of no return. * Let's continue running as if nothing happened. */ m->objective = MANAGER_OK; + else + log_info("Reloading finished in " USEC_FMT " ms.", + usec_sub_unsigned(now(CLOCK_MONOTONIC), m->timestamps[MANAGER_TIMESTAMP_UNITS_LOAD].monotonic) / USEC_PER_MSEC); continue; }