[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] RAQ2 logrotate question
- Subject: [cobalt-users] RAQ2 logrotate question
- From: "Paul Alcock" <webmgr@xxxxxxxxxxxxxxxxxx>
- Date: Wed Nov 6 09:36:44 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
RAQ2 logrotate question
After reading the man on logrotate and browsing the archives
on logrotate and options I've come up with the following config
file for a particular site.
I think I understand most of the config options except for
the postrotate script.
I would be grateful for any corrections to my assumptions
listed below.
Thanks.
Paul ASI
Here's the config file that I had planned on using.
errors myemailaddressgoeshere
compress/home/sites/sitexx/logs/access {
rotate 5
weekly
postrotate
/sbin/killall -HUP httpd
endscript
}
Here is my line by line interpretation of the config file.
errors myemailaddressgoeshere
... send errors to me at my email address.
compress
... compress the rotated files
/home/sites/sitexx/logs/access {
... The file being rotated is the sites access log
rotate 5
... The current file (access) will be rotated to access.1.gz
... if an access.1.gz file already exists it will be moved to access.2.gz
... ditto until access.1.gz thru access.5.gz exist
... once access.5.gz exists, it will be overwritten on the next rotation.
... at end 5 weeks their should be 6 files, access, access.1.gz thru
access.5.gz
weekly
... The rotations will occur each week.
postrotate
/sbin/killall -HUP httpd
endscript
... After rotating the files, this script will kill off all open
http process and restart the httpd daemon.
Is it really neccessary to restart the httpd after rotation?
Again, thanks in advance for your input.
Paul ASI