[systemd-devel] Watchdog post action
Iñigo Martínez
inigomartinez at gmail.com
Tue Oct 20 02:51:50 PDT 2015
I have been using ExecStopPost with a combination of busctl's
introspect command over org.freedesktop.systemd1 interface properties.
I'm not sure about Result property being the best option, as it
doesn't reflect exactly a watchdog action, maybe a combination of
different properties, Result + ExecMainCode + ExecMainStatus.
Is there any information about the properties of those services ?
Thanks,
2015-09-29 21:12 GMT+02:00 Lennart Poettering <lennart at poettering.net>:
> On Tue, 29.09.15 16:39, Iñigo Martínez (inigomartinez at gmail.com) wrote:
>
>> I have been using systemd watchdog for controlling a home made daemon
>> by restarting it when some timeouts happens. I want to know when it is
>> happening, but I don't know how to do it.
>>
>> I was thinking on wrapping the daemon inside a script to do an action
>> if the daemon was killed, but if the daemon stops because a
>> segmentation fault for example I will not notice the difference.
>>
>> Is there anyway to do a post action when the watchdog happens ?
>
> You should be able to place something in ExecStopPost= that checks the
> Result bus property of the service.
>
> Lennart
>
> --
> Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list