syslogd(8) with OOM Killer protection

Maxim Konovalov maxim.konovalov at gmail.com
Wed Jan 27 12:16:11 UTC 2016


[...]
> I'm one that people. I find this generilized way very usefull.
> I have least a couple of daemons that it'd never wanted to be OOMed on
> my machines. Besides syslogd, I'd protect sshd and even crond in some
> cases.

While I agree with the generalization idea via protect(1) or similar
tool just a sidenote, sshd already has this feature:

>From sshd.c:

/* Avoid killing the process in high-pressure swapping
environments. */
if (!inetd_flag && madvise(NULL, 0, MADV_PROTECT) != 0)
	debug("madvise(): %.200s", strerror(errno));


-- 
Maxim Konovalov


More information about the freebsd-hackers mailing list