Maarten Litmaath, CERN wrote:
> On Wed, 2 Mar 2005, Rod Walker wrote:
>
>
>>Hi,
>>Can we use logrotate on the gatekeeper log? Does the gatekeeper do
>>something smart with
>>
>>killall -s USR1 -e /opt/edg/sbin/edg-gatekeeper
>>
>>like maybe closing the log, renaming and opening another? [...]
>
>
> Yes:
>
> -----------------------------------------------------------------------------
> # Logrotation entry for /var/log/globus-gatekeeper.log
> /var/log/globus-gatekeeper.log {
>
> nocompress
> copy
> rotate 1
> prerotate
> killall -s USR1 -e /opt/edg/sbin/edg-gatekeeper
> endscript
> postrotate
> find /var/log/globus-gatekeeper.log.20????????????.*[0-9] -mtime +7 -exec gzip {} \;
> endscript
> }
> -----------------------------------------------------------------------------
Please note there is a reason why the file is not gzipped immediately:
it may still be in use by various globus-jobmanager processes...
You could discover those by doing something like this:
lsof /var/log/globus-gatekeeper.log.20050303010101.1
As soon as no process is reported, the file can be gzipped and/or moved.
|