This section contains information for starting, controlling and debugging named.
The hostname should be set to the full domain style name in /etc/rc.local using hostname(1). The following entry should be added to /etc/rc.local to start up named at system boot time:
When named is successfully started up it writes its process id into the file /var/run/named.pid. This is useful to programs that want to send signals to named. The name of this file may be changed by defining PIDFILE to the new name when compiling named.
The gethostbyname() library call can detect if named is running. If it is determined that named is not running it will look in /etc/hosts to resolve an address. This option was added to allow ifconfig(8C) to configure the machines local interfaces and to enable a system manager to access the network while the system is in single user mode. It is advisable to put the local machines interface addresses and a couple of machine names and address in /etc/hosts so the system manager can rcp files from another machine when the system is in single user mode. The format of /etc/hosts has not changed. See hosts(5) for more information. Since the process of reading /etc/hosts is slow, it is not advisable to use this option when the system is in multi user mode.
There are several signals that can be sent to the named process to have it do tasks without restarting the process.
SIGHUP - Causes named to read named.boot and reload the database. This is useful when you have made a change to a ``primary'' data file and you want named's internal database to reflect the change. If you build BIND with the FORCED_RELOAD option, then SIGHUP also has the effect of scheduling all ``secondary'' zones for serial-number checks, which could lead to zone transfers ahead of the usual schedule. Normally serial-number compares are done only at the intervals specified in the zone's SOA record.
When named is running incorrectly, look first in /var/log/messages and check for any messages logged by syslog. Next send it a signal to see what is happening. Unless you run it with the ``-d'' option, named has very little to say on its standard output or standard error. Everything named has to say, it says to syslog.
SIGINT - Dumps the current data base and cache to /var/tmp/named_dump.db This should give you an indication to whether the data base was loaded correctly. The name of the dump file may be changed by defining DUMPFILE to the new name when compiling named.
Note: the following two signals only work when named is built with DEBUG defined.
SIGUSR1 - Turns on debugging. Each following SIGUSR1 increments the debug level. The output goes to /var/tmp/named.run The name of this debug file may be changed by defining DEBUGFILE to the new name before compiling named.
SIGUSR2 - Turns off debugging completely.
For more detailed debugging, define DEBUG when compiling the resolver routines into /lib/libc.a.
SIGWINCH - Toggles tracing of all incoming queries if named has been compiled with QRYLOG defined. The trace is sent to syslog, and is huge, but it is very useful for tracking down problems.
To run with tracing of all queries specify the -q flag on the command line. If you routinely log queries you will probably want to analyze the results using the dnsstats stats script in the contrib directory.
SIGIOT - Dumps statistics data into /var/tmp/named.stats if the server is built with STATS defined. Statistics are appended to the file.