From owner-freebsd-questions@FreeBSD.ORG Wed Aug 20 13:49:17 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 1FE1D1065671 for ; Wed, 20 Aug 2008 13:49:17 +0000 (UTC) (envelope-from riaank@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.30]) by mx1.freebsd.org (Postfix) with ESMTP id C56E68FC1E for ; Wed, 20 Aug 2008 13:49:16 +0000 (UTC) (envelope-from riaank@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so22674ywe.13 for ; Wed, 20 Aug 2008 06:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=4G+C2tezZS7lXyKdLaLfNqRGzlMJVBGjhRFkZJ6gcws=; b=iJNlzt+wx/6FMrGgXzApylHs5Vp+V7SLePc12llwWmMrhtHBNYPk3oxh9abrkgd5o/ 16LvTe1KOJFaVzLwxiE2ZaY9+LrNxBmjc7Np6nhLJ5MTgWz4mUoLwY/Aa4G70y6TK0Xn 02HdgJMtTMOZtVS9DbI+o0ACtwmfRfzlYavx0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=YqoK8yquLk3v99kRltVL1wQtXr9LzuGXJ2t6vRhL4VtsxXB28i0sXUA3qbnSbNpWHP FjyCXEfc8FWALhgXBQkG7utghWeuHMY3rAbGfnMEpfQcQEqy+8OnLw1cz668/LHjcddt /knuhg74HM2J6buOR3nCneoSudsfsj2LXY71A= Received: by 10.187.232.20 with SMTP id j20mr6781far.69.1219240155341; Wed, 20 Aug 2008 06:49:15 -0700 (PDT) Received: by 10.187.211.19 with HTTP; Wed, 20 Aug 2008 06:49:15 -0700 (PDT) Message-ID: <85c4b1850808200649l2cf42462nfa7d64fe09fa1253@mail.gmail.com> Date: Wed, 20 Aug 2008 15:49:15 +0200 From: "Riaan Kruger" To: "John Almberg" In-Reply-To: <482E252F-3819-46DD-A272-A174C1B41333@identry.com> MIME-Version: 1.0 References: <482E252F-3819-46DD-A272-A174C1B41333@identry.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org 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 13:49:17 -0000 On Wed, Aug 20, 2008 at 2:58 PM, John Almberg wrote: > 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 > That does not look like 5 Meg but 5 Minutes. Riaan