How to restart logging

G. Roderick Singleton gerry at pathtech.org
Tue Mar 7 13:27:15 UTC 2000


> From bind-users-bounce at isc.org Mon Mar  6 21:08:47 2000
> To: comp-protocols-dns-bind at moderators.isc.org
> From: mojo at whiteoaks.com (Morris Jones)
> Subject: How to restart logging
> NNTP-Posting-Host: 207.211.58.14
> X-Trace: tw12.nn.bcandid.com 952393191 207.211.58.14 (Mon, 06 Mar 2000 18:39:51 MST)
> NNTP-Posting-Date: Mon, 06 Mar 2000 18:39:51 MST
> Date: Tue, 07 Mar 2000 01:39:51 GMT
> List-unsubscribe: <mailto:bind-users-request at isc.org?Subject=unsubscribe>
> X-List-ID: <bind-users.isc.org>
> 
> Hi ...
> 
> When I rotate my system logs (logrotate on RedHat Linux), named doesn't
> successfully restart logging.  Can I make it reopen the log without
> restarting named and losing the cache?
> 
> From the named.conf file:
> 
> logging {
> 	channel logfile {
> 		file "/var/log/named.log";
> 		severity info;
> 		print-time yes;
> 	};
> 	category default { logfile; };
> };
> 
> Mojo
> 
> -- 
> Morris Jones         <*>
> Campbell, CA
> mojo at whiteoaks.com
> http://www.whiteoaks.com
> 
> 
> 

Use ndc as you've already been told or fix your logrotate script to be more
sensible in its handling of open files. e.g.

...
cp log log.<something> # snapshot file
cp /dev/null log # zero open file
...

should do it for you as you are maintaining the file that named is using.

This is an old technique that you should be able to read about in more detail in
most basic system administration books.

________________________________________________________________________________
G. Roderick Singleton, <gsingleton at home.com> PATH tech,
71 Underhill Drive, Unit 159, Toronto, ON  M3A 2J8
Voice : 416-452-4583 Fax: 416-452-0036 Toll Free: 1-888-354-PATH
________________________________________________________________________________

*** Notice To Bulk Emailers: Attention!  Pursuant to US Code, Title 47,
Chapter 5, Subchapter II, 227, any & all unsolicited commercial e-mail
sent to this address is subject to a download and archival fee in the
amount of the $1500 US and copies will be forwarded to domain
administrators.  Emailing denotes acceptance of said terms!




More information about the bind-users mailing list