AFP548

rotatelog on OS X Server (Archive every 7 days)(awstats makes my head ache)

OK after finding a really easy to follow how to on some obscure mac site, I was finally able to get awstats up and running on my server. The docs awstats come with just plain suck. So now I have awstats up and running and I have the next logical problem. Combined log format logs take up a TON of space, and my most popular site gets 8000+ page views a day. So of course I NEED log rotation. The problem is, when you rotate your logs, you loose all the traffic (in stats) that happened between that last awstats update and the log rotation. What awstats tells you to do is to have awstats run right before it rotates the logs. It gives you very brief instructions on how to do this, which don't seem to apply to OS X at all. Now, I have a cron script that updates my awstats currently every day at midnight. The Server Admin app will let me set the number of days to archive the logs. But it doesn't tell me when exactly it does it. I'm not sure which avenue to go down at this point. But the best one I can think of is to disable the automatic log rotation in Server Admin, and then figure out the commands to run to manually rotate the logs, and stick that code right in my awstats updater script, so every day, at midnight, one by one, every site's awstats will be updated, then that sites logs will be rotated. There may very well be a better solution, however I'm not aware of it.
Exit mobile version