MCPcopy Create free account
hub / github.com/Icinga/icinga2 / NotifyWatchdog

Function NotifyWatchdog

lib/cli/daemoncommand.cpp:444–452  ·  view source on GitHub ↗

* Notify the watchdog if not notified during the last 2.5s. */

Source from the content-addressed store, hash-verified

442 * Notify the watchdog if not notified during the last 2.5s.
443 */
444static void NotifyWatchdog()
445{
446 double now = Utility::GetTime();
447
448 if (now - l_LastNotifiedWatchdog.load() >= 2.5) {
449 sd_notify(0, "WATCHDOG=1");
450 l_LastNotifiedWatchdog.store(now);
451 }
452}
453#endif /* HAVE_SYSTEMD */
454
455/**

Callers 2

StartUnixWorkerFunction · 0.85
RunMethod · 0.85

Calls 2

loadMethod · 0.80
storeMethod · 0.80

Tested by

no test coverage detected