From owner-freebsd-questions@FreeBSD.ORG Thu Jul 31 23:45:23 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 10A3D1065679 for ; Thu, 31 Jul 2008 23:45:23 +0000 (UTC) (envelope-from z.szalbot@lcwords.com) Received: from relay.lc-words.com (relay.lc-words.com [62.121.130.110]) by mx1.freebsd.org (Postfix) with ESMTP id B29248FC0C for ; Thu, 31 Jul 2008 23:45:22 +0000 (UTC) (envelope-from z.szalbot@lcwords.com) Received: from localhost (localhost [127.0.0.1]) by relay.lc-words.com (Postfix) with ESMTP id 09BC6B8033; Fri, 1 Aug 2008 01:45:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lcwords.com; s=mainlcwords; t=1217547921; bh=6ldXPOCvs9VhJpuDAtDgvemX5C2SbtGyale p2zp6C9c=; h=To:Subject:MIME-Version:Date:From:Cc:In-Reply-To: References:Message-ID:Content-Type:Content-Transfer-Encoding; b=zn vM5z9TKLoq0myab5tMKHBrVftf1C9cxPot9dE1lXylKPS+xzYYMn6ex1Qn9wHQVurdh Mp0PrWg6cf1X0+EnOkyH0KzLoViUFWz0WKWt8mlJ9fJOT5mvjrA5FKBhWJpT2g8D0Yn v3RwSjhWZMEGAfK9qfvq2aTH0Ev1NcZEH14= Received: from relay.lc-words.com ([127.0.0.1]) by localhost (relay.lc-words.com [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 45353-01; Fri, 1 Aug 2008 01:45:20 +0200 (CEST) Received: by relay.lc-words.com (Postfix, from userid 80) id 8F214B802D; Fri, 1 Aug 2008 01:45:20 +0200 (CEST) To: Matthew Seaman MIME-Version: 1.0 Date: Fri, 01 Aug 2008 01:45:20 +0200 From: In-Reply-To: <48808B9A.8000008@infracaninophile.co.uk> References: <487F2525.3030304@lcwords.com> <20080717072023.4b9e1d2f.wmoran@potentialtech.com> <487F2D9B.2010407@lcwords.com> <200807170904.26354.mario.lobo@ipad.com.br> <487F52EE.2050907@infracaninophile.co.uk> <4880748D.8030902@lcwords.com> <48807DC8.1050007@infracaninophile.co.uk> <48808246.10301@lcwords.com> <48808B9A.8000008@infracaninophile.co.uk> Message-ID: <991e8ad90b6b2e59b1a8b39bda30a6c6@relay.lc-words.com> X-Sender: z.szalbot@lcwords.com User-Agent: RoundCube Webmail/0.1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard Cc: freebsd-questions@freebsd.org Subject: Re: log size handling 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: Thu, 31 Jul 2008 23:45:23 -0000 Hello, > The restart process with apache is that all the child processes are > shutdown -- either straight away (for a plain restart) or once they've > finished their current bit of work (fora graceful restart). As the child > process shuts down, it closes all the file descriptors used for logging. I put two entries in newsyslog.conf. One for rotating all logs at the start of the month, and the other one specifically for the site which gets many hits to rotate its log once it grows more than 25MB in size. /var/log/*-access.log 644 12 * $M1D0 GZC /var/run/httpd.pid 30 /var/log/example.com-access.log 644 100 25000 * ZC /var/run/httpd.pid 30 The log was indeed rotated when it grew larger than the specified size but it was not rotated at the start of the month. Any idea why? Is it so that the first entry effectively eliminates the second? If so, how can I make sure the log does not grow too large and is rotated at the start of the month? Many thanks! Zbigniew Szalbot