From owner-freebsd-questions@FreeBSD.ORG Thu Apr 24 10:43:07 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5506137B401 for ; Thu, 24 Apr 2003 10:43:07 -0700 (PDT) Received: from pa-plum1b-166.pit.adelphia.net (pa-plum1a-215.pit.adelphia.net [24.53.170.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7128D43FA3 for ; Thu, 24 Apr 2003 10:43:06 -0700 (PDT) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com (working [172.16.0.95]) h3OHh30n001540; Thu, 24 Apr 2003 13:43:04 -0400 (EDT) (envelope-from wmoran@potentialtech.com) Message-ID: <3EA82227.2030203@potentialtech.com> Date: Thu, 24 Apr 2003 13:43:03 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030301 X-Accept-Language: en-us, en MIME-Version: 1.0 To: admin2 References: <20030424173133.M5943@enabled.com> In-Reply-To: <20030424173133.M5943@enabled.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: newsyslog configuration issues X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2003 17:43:07 -0000 admin2 wrote: > FreeBSD 4.7 Stable > > can anybody recommend how to properly configure newsyslog for log files that > are constantly opened and written. Some of my log files rotate but the new > log file can never written to. This is going to depend on the particular application that's writing to the logfile. Here are a few ideas: 1) Many applications need restarted before they'll start writing to the new logfile (Apache is an example). You can store the PID of the program in a file and use the "path_to_pid_file" field in newsyslog.conf to have newsyslog do this for you. See the man page. You generally want to use a HUP signal, but check the docs for the application you're using. 2) You might have better success telling the application to log via syslog instead of logging itself. Most applications support this, but you'll have to read the docs for the specific app you're using to find out how. 3) Some applications that write logfiles have their own (internal) method of rotating the logfiles, which works better than trying to use newsyslog. (Samba is an example) See the docs for the application. 4) Let the mailing list know what logfiles are doing this and what apps are creating the logfiles and you're likely to get more specific answers. -- Bill Moran Potential Technologies http://www.potentialtech.com