From owner-freebsd-hackers@freebsd.org Sun Jan 31 14:45:23 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 112BCA74F05 for ; Sun, 31 Jan 2016 14:45:23 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-3.server.virginmedia.net (know-smtprelay-omc-3.server.virginmedia.net [80.0.253.67]) by mx1.freebsd.org (Postfix) with ESMTP id 772BB1144 for ; Sun, 31 Jan 2016 14:45:21 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-3-imp with bizsmtp id CelL1s00M0HtmFq01elLP6; Sun, 31 Jan 2016 14:45:20 +0000 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=MtevkDue c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=C5OaT-PGtJu3Kg4S-YwA:9 a=QEXdDO2ut3YA:10 To: FreeBSD Hackers References: From: Jonathan de Boyne Pollard Subject: Re: syslogd(8) with OOM Killer protection Message-ID: <56AE1DF7.9020402@NTLWorld.com> Date: Sun, 31 Jan 2016 14:45:11 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2016 14:45:23 -0000 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 #