By default, the log file size is set to 10% of the site size. When it exceeds that it is rolled over and gzipped.
When the new file gets to 10% of the site size, it is rolled over and then replaces the previous gzip file. Therefore all the old log files are lost forever. Clients sometimes want to know what the stats for the past few months, six months, years etc are. If the log files have been removed, this causes a big problem, there are no logs left!
We had a custom PKG written to address this. Now, every Sunday, all the access log files rollover, regardless of size. They gzip themselves as are named access<date>.gz (e.g access050801.gz). If the file size gets over 50Mb during the week, it is also rolled over mid week.
In the log directory for each site we now have a list of logs for each week. If a client wants a report done, we simply download the relevant week and run the stats software.
There is only one small problem with this system, Webiliser stats only show stats for the current week and clients think that all their traffic has gone hey wire. I am sure that this could be addressed if necessary.
Regards, Jason Vaughan Netergy.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I searched the archives for 'logrotate size' and came up with 145 hits. Please excuse my question if it has been covered, but I did not find the answers I was looking for, nor have I seen them covered in the couple months I've been on the list now. It is my understanding that the size configuration in /etc/logrotate.d/siteXX is determined by taking 10% of the sites size limit. Eventually I am going to build some automation scripts for setting up users, that employ the command line site and user tools and we may want a small site with high traffic to have a larger limit for the logfile, but not have 10 times that figure in the way of storage space. Is it possible to change the percentage? On a per site basis? If I write a script to change the size in /etc/logrotate.d/siteXX, will it get overwritten every time the GUI is used to modify that site? Thanks, J. Patrick Lanigan, Web Developer URLtek Web Solutions - ---------------------------------------- w: http://www.laniganonline.com/ w: http://www.urltek.com/ coming soon - ----------------------------------------
-- --------------------------------------------- Webmaster Netergy.com Limited Studio 1B, 101 Farm Lane, London SW6 1QJ T: 020 7610 1010 - F: 020 7610 1551 http://www.netergy.com http://www.anynames.com --------------------------------------------- IMPORTANT LEGAL NOTICE:This e-mail is strictly confidential and is intended solely for the person or organisation to whom it is addressed. It may contain privileged and confidential information and if you are not the intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this communication in error, please advise us by e-mail and delete the file from your system.
If you contact us by e-mail, we will store your name and address to facilitate communications.