From mi@xxx.video-collage.com  Tue Jun 23 11:18:27 1998
Received: from www.video-collage.com (www.video-collage.com [206.15.171.132])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA04577
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 23 Jun 1998 11:18:23 -0700 (PDT)
          (envelope-from mi@xxx.video-collage.com)
Received: from xxx.video-collage.com (xxx.video-collage.com [199.232.254.68])
	by www.video-collage.com (8.8.5/8.8.5) with ESMTP id OAA13693
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 23 Jun 1998 14:15:39 -0400 (EDT)
Received: (from root@localhost)
	by xxx.video-collage.com (8.8.8/8.8.7) id OAA20948;
	Tue, 23 Jun 1998 14:17:57 -0400 (EDT)
	(envelope-from mi)
Message-Id: <199806231817.OAA20948@xxx.video-collage.com>
Date: Tue, 23 Jun 1998 14:17:57 -0400 (EDT)
From: Mikhail Teterin <mi@video-collage.com>
Reply-To: mi@aldan.algebra.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: newsyslog's new option
X-Send-Pr-Version: 3.2

>Number:         7033
>Category:       bin
>Synopsis:       Same process notified multiple times
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gad
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 23 11:20:01 PDT 1998
>Closed-Date:    Mon Sep 20 20:17:08 GMT 2004
>Last-Modified:  Mon Sep 20 20:17:08 GMT 2004
>Originator:     Mikhail Teterin
>Release:        FreeBSD 3.0-CURRENT
>Organization:
Virtual Estates, Inc.
>Environment:

>Description:

	After finishing rotating the logs, newsyslog duly notifies the
	processes involved. The last (optional) argument on the line
	specifies the file the process-id of the process to be notified.
	If the same process is concerned about several files, it gets
	notified several times:

Jun 23 14:04:53 xxx squid[318]: Restarting Squid Cache (version 1.1.8)... 
Jun 23 14:04:54 xxx squid[318]: Ready to serve requests. 
Jun 23 14:05:03 xxx squid[318]: Restarting Squid Cache (version 1.1.8)... 
Jun 23 14:05:04 xxx squid[318]: Ready to serve requests. 
Jun 23 14:05:13 xxx squid[318]: Restarting Squid Cache (version 1.1.8)... 
Jun 23 14:05:14 xxx squid[318]: Ready to serve requests. 


>How-To-Repeat:

Add this to your /etc/newsyslog.conf for example:
/var/log/squid.access.log		664  3	   *	168   Z	/var/run/squid.pid
/var/log/squid.cache.log		664  3	   *	168   Z	/var/run/squid.pid
/var/log/squid.store.log		664  3	   *	168   Z	/var/run/squid.pid

>Fix:
	
	Only list the file once is the almost working work-around. It fails
	if there are different conditions affect different files.

	Please, have in mind that the same process may happen to
	be listed in several files. So, the list of processes should
	first be "uniq"-ed...
>Release-Note:
>Audit-Trail:

From: "Gary Palmer" <gpalmer@FreeBSD.ORG>
To: mi@aldan.algebra.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/7033: newsyslog's new option 
Date: Wed, 24 Jun 1998 02:32:00 -0400

 Mikhail Teterin wrote in message ID
 <199806231817.OAA20948@xxx.video-collage.com>:
 > Jun 23 14:04:53 xxx squid[318]: Restarting Squid Cache (version 1.1.8)... 
 > Jun 23 14:04:54 xxx squid[318]: Ready to serve requests. 
 > Jun 23 14:05:03 xxx squid[318]: Restarting Squid Cache (version 1.1.8)... 
 > Jun 23 14:05:04 xxx squid[318]: Ready to serve requests. 
 > Jun 23 14:05:13 xxx squid[318]: Restarting Squid Cache (version 1.1.8)... 
 > Jun 23 14:05:14 xxx squid[318]: Ready to serve requests. 
 
 Squid has internal (but poorly documented) log rotation code. You'd
 probably be better off using that rather than newsyslog.
 
 I'm not saying that newsyslog isn't doing the wrong things, just that
 (a) there are other ways of doing it, and (b) its not as simple as
 you make it sound (for various reasons)
 
 Gary
 --
 Gary Palmer                                          FreeBSD Core Team Member
 FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info
 
 
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Wed Jun 24 00:51:52 PDT 1998 
State-Changed-Why:  
easy or not, still makes a good project for a committer. 

From: woods@zeus.leitch.com (Greg A. Woods)
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc:  Subject: Re: bin/7033: newsyslog's new option
Date: Wed, 24 Jun 1998 11:41:28 -0400 (EDT)

 [ On Tue, June 23, 1998 at 14:17:57 (-0400), Mikhail Teterin wrote: ]
 > Subject: bin/7033: newsyslog's new option
 > 	
 > 	Only list the file once is the almost working work-around. It fails
 > 	if there are different conditions affect different files.
 > 
 > 	Please, have in mind that the same process may happen to
 > 	be listed in several files. So, the list of processes should
 > 	first be "uniq"-ed...
 
 In the version of newsyslog I'm maintaining (one that contains many
 fixes, if far more portable, and which also contains all the new
 features from various *BSD variants, and a couple of unique new
 features), I've added the following to the BUGS section of the manual
 page:
 
      Sends SIGHUP to the associated daemon process for every log file
      trimmed.  This is done to ensure that it's safe to compress the
      file after it has hopefully been closed but in theory should be
      optimized to only notify daemon(s) once (and then run all the
      necessary compressions as the last step).  This behaviour is
      normally harmless for syslogd and multiple signals can be avoided
      for other daemons by ensuring their PID files are only listed once
      and using the `0' flag is used to ensure the most recent log file
      is not immediately compressed.
 
 Anyone intrested in this can find the latest beta here:
 
 	ftp://ftp.planix.com/pub/Planix/newsyslog.tar.gz
 
 -- 
 							Greg A. Woods
 
 +1 416 443-1734      VE3TCP      <gwoods@acm.org>      <robohack!woods>
 Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>
Responsible-Changed-From-To: freebsd-bugs->gad 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sat Feb 22 08:34:58 PST 2003 
Responsible-Changed-Why:  
gad expressed some interest in newsyslog. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=7033 
State-Changed-From-To: suspended->closed 
State-Changed-By: gad 
State-Changed-When: Mon Sep 20 20:15:28 GMT 2004 
State-Changed-Why:  
This issue with newsyslog has been fixed in both -current and -stable. 
The patch to newsyslog in 4.x-stable was commited on July 2nd, and I 
have not heard of any problems with it.  See also PR bin/25070 

http://www.freebsd.org/cgi/query-pr.cgi?pr=7033 
>Unformatted:
