Appendix B. PDNS internals

PDNS is normally launched by the init.d script but is actually a binary called pdns_server. This file is started by the start and monitor commands to the init.d script. Other commands are implemented using the controlsocket.

B.1. Controlsocket

The controlsocket is the means to contact a running PDNS daemon, or as we now know, a running pdns_server. Over this sockets, instructions can be sent using the pdns_control program. Like the pdns_server, this program is normally accessed via the init.d script.

B.1.1. pdns_control

To communicate with PDNS over the controlsocket, the pdns_control command is used. The init.d script also calls pdns_control. The syntax is simple: pdns_control command arguments. Currently this is most useful for telling backends to rediscover domains or to force the transmission of notifications. See Section 13.3.

Besides the commands implemented by the init.d script, for which see Section 2.3, the following pdns_control commands are available:

ccounts

Returns counts on the contents of the cache.

notify domain

Adds a domain to the notification list, causing PDNS to send out notifications to the nameservers of a domain. Can be used if a slave missed previous notifications or is generally hard of hearing.

notify-host domain host

Same as above but with operator specified IP address as destination, to be used if you know better than PowerDNS.

purge

Purges the entire Packet Cache - see Chapter 9.

purge record

Purges all entries for this exact record name - see Chapter 9.

purge record$

Purges all cache entries ending on this name, effectively purging an entire domain - see Chapter 9.

purge

Purges the entire Packet Cache - see Chapter 9.

purge record

Purges all entries for this exact record name - see Chapter 9.

rediscover

Instructs backends that new domains may have appeared in the database, or, in the case of the Bind backend, in named.conf.

reload

Instructs backends that the contents of domains may have changed. Many backends ignore this, the Bind backend will check timestamps for all zones (once queries come in for it) and reload if needed.

retrieve domain

Retrieve a slave domain from its master. Done nearly immediatly.

set variable value

Set a configuration parameter. Currently only the 'query-logging' parameter can be set.

uptime

Reports the uptime of the daemon in human readable form.

version

returns the version of a running pdns daemon.