syslogd(8) with OOM Killer protection
Jonathan de Boyne Pollard
J.deBoynePollard-newsgroups at NTLWorld.com
Sun Jan 31 14:45:23 UTC 2016
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 #
More information about the freebsd-hackers
mailing list