Hi Janine,

> Actually I think this should do as the access log code does and roll
> the log like one would expect.  But as long as it is the way it is, I
> guess my script is just fine.

if you have "logrotate" on your machine, you might also give that
a try. I place a file with content like this in /etc/logrotate.d/:

/opt/chroot/nsd/log/server.log {
    rotate 30
    compress
    daily
    dateext
    maxage 36
    missingok
    copytruncate
    size +4M
}

You can configure it in many different ways, like compressing files, you
can add your own post- or pre-processing scripts and more.
I use a script that watches the server.log for different regular
expressions and mails me if they match; as the script stops when the
watched file gets removed ("is rotated"), the copytruncate argument
helps me in this case.

Regards,
Bernd.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to