Forums

When are the web logs rotated?

Just a quick question, I was just wondering when the web logs were rotated (the ones in /var/log linked on the web panel). I am trying to write a script to analyze the logs that runs once the logs are rotated, so that I don't miss or double count anything. I tried checking the /etc/logrotate.conf settings, but I couldn't find it in there.

Around 6:30 AM UTC, it looks like...

OK, thanks. I'll probably just set my script to run at around 7am UTC then.

well, the task is set to start at 6:30AM UTC, but there's a lot of users and a lot of logs to rotate. I don't know how long the full log rotation takes to complete, on average, but you might want to allow a bit more time, just to be sure?

OK, thanks for the quick responses. I'll probably put it at 8 or 9, then, and if it doesn't work I can always change it.

I am going back to the question of a log parser, somehow by the dates of my log files it seems they are only created every couple of days, is this correct? I would need to know it to have the schedule set for the log parser.

We run a daily logrotate cron job, but your logs don't necessarily rotate every time. We have our configs set so that it only rotates if your logs go over a size of 100k. This allows webapps with low traffic look back in their logs for longer periods of time, since we only keep 9 archived logs around at a time. (ie. they'd be able to see stuff going back months as opposed to just 9 days)