need help with named and log rotate..

Duane Cox dcox at coxnetwork.com
Mon Mar 6 05:31:36 UTC 2000


I really need some help on this named logging.. please.  I have named logging to a file named.log, which is setup in logrotate
to rotate weekly for 52 weeks...  The problem I have is that named writes to named.log but when logrotate rotates the log,
moves named.log to named.log.1 and creates the new named.log ... named writes to the named.log.1 and not the "new" empty file
named.log .. Maybe named doesnt know about the log rename.. I dunno... ACK please help... below is some info.

/etc/named.conf file:

options {
        cleaning-interval 720;
        directory "/var/named";
        interface-interval 0;
        pid-file "/var/run/named/named.pid";
        notify no;
        statistics-interval 60;
        allow-transfer {
                12.15.125.5; 12.15.125.7;
                12.15.125.10; 12.15.125.251;
                };
};

logging {
        channel named_log {
                file "/var/log/named/named.log";
                severity info;
                print-category yes;
                print-severity yes;
                print-time yes;
                };

        category default { named_log; };
};


/etc/logrotate.d/named file:

/var/log/named/named.log {
    missingok
    postrotate
        /usr/sbin/killall -HUP named
    endscript
}


[root at orion logrotate.d]# ls -la /var/log/named  
total 356
drwxr-xr-x   2 named    named        4096 Mar  5 04:02 .
drwxr-xr-x   9 root     root         4096 Mar  5 04:02 ..
-rw-r--r--   1 named    named           0 Mar  5 04:02 named.log
-rw-r--r--   1 named    named      349538 Mar  5 23:23 named.log.1


Thanks in advance
Duane Cox
dcox at coxnetwork.com



More information about the bind-users mailing list