From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2577 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Laurent Bercot" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: s6-log problem with +regex Date: Fri, 10 May 2019 14:23:01 +0000 Message-ID: References: <1fd4f712-f743-68ff-f648-151004ecfb0b@heuristicsystems.com.au> Reply-To: "Laurent Bercot" Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="114844"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: eM_Client/7.2.34711.0 To: "Dewayne Geraghty" , supervision@list.skarnet.org Original-X-From: supervision-return-2167-gcsg-supervision=m.gmane.org@list.skarnet.org Fri May 10 16:22:23 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hP6Pm-000Tfp-Jh for gcsg-supervision@m.gmane.org; Fri, 10 May 2019 16:22:22 +0200 Original-Received: (qmail 12048 invoked by uid 89); 10 May 2019 14:22:44 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Original-Received: (qmail 12041 invoked from network); 10 May 2019 14:22:44 -0000 In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2577 Archived-At: >However without any control directive, the result is: >s6-log: usage: s6-log [ -d notif ] [ -q | -v ] [ -b ] [ -p ] [ -t ] [ -e >] [ -l linelimit ] logging_script > >Though running s6-log without a control directive is probably a little >silly, perhaps the requirement to have one may be worthwhile mentioning >in the doc. Again, I cannot reproduce that, either on Linux or on FreeBSD. Running s6-log without a control directive works as intended for me. Can you please paste the exact command line you're running that causes the issue for you ? >Aside: I had orginally placed >ErrorLog "|/usr/local/bin/s6-log -b n32 s50000 S7000000 >/var/log/httpd-error T !'/usr/bin/xz -7q' /var/log/httpd-error" >into apache24 which worked well in testing (one httpd), but of course in >production there are lots of httpd that do NOT use the parent for >logging errors, so locking is a problem. Locking won't be a problem unless your services are logging lines that are longer than (at least) 4 kB. For lines that are shorter than 4 kB, writing/reading a line through a pipe will be done atomically. In a normal Apache logging configuration, lines won't be too long, so you'll be fine. >Because I have three websites (3x error files, 3x access files) I was >looking at using 6 pipelines into two s6-log processes and regex's to >route the content. (hence my original example). Is this a good use of >resources or better to pipeline (funnel) to their own s6-log? It's entirely your choice. The s6-log process doesn't take a lot of resources on its own, so my default choice would be to use a s6-log process per log stream - because it's always easier to merge logs than it is to separate them. If your priority is to use the least amount of CPU, or if you're not sure, definitely use more s6-log processes and less regex matching. But if your priority is to use as little RAM as possible, you'll probably get slightly better results by funneling several log streams into one s6-log process and using some regex matching. I have not profiled this, though. -- Laurent