help-cfengine
[Top][All Lists]
Advanced

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

Re: Log rotation question


From: Allen Bettilyon
Subject: Re: Log rotation question
Date: Wed, 06 Nov 2002 22:51:51 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016

Kirk Bauer wrote:

On Wed, 6 Nov 2002, Chris Edillon wrote:

 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.

That's a good idea... I was hoping there was a "cleaner" way to do it...
but I'll use this if there is not a better option ;)

You could do...

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

That would run on Sunday and only if it hasn't ran for 86400 seconds (1 day)

- Allen








reply via email to

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