From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2416 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Bogatov Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Log rotation issue with runit Date: Thu, 27 Dec 2018 09:36:28 +0000 Message-ID: References: <20181226015822.GH29946@home.lan> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1545903270 4572 195.159.176.226 (27 Dec 2018 09:34:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2018 09:34:30 +0000 (UTC) To: supervision@list.skarnet.org, 916230-quiet@bugs.debian.org Original-X-From: supervision-return-2006-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Dec 27 10:34:26 2018 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.84_2) (envelope-from ) id 1gcS3e-00014f-0l for gcsg-supervision@m.gmane.org; Thu, 27 Dec 2018 10:34:26 +0100 Original-Received: (qmail 3426 invoked by uid 89); 27 Dec 2018 09:37:01 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3417 invoked from network); 27 Dec 2018 09:36:57 -0000 In-reply-to: <20181226015822.GH29946@home.lan> Comments: In-reply-to Alex Efros message dated "Wed, 26 Dec 2018 03:58:22 +0200." Content-ID: <25084.1545903388.1@neophite> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2416 Archived-At: [2018-12-26 03:58] Alex Efros > Hi! > > I'm not sure is it good idea to include .u files in usual rotation proces= s > at all, and especially handle them just like .s files. If several crashes > happens for some reason in a short period of time this will result in > deletion of all log files except last (say) 10 .u files, which are usuall= y > small and may contain just one line. Replacing 10MB of last logs with 10 > last log lines doesn't sounds like a nice idea. > > Possible "right" solution will be to keep same amount of last .u files as > configured for .s files, i.e. if we've configured to keep last 10 files > then we may have at most double amount (10 .u files and 10 .s files). > (I didn't checked mentioned patches, so maybe they already works this way= =2E) Why would it be wrong to just keep appending to `current' instead of moving it to `.u' file? (see my patch at end of bug thread) And this issue happens not only on crash, it happens after every termination of svlogd, due any signal. I would agree that SIGKILL is crash, but issue reproduces with SIGINT and SIGTERM.