From owner-freebsd-questions@FreeBSD.ORG Mon Mar 5 23:26:18 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 897BE16A403 for ; Mon, 5 Mar 2007 23:26:18 +0000 (UTC) (envelope-from peter@placidpublishing.net) Received: from mail.placidpublishing.net (placidpublishing.net [72.232.50.130]) by mx1.freebsd.org (Postfix) with ESMTP id 6733E13C46B for ; Mon, 5 Mar 2007 23:26:18 +0000 (UTC) (envelope-from peter@placidpublishing.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.placidpublishing.net (Postfix) with ESMTP id B40845082D; Mon, 5 Mar 2007 17:32:15 -0600 (CST) Received: from mail.placidpublishing.net ([127.0.0.1]) by localhost (mail.placidpublishing.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 49620-05; Mon, 5 Mar 2007 17:32:13 -0600 (CST) Received: from [192.168.1.20] (c-67-175-92-171.hsd1.il.comcast.net [67.175.92.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.placidpublishing.net (Postfix) with ESMTP id 2B9D85082B; Mon, 5 Mar 2007 17:32:13 -0600 (CST) Message-ID: <45ECA718.5090908@placidpublishing.net> Date: Mon, 05 Mar 2007 17:26:16 -0600 From: Peter Pluta Organization: Placid Publishing, LLC User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: David Robillard References: <226ae0c60703051056ofb18dffu1ea0b9d48297b0bf@mail.gmail.com> <45EC6BF3.9090606@placidpublishing.net> <226ae0c60703051152h183fca79k470d2b064d871ccf@mail.gmail.com> In-Reply-To: <226ae0c60703051152h183fca79k470d2b064d871ccf@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard Cc: freebsd-questions@freebsd.org Subject: Re: Apache Rotate Logs and Log Rotate. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: peter@placidpublishing.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2007 23:26:18 -0000 Gotcha, do you use a script to compress the logs after the SIGUSR1 and after waiting for a bit for apache to clear it's logging buffer (to not have missing logs)? David Robillard wrote: > On 3/5/07, Peter Pluta wrote: >> Thanks, David. I had already configured it like that the first time >> around after reading up on it a bit. Most articles/tips I have read say >> to wait 10 minutes or so and then compress the logs with a shell script >> in order to be sure Apache finished logging to the files. Another thing, >> just to be sure. If I had 30 vhosts on my server and each had logs in >> their home directory, I would still use newsyslog to rotate and delete >> them, correct? I assume one needs tons of disk space to do that if the >> sites are rather large. > > Well, if you do use newsyslog to rotate Apache log files, then it's > just a matter of setting the number of files you whish to keep. From > newsyslog.conf(5) > > count Specify the maximum number of archive files which may exist. > This does not consider the current log file. > > Let's say you rotate your files once they reach 2Mb for example and > that you've configured 10 in your newsyslog,conf field. Then > that means a maximum of 10 x 2Mb = 20Mb will be kept for one > VirtualHost. Now if you have 100 virtual hosts all configured this > way, then you will need 100 x 20Mb = 2000Mb or 2Gb for all your Apache > logs. > > Considering today's disk drive sizes are well beyond the 300Gb, I > don't think this is a problem at all. > > Of course, YMMV so check your own needs and do the math. > > Cheers, > > David