From owner-freebsd-bugs@freebsd.org Mon Aug 27 20:49:06 2018 Return-Path: Delivered-To: freebsd-bugs@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 761331095E11 for ; Mon, 27 Aug 2018 20:49:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 3501182D26 for ; Mon, 27 Aug 2018 20:49:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id ED5BC1095E0D; Mon, 27 Aug 2018 20:49:05 +0000 (UTC) Delivered-To: bugs@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 B2FCC1095E0A for ; Mon, 27 Aug 2018 20:49:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7675882D24 for ; Mon, 27 Aug 2018 20:49:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id AA1DC18BB0 for ; Mon, 27 Aug 2018 20:49:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w7RKn43x031578 for ; Mon, 27 Aug 2018 20:49:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w7RKn4YW031576 for bugs@FreeBSD.org; Mon, 27 Aug 2018 20:49:04 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 230961] man page for newsyslog.conf(5) says that when specified, "BOTH" size conditions must be met. It should be "EITHER". Date: Mon, 27 Aug 2018 20:49:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Documentation X-Bugzilla-Component: Manual Pages X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jamie@catflap.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 20:49:06 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230961 --- Comment #1 from Jamie Landeg-Jones --- The man page for newsyslog.conf(5) says that if both a size and a time inte= rval are specified, BOTH conditions must be satisfied for the file rotation to t= ake place: > Time based trimming happens only if newsyslog(8) is run within one hour = of the specified time. If an interval is specified, the log file will be trim= med if that many hours have passed since the last rotation. When both a time a= nd an interval are specified then both conditions must be satisfied for the rotation to take place. This is wrong. The rotation will take place if EITHER condition takes place. Consider this test, creating an entry that will be rotated when the file si= ze reaches 10Mb, and the file is older than a day: Cheers, Jamie # echo "/tmp/test 555 10 10000 24 N" >> /etc/newsyslog.conf # touch /tmp/test # newsyslog -v /tmp/test Processing /etc/newsyslog.conf Found: /etc/newsyslog.conf.d/* Found: /usr/local/etc/newsyslog.conf.d/* /tmp/test <10>: size (Kb): 0 [10000] age (hr): -1 [24] --> trimming log.... # l /tmp/test* 4 -r-xr-xr-x 1 root wheel - 61 27 Aug 21:07 /tmp/test 4 -r-xr-xr-x 1 root wheel - 61 27 Aug 21:07 /tmp/test.0 # newsyslog -v /tmp/test Processing /etc/newsyslog.conf Found: /etc/newsyslog.conf.d/* Found: /usr/local/etc/newsyslog.conf.d/*=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 /tmp/test <10>: size (Kb): 1 [10000] age (hr): 0 [24] --> skipping # dd if=3D/dev/random bs=3D1k count=3D10 | od -c > /tmp/test 10+0 records in=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 10+0 records out 10240 bytes transferred in 0.000317 secs (32312115 bytes/sec) # l /tmp/test* 48 -r-xr-xr-x 1 root wheel - 47,103 27 Aug 21:09 /tmp/test 4 -r-xr-xr-x 1 root wheel - 61 27 Aug 21:07 /tmp/test.0=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 # newsyslog -v /tmp/test Processing /etc/newsyslog.conf Found: /etc/newsyslog.conf.d/* Found: /usr/local/etc/newsyslog.conf.d/* /tmp/test <10>: size (Kb): 46 [10000] age (hr): 0 [24] --> skipping # l /tmp/test* 48 -r-xr-xr-x 1 root wheel - 47,103 27 Aug 21:09 /tmp/test 4 -r-xr-xr-x 1 root wheel - 61 27 Aug 21:07 /tmp/test.0 # touch -r /COPYRIGHT /tmp/test.0 # l /tmp/test* 48 -r-xr-xr-x 1 root wheel - 47,103 27 Aug 21:09 /tmp/test 4 -r-xr-xr-x 1 root wheel - 61 24 Jun 2017 /tmp/test.0 # newsyslog -v /tmp/test Processing /etc/newsyslog.conf Found: /etc/newsyslog.conf.d/* Found: /usr/local/etc/newsyslog.conf.d/* /tmp/test <10>: size (Kb): 46 [10000] age (hr): 10302 [24] --> trimming log.... # l /tmp/test* 4 -r-xr-xr-x 1 root wheel - 61 27 Aug 21:10 /tmp/test 48 -r-xr-xr-x 1 root wheel - 47,164 27 Aug 21:10 /tmp/test.0 4 -r-xr-xr-x 1 root wheel - 61 24 Jun 2017 /tmp/test.1 --=20 You are receiving this mail because: You are the assignee for the bug.=