Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2008 11:10:41 -0400
From:      John Almberg <jalmberg@identry.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: rotatelogs is rotating too quickly...
Message-ID:  <93AAA504-B8DC-4B17-9B5F-76748C25D5C2@identry.com>
In-Reply-To: <FDB267BF-784F-41B2-A73E-99F12F715684@identry.com>
References:  <27623D32-6BC7-4DC9-92F3-816A6F182EE8@identry.com> <FDB267BF-784F-41B2-A73E-99F12F715684@identry.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Unfortunately, it's more complex than that... check out this list:
>
> > ls -lt nes*
> -rw-r--r--  1 root  wheel  35846 Aug 20 10:19 nes.com-access.log. 
> 2008-08-20-12_40_09
> -rw-r--r--  1 root  wheel  10117 Aug 20 10:01 nes.com-access.log. 
> 2008-08-20-13_56_42
> -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    204 Aug 20 08:34 nes.com-access.log. 
> 2008-08-20-12_34_25
> -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    181 Aug 20 08:29 nes.com-access.log. 
> 2008-08-20-12_28_44
> -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    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:21 nes.com-access.log. 
> 2008-08-20-12_20_58
> -rw-r--r--  1 root  wheel   5147 Aug 20 08:19 nes.com-access.log. 
> 2008-08-20-12_19_25
>

Ah... I think I figured this out...

Of course, I had to change a bunch of apache config files to switch  
from normal log files to piping logs through rotatelogs.

I tested each config change after making it, to make sure I didn't  
mess something up. Of course I had to restart Apache each time I made  
a change.

Here's the key: Apache creates a new access log for every site each  
time it restarts.

So the list above reflects how fast it took me to update a config  
file and restart apache, not anything that rotate logs was doing.

That makes sense, so I guess I can live with the 'makes new log file  
on restart' quirk.

Thanks for the help!

-- John






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?93AAA504-B8DC-4B17-9B5F-76748C25D5C2>