From owner-freebsd-hackers@freebsd.org Wed Jun 26 15:15:38 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDB6215CAC2F; Wed, 26 Jun 2019 15:15:37 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A3A071AE7; Wed, 26 Jun 2019 15:15:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id g9dxh2vO1Gusjg9dyhhqjy; Wed, 26 Jun 2019 09:15:32 -0600 X-Authority-Analysis: v=2.3 cv=fOdHIqSe c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=dq6fvYVFJ5YA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=6rM6nHsMst5jgpFo25wA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from android-9b917f0ce39da6e6.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 5707541D; Wed, 26 Jun 2019 08:15:28 -0700 (PDT) Date: Wed, 26 Jun 2019 08:15:05 -0700 User-Agent: K-9 Mail for Android In-Reply-To: References: <30082.1561525622@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Limiting the size of syslogd output files using options in syslog.conf To: freebsd-hackers@freebsd.org, Ian Lepore , Poul-Henning Kamp CC: freebsd-embedded@freebsd.org From: Cy Schubert Message-ID: <79F61714-D4EC-4A15-90AF-0E48BE684244@cschubert.com> X-CMAE-Envelope: MS4wfGWx19XwILVjfMnqA7v0iw8Kzt1APITuDSB9n3Ts2A4Uq/U0YbC4CcchZmanBLsw6sPLE7ZHz91vTJKStVOX8ziqnfCqGrqvs8rhUSN6LctsUwdv9DT1 dhW4cxx+9LdyTH3kTLeRrrXruRBSxX6vNf5GohbTUitfF/4rMUmuUUX/75+IOD1ORWSytPwb45EsPFRXEF0ZYGnT72eWWtmmBFrNX01Q/6VUS3yVNVMFQVER w+lt30DsmGnszSpdF+MCDLUc/b+oC+3+TH/lBuUAI2j+d8n5pJLGXuCUhJhj5NTp X-Rspamd-Queue-Id: 2A3A071AE7 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-5.66 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; IP_SCORE(-2.47)[ip: (-6.45), ipnet: 64.59.128.0/20(-3.28), asn: 6327(-2.54), country: CA(-0.09)]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[138.136.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11,233.154.66.70.zen.spamhaus.org : 127.0.0.11]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jun 2019 15:15:38 -0000 On June 26, 2019 7:54:23 AM PDT, Ian Lepore wrote: >On Wed, 2019-06-26 at 05:07 +0000, Poul-Henning Kamp wrote: >> -------- >> In message < >> bf597c3830ebabbef6ac422a5d648e1eed13fac5=2Ecamel@freebsd=2Eorg>, Ian Le >> pore writes: >> > I've posted a review of a small syslogd change which lets you set a >> > limit on the size of syslogd output files in /etc/syslog=2Econf=2E T= he >> > idea is to prevent filling up a filesystem on emmc or sdcard or >> > other >> > small storage device on an embedded system with unexpected logging >> > triggered by some error or failing hardware=2E >>=20 >> You should consider fifolog(1) in such environments=2E >>=20 >>=20 > >fifolog looks pretty cool and I had no idea it existed, so thanks for >the pointer; I may find useful things to do with it=2E > >But for the problem of unexpected syslog spewage it has exactly the >same problem as running newsyslog very frequently: by design it >discards the information you most want preserved (the triggering event >that led to unexpected log spewage) while carefully preserving all the >following noise which is typically more about symptoms rather than >causes of the problem=2E=20 > >-- Ian > >_______________________________________________ >freebsd-hackers@freebsd=2Eorg mailing list >https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to >"freebsd-hackers-unsubscribe@freebsd=2Eorg" I suppose another knob to control the flow of syslog is ok but filling /va= r or however a person configures /var with multiple mount points, this is u= ltimately an AO problem=2E A monitor to invoke newsyslog, among other thing= s when a threshold is exceeded, whether %, free GB, or combination or slidi= ng scale, is a better job for an event handler=2E Devd is already an event = handler=2E Teaching devd and the kernel to trigger an % or GB event to subs= equently spawn a script or process to clean up, like calling newsyslog, cle= aning out /var/tmp, spool, cache, or elsewhere, let's say, a holistic appro= ach, might have broader application than a point solution=2E Just a thought=2E --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E