[systemd-devel] [ANNOUNCE] systemd v229

Lennart Poettering lennart at poettering.net
Mon Feb 15 13:20:18 UTC 2016


On Mon, 15.02.16 09:36, Umut Tezduyar Lindskog (umut at tezduyar.com) wrote:

> >> So, if I define, for example, RuntimeMaxSec=15s, that means unit should
> >> stop its job in the interval=[0; 14.59]s and 15.00s will be interval
> >> overflow with exit-code 'failure'. OK. But what if unit will stop its
> >> job on, e.g., 13th second? Exit-code=success?
> >
> > Yes.
> >
> > RuntimeMaxSec= just says "abort this shit if it takes longer than
> > this". The usecase is to use it for stuff which is not supposed to
> > take this long, and where it's better to abort it, and complain than
> > to leave it running unbounded.
> 
> What is a use case for this, can you give an example? I can make few

As mentioned, coredump processing is one (see other mail in the thread).

> for a Type=oneshot service (Note that this setting does not have any
> effect on Type=oneshot services) like "send this email, search this
> database" but I cannot come up with something for other service types.
> 
> However I think it would be nice to extend this to terminate say a
> service taking all available CPU within certain time.

Yeah, I thought about this. But there's no nice way to do this
currently. I figure this would need some extension in the "cpu"
cgroup controller, so that we get an actionable event from the
kernel. Because currently we'd have to keep watching the cgroup
attributes in a time-based loop and that's ugly.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list