help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Log rotation question


From: Chris Edillon
Subject: Re: Log rotation question
Date: Wed, 6 Nov 2002 22:51:27 -0400 (GMT+4)

On Wed, 6 Nov 2002, Kirk Bauer wrote:

> I'm looking to use this directive:
> 
> disable:
>    Sunday::
>        /var/log/httpd/access_log rotate=52
> 
> To keep one year's worth of log files... but I can't figure out how to
> make this "safe" so that it will only rotate once per week even if
> cfagent is executed more than once on Sunday.
> 
> Any ideas?  Thanks for any help you can provide!
> 
  you could do the obvious "Sunday.Hr23.Min30" or whenever the
last cfagent run is scheduled for sunday night.  or, if you know
approximately how large your log files get in a day, you could
use the size option.  or some combination of all:

  disable:
      Sunday.Hr23::
          /var/log/httpd/access_log  rotate=52  size=<1000

that will rotate the log on sunday night at 2300 hours, if
the log is greater than 1MB (assuming that it will get rotated
the first time cfagent runs that hour, and it won't grow to
1MB within that hour).  depending on how fast your log fills
up you should change the size accordingly.

chris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]