From owner-freebsd-questions@FreeBSD.ORG Wed Aug 20 15:10:46 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C207210656C0 for ; Wed, 20 Aug 2008 15:10:46 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: from mx1.identry.com (on.identry.com [66.111.0.194]) by mx1.freebsd.org (Postfix) with ESMTP id 628D28FC17 for ; Wed, 20 Aug 2008 15:10:46 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: (qmail 77128 invoked by uid 89); 20 Aug 2008 15:10:45 -0000 Received: from unknown (HELO ?192.168.1.110?) (jalmberg@75.127.142.66) by mx1.identry.com with ESMTPA; 20 Aug 2008 15:10:45 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <27623D32-6BC7-4DC9-92F3-816A6F182EE8@identry.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <93AAA504-B8DC-4B17-9B5F-76748C25D5C2@identry.com> Content-Transfer-Encoding: 7bit From: John Almberg Date: Wed, 20 Aug 2008 11:10:41 -0400 To: freebsd-questions@freebsd.org X-Mailer: Apple Mail (2.752.3) Subject: Re: rotatelogs is rotating too quickly... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 15:10:46 -0000 > Unfortunately, it's more complex than that... check out this list: > > > ls -lt nes* > -rw-r--r-- 1 root wheel 35846 Aug 20 10:19 nes.com-access.log. > 2008-08-20-12_40_09 > -rw-r--r-- 1 root wheel 10117 Aug 20 10:01 nes.com-access.log. > 2008-08-20-13_56_42 > -rw-r--r-- 1 root wheel 284 Aug 20 08:37 nes.com-access.log. > 2008-08-20-12_36_56 > -rw-r--r-- 1 root wheel 204 Aug 20 08:34 nes.com-access.log. > 2008-08-20-12_34_25 > -rw-r--r-- 1 root wheel 181 Aug 20 08:31 nes.com-access.log. > 2008-08-20-12_31_35 > -rw-r--r-- 1 root wheel 181 Aug 20 08:29 nes.com-access.log. > 2008-08-20-12_28_44 > -rw-r--r-- 1 root wheel 204 Aug 20 08:26 nes.com-access.log. > 2008-08-20-12_26_15 > -rw-r--r-- 1 root wheel 195 Aug 20 08:24 nes.com-access.log. > 2008-08-20-12_24_24 > -rw-r--r-- 1 root wheel 204 Aug 20 08:21 nes.com-access.log. > 2008-08-20-12_20_58 > -rw-r--r-- 1 root wheel 5147 Aug 20 08:19 nes.com-access.log. > 2008-08-20-12_19_25 > Ah... I think I figured this out... Of course, I had to change a bunch of apache config files to switch from normal log files to piping logs through rotatelogs. I tested each config change after making it, to make sure I didn't mess something up. Of course I had to restart Apache each time I made a change. Here's the key: Apache creates a new access log for every site each time it restarts. So the list above reflects how fast it took me to update a config file and restart apache, not anything that rotate logs was doing. That makes sense, so I guess I can live with the 'makes new log file on restart' quirk. Thanks for the help! -- John