How to restart logging

Mathias Koerber mathias at staff.singnet.com.sg
Tue Mar 7 09:11:14 UTC 2000


On Tue, 7 Mar 2000, Ralf Hildebrandt wrote:

| Date: Tue, 7 Mar 2000 09:59:18 +0100
| From: Ralf Hildebrandt <R.Hildebrandt at tu-bs.de>
| To: Morris Jones <mojo at whiteoaks.com>
| Cc: comp-protocols-dns-bind at moderators.isc.org
| Subject: Re: How to restart logging
| 
| 
| On Tue, Mar 07, 2000 at 01:39:51AM +0000, Morris Jones wrote:
| > 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?
| 
| Yes. By correctly rotating the file:
| 
| % cp /var/log/named.log /var/log/named.log.old
| % cp /dev/null /var/log/named.log

This may lose you a few log entries between the file copy and the
file reset (cp /dev/null), as BIND would still be writing to the old file

Better:

% mv /var/log/named.log /var/log/named.log.old
% ndc reload

This will rename the file, and BIND will be writing to the renamed
file until it gets the reload signal, which will make it properly
close and reopen the file. As the file does no loinger exist under the
configured name, it will create a new one and write to that.

regards

| 
| -- 
| Ralf Hildebrandt <R.Hildebrandt at tu-bs.de> www.stahl.bau.tu-bs.de/~hildeb
| PP: MMDF gone mad with standards fever. Think "Brazil". 
| 
| 
| -- Attached file included as plaintext by Listar --
| 
| -----BEGIN PGP SIGNATURE-----
| Version: PGPfreeware 5.0i for non-commercial use
| MessageID: rO1VkmdrV8kTg9TwXIbp82aN7DK8+qA6
| 
| iQCVAwUBOMTE40nh/jPvZzKNAQGmBQQAjsVvU1VSjLEFnoYXj7gaE/pX4YbrnZBA
| J0iHHPNu0ArwHLBRFQNT/3lc/6vji1sUF/pLVdGk26RsPzOvpmpLV3pBMoByBfWQ
| YUnIHAwL+yJsr136JHGLeNwbMJNKxEA9shD6EFkJN4ozXpKh6dEyFFCh2UzzMX/I
| f3FH/H3EL74=
| =FK++
| -----END PGP SIGNATURE-----
| 
| 

Mathias Koerber	  | Tel: +65 / 471 9820    |   mathias at staff.singnet.com.sg
SingNet NOC	  | Fax: +65 / 475 3273    |            mathias at koerber.org
Q'town Tel. Exch. | PGP: Keyid: 768/25E082BD, finger mathias at singnet.com.sg
2 Stirling Rd     |      1A 8B FC D4 93 F1 9A FC BD 98 A3 1A 0E 73 01 65
S'pore 148943     | Disclaimer: I speak only for myself
* Eifersucht ist eine Leidenschaft, die mit Eifer sucht, was Leiden schafft *




More information about the bind-users mailing list