From owner-freebsd-questions@FreeBSD.ORG Wed Aug 20 12:58:55 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 9A5201065685 for ; Wed, 20 Aug 2008 12:58:55 +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 3D1948FC1A for ; Wed, 20 Aug 2008 12:58:54 +0000 (UTC) (envelope-from jalmberg@identry.com) Received: (qmail 56370 invoked by uid 89); 20 Aug 2008 12:58:54 -0000 Received: from unknown (HELO ?192.168.1.110?) (jalmberg@75.127.142.66) by mx1.identry.com with ESMTPA; 20 Aug 2008 12:58:54 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <482E252F-3819-46DD-A272-A174C1B41333@identry.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: freebsd-questions@freebsd.org From: John Almberg Date: Wed, 20 Aug 2008 08:58:50 -0400 X-Mailer: Apple Mail (2.752.3) Subject: 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 12:58:55 -0000 I'm a newbie admin and I've just figure out something that will be obvious to most on this list... that apache log files can get big, fast. I did a df for another reason the other day and was surprised to see my /var partition at 85% full. Anyway, I did some googling and decided to use rotatelogs to do just that. Now... I've updated all my apache config files to use rotate logs, like this: ErrorLog "|/usr/local/sbin/rotatelogs /var/log/www/nes.com-error.log. %Y-%m-%d-%H_%M_%S 86400" CustomLog "|/usr/local/sbin/rotatelogs /var/log/www/nes.com- access.log.%Y-%m-%d-%H_%M_%S 5M" combined Unless I am blind and not seeing something, this is right out of the man page. The problem is that the access logs are rolling over very quickly... no where near the 5 Meg I expected. It's not quite every access, but almost. -rw-r--r-- 1 root wheel 5147 Aug 20 08:19 nes.com-access.log. 2008-08-20-12_19_25 -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 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:26 nes.com-access.log. 2008-08-20-12_26_15 -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 181 Aug 20 08:31 nes.com-access.log. 2008-08-20-12_31_35 -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 284 Aug 20 08:37 nes.com-access.log. 2008-08-20-12_36_56 -rw-r--r-- 1 root wheel 710 Aug 20 08:45 nes.com-access.log. 2008-08-20-12_40_09 -rw-r--r-- 1 root wheel 3364 Aug 20 08:38 nes.com-error.log. 2008-08-20-00_00_00 I've been scratching my head over this for an hour, but can't see anything wrong. Any hints much appreciated. -- John