[systemd-devel] Complex supervision structures/delegating watchdog?

Lennart Poettering lennart at poettering.net
Mon Feb 16 02:21:53 PST 2015


On Sat, 14.02.15 20:31, Holger Freyther (holger at freyther.de) wrote:

> Hi,

Heya,

> for one application we will spawn one or more pppd daemons. Once
> a link is up I would like to monitor them. The closest thing that
> I can do right now is "systemctl start mon@$PPP_IFACE" from within
> a /etc/ppp/ip-up.d/mon file.

Is your pppd daemon itself also a systemd service?

What precisely does "monitor" consist of for this case?

> In case I consider the link broken or I want to bring it down, I
> don't know how to do it. What options do I have? I can look at 
> /run/$PPP_IFACE.pid and then send a SIGHUP to the task (this
> requires that the monitor app is allowed to do that).
> 
> What would be neat is that if I could spawn a "watchdog" from
> with-in /etc/ppp/ip-up.d/mon for the existing service and that
> when the application exits (or doesn't respond/send watchdog
> messages to systemd) the "parent" will be stopped.

"parent"? as in parent process? Or the pppd's service?

> Is something like this already possible or wanted behavior? How
> would you handle that?

We have watchdog support already, with sd_notify(0, "WATCHDOG=1"), and
WatchdogSec=. But that requires you to run your pppd as a service of
its own, to be useful.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list