Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2008 10:37:54 -0400
From:      John Almberg <jalmberg@identry.com>
To:        freebsd-questions@freebsd.org
Subject:   Fwd: rotatelogs is rotating too quickly...
Message-ID:  <F8DD12AB-74C6-4617-BFC4-00829088E0EE@identry.com>
References:  <5B07C7C5-912C-465D-9837-8DA2F4FE1457@identry.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.
>
> What apache version you are using? rotatelogs syntax differ a lot  
> between them.
>

Version - Apache/2.2.6 (FreeBSD) mod_ssl/2.2.6 OpenSSL/0.9.7m DAV/2  
PHP/5.2.5 with Suhosin-Patch

rotatelogs doesn't seem to have a --version argument, but if I just  
type it on the command line it prints out the following usage message:

[identry@on:www]> rotatelogs
Usage: rotatelogs [-l] <logfile> <rotation time in seconds> [offset  
minutes from UTC] or <rotation size in megabytes>

Add this:

TransferLog "|rotatelogs /some/where 86400"

or

TransferLog "|rotatelogs /some/where 5M"

to httpd.conf. The generated name will be /some/where.nnnn where nnnn  
is the
system time at which the log nominally starts (N.B. if using a  
rotation time,
the time will always be a multiple of the rotation time, so you can  
synchronize
cron scripts with it). At the end of each rotation time or when the  
file size
is reached a new log is started.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F8DD12AB-74C6-4617-BFC4-00829088E0EE>