Closed danstiner closed 3 years ago
Can you add the awesome context you put in the PR description to a section in the README?
@haydenmc I can, if it's something we want to advertise supporting :)
Don't see why not. If it breaks for folks, they can file issues and we can decide what to do.
Maybe say that it's "experimental" support? :D
Support for optional systemd watchdog integration to automatically restart the service if it is deadlocked. For context see http://0pointer.de/blog/projects/watchdog.html
Compile time support is auto enabled if you have the systemd dev headers available (Ubuntu package
libsystemd-dev
). Runtime support is auto enabled if you set theWatchdogSec
systemd service option, this causesWATCHDOG_USEC
to be passed which enables this watchdog integration.Please be generous with the value for
WatchdogSec
. Strictly speaking the recommendation is to ping exactly everyWATCHDOG_USEC / 2
. To keep things simple I instead ping from the metadata reporting thread once per loop it does. This loop can take a variable amount of time as it does a lot of work. It loops through all streams to calculate stats, posts the metadata to Glimesh (including any retries it must do), and then sleeps forFTL_SERVICE_METADATAREPORTINTERVALMS
. The benefit of this is if there are any deadlocks the metadata reporting thread basically always locks up so it's a great indicator of service health.Recommended systemd options:
Optional options: