Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Aug 2008 01:45:20 +0200
From:      <z.szalbot@lcwords.com>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: log size handling
Message-ID:  <991e8ad90b6b2e59b1a8b39bda30a6c6@relay.lc-words.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?991e8ad90b6b2e59b1a8b39bda30a6c6>