On Tue, 25.04.17 11:30, Jeremy Eder (je...@redhat.com) wrote:

> If we have a service that is flapping because it's crashing after
> startup...what's the right way to monitor for that condition?  Eventually
> it triggers startburstlimit, was thinking that if we hit startburstlimit
> that the service could set some special bit that we could look for.
> 
> Like ... systemctl is-flapping myservice --quiet
> 
> Any other possibilities?

The unit will be placed in "failed" state if the start burst limit is
hit. it will be placed in that state in other conditions too, hence to
determine the precise reason why your service entered that state check
the "Result" property on it.

# systemctl show -p Result my.service

Yes, this is a bit uncerdocumented.

On recent systemd versions you can also add a drop-in to your service
that defines an ExecStop= stanza. The program you specify there will
receive an env var $SERVICE_RESULT with the same value.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to