From owner-freebsd-current@FreeBSD.ORG Tue May 12 22:29:38 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1049106566C for ; Tue, 12 May 2009 22:29:38 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id A2A788FC12 for ; Tue, 12 May 2009 22:29:38 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n4CMTbgX079532; Tue, 12 May 2009 15:29:37 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id 8yveizpynwsr3km7pk3umpjw5e; Tue, 12 May 2009 15:29:37 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <4A09F850.2080208@freebsd.org> Date: Tue, 12 May 2009 15:29:36 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090409 SeaMonkey/1.1.15 MIME-Version: 1.0 To: Garance A Drosehn References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, Dmitry Morozovsky Subject: Re: newsyslog(8) patch for both size and time checks X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 22:29:39 -0000 Garance A Drosehn wrote: > At 1:59 PM +0400 5/12/09, Dmitry Morozovsky wrote: >> >> for now, if log is configured to be rotated in time manner, its size >> is not checked ... >> >> The following simple patch should fix the problem. Any objection to >> commit this? > > It would fix your problem, but it changes the behavior as is explicitly > documented in 'man newsyslog.conf' . There is a paragraph in the man > page which makes it clear that if both fields are specified, then the > log file will only be rotated if both conditions are true. I've never liked that paragraph and find the documented behavior is much less useful than the proposed behavior. With the documented behavior, the effect is "rotate at this size, but no more often than XXX time interval", which serves to limit the number of log files created, but not the total size. In practice, /var/log total size is almost always the critical resource. If compatibility is essential, perhaps we could add a new flag to control this behavior. (I would argue for changing the default and providing a flag to obtain the old behavior.) Tim