Date: Sun, 31 Jan 2016 14:45:11 +0000 From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.com> To: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: syslogd(8) with OOM Killer protection Message-ID: <56AE1DF7.9020402@NTLWorld.com> In-Reply-To: <alpine.BSF.2.20.1601270932220.30320@wonkity.com> References: <alpine.BSF.2.20.1601270932220.30320@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Warren Block:
> Possibly simpler to provide a list in one setting than an individual
setting for each daemon. With ideas from other posters:
> > oomprotect_daemons="crond syslogd"
Let me add my voice to Ian Lepore, Willem Jan Withagen, Allan Jude, and
Alan Somers. M. Withagen makes a good point that this is difficult to
machine-update and manage with system and package management tools. I
add to that, from the point of view of one whose programs will have to
parse this, it's difficult to machine-parse. One has to process two
levels of quoting (if one is doing it safely). This really is not a
simpler mechanism for the computers. The simpler rc.conf mechanism
definitely is the straightforward per-service yes/no
${service}_oomprotect flag.
And that's what I have just implemented in my toolset. Yes, I've used
the name "oomprotect", M. Lapore. (-:
root # rcctl get syslogd
flags=-c -ss
root # rcctl set syslogd oomprotect YES
root # rcctl get syslogd
flags=-c -ss
oomprotect=YES
root # cat "`rcctl find syslogd`"/service/run
#!/bin/nosh
#Run file generated from services/syslogd.service
#Vanilla BSD syslog daemon
oom-kill-protect -- fromenv
envdir env
sh -c "exec syslogd ${flags}"
root #
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56AE1DF7.9020402>
