Determine log rotation time

#1
I'm currently running LSWS 3.2.1 and have a question about log rotation for virtual hosts. I have the access log set to be kept for 3 days. How do I determine what time of day it is actually rotated? The reason I ask is that I want to insure it is coordinated with my Urchin installation so we can analyze the logs before they are rotated.

If I can determine what the time of rotation is we'll change this to 1 day since our logs grow very quickly given the traffic our sites have.

Thanks for any light you can shed on this!

Mark
 

mistwang

LiteSpeed Staff
#2
Log file will be rotated when the size reach the limit, not by time.
You can set the limit to 2GB and rotate it in a cron job with "mv access.log ...".
 
#3
My impression was that if you did not have a size selected it would use the keep days to determine when to rotate. Basing this on file size would be even more unpredictable since on a high traffic day it could rotate multiple times (if the number was small) before we could analyze the log files.

Alternatively is there a way to disable LSWS performing log rotation for the virtual hosts? If so, I could set up a cron to rotate them in a predictable fashion.

Thanks

Mark
 

mistwang

LiteSpeed Staff
#4
Yes, you can rotate the log file in a cron job. just set the limit to 1.9GB.
Log file rotation cannot be disabled, because on some system, once log file reaches 2GB, the server will crash.
You can always rotate the log file before LSWS needs to.
 
Top