help-cfengine
[Top][All Lists]
Advanced

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

Re: newbie: log rotation, compression and deletion


From: Mark Burgess
Subject: Re: newbie: log rotation, compression and deletion
Date: Fri, 10 Jun 2005 16:37:57 +0200

On Fri, 2005-06-10 at 15:27 +0200, Philippe de Rochambeau wrote:
> Hello,
> 
> I need to rotate, compress and delete old copies of logs written to, by 
> on-going perl scripts.
> 
> When cfengine rotates logs, how does it know which applications/scripts 
> created the logs?

It doesn't.

> Assuming that it somehow figures out the name of the log-writing 
> applications/scripts (via a cfengine configuration file, perhaps), how 
> does it tell them to temporarily stop writing to the logs while 
> cfengine rotates them, compresses them, and deletes the old logs, and 
> to resume writing afterwards?

It makes a copy of the current log and then empties the current log,
so that the file descriptor never changes. That way, it never has to
close a file or make a change,

> Do you need to write a HUP signal handler in your log-writing scripts 
> for cfengine to send signals to?

Nope

M





reply via email to

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