1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
|
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "REC_CONTROL" "1" "Jan 12, 2026" "" "PowerDNS Recursor"
.SH NAME
rec_control \- Command line tool to control a running Recursor
.SH SYNOPSIS
.sp
\fBrec_control\fP [\fIOPTION\fP]... \fICOMMAND\fP [\fICOMMAND\-OPTION\fP]...
.SH DESCRIPTION
.sp
\fBrec_control\fP allows the operator to query and control a running
instance of the PowerDNS Recursor.
.sp
\fBrec_control\fP talks to the recursor via a the \(aqcontrolsocket\(aq. Which
is usually located in \fB/var/run\fP . The \fI\-\-socket\-dir\fP or the \fI\-\-config\-dir\fP
and \fI\-\-config\-name\fP switches control to which process \fBrec_control\fP
connects.
.SH EXAMPLES
.sp
To see if the Recursor is alive, run:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
# rec_control ping
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To stop the recursor by hand, run:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
# rec_control quit
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To dump the caches to disk, execute:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
# rec_control dump\-cache /tmp/the\-cache
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Before version 4.5.0, for each command that writes to a file, \fBpdns_recursor\fP would open the file to write to.
Starting with 4.5.0, the files are opened by the \fBrec_control\fP command itself using the credentials and the current working directory of the user running \fBrec_control\fP\&.
A single minus \fI\-\fP can be used as a filename to write the data to the standard output stream.
.UNINDENT
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
.B \-\-help
provide this helpful message.
.TP
.BI \-\-config\-dir\fB= <path>
Directory where the recursor.conf lives.
.TP
.BI \-\-config\-name\fB= <name>
Name of the virtual configuration.
.TP
.BI \-\-socket\-dir\fB= <path>
Where the controlsocket will live, please
use \fB\-\-config\-dir\fP instead.
.TP
.BI \-\-socket\-pid\fB= <pid>
When running in SMP mode, pid of \fBpdns_recursor\fP to
control.
.TP
.BI \-\-timeout\fB= <num>
Number of seconds to wait for the remote PowerDNS
Recursor to respond.
.TP
.B \-\-version
Show the version number of this program. Note that the \fBversion\fP
command shows the version of the running recursor.
.UNINDENT
.SH COMMANDS
.INDENT 0.0
.TP
.B add\-dont\-throttle\-names \fINAME\fP [\fINAME\fP\&...]
Add names for nameserver domains that may not be throttled.
.TP
.B add\-dont\-throttle\-netmasks \fINETMASK\fP [\fINETMASK\fP\&...]
Add netmasks for nameservers that may not be throttled.
.TP
.B add\-nta \fIDOMAIN\fP [\fIREASON\fP]
Add a Negative Trust Anchor for \fIDOMAIN\fP, suffixed optionally with
\fIREASON\fP\&.
.TP
.B add\-ta \fIDOMAIN\fP \fIDSRECORD\fP
Add a Trust Anchor for \fIDOMAIN\fP with DS record data \fIDSRECORD\fP\&. This adds
the new Trust Anchor to the existing set of Trust Anchors for \fIDOMAIN\fP\&.
.TP
.B current\-queries
Shows the currently active queries.
.TP
.B clear\-dont\-throttle\-names \fINAME\fP [\fINAME\fP\&...]
Remove names that are not allowed to be throttled. If \fINAME\fP is \fB*\fP, remove all
.TP
.B clear\-dont\-throttle\-netmasks \fINETMASK\fP [\fINETMASK\fP\&...]
Remove netmasks that are not allowed to be throttled. If \fINETMASK\fP is \fB*\fP, remove all
.TP
.B clear\-nta \fIDOMAIN\fP\&...
Remove Negative Trust Anchor for one or more \fIDOMAIN\fPs. Set domain to
\fB*\fP to remove all NTA\(aqs.
.TP
.B clear\-ta [\fIDOMAIN\fP]...
Remove Trust Anchor for one or more \fIDOMAIN\fPs. Note that removing the
root trust anchor is not possible.
.TP
.B dump\-cache \fIFILENAME\fP [\fITYPE\fP\&...]
Dumps caches to \fIFILENAME\fP\&. This file should not exist already,
PowerDNS will refuse to overwrite it. While dumping, the recursor
might not answer questions.
.sp
If no \fITYPE\fP is specified the record cache, the negative cache,
the packet cache and the aggressive NSEC cache are dumped. To
select specific caches specify one or more \fITYPE*s, separated
by spaces. The value of *TYPE\fP can be r, n, p or a.
.TP
.B dump\-dot\-probe\-map \fIFILENAME\fP
Dump the contents of the DoT probe map to the \fIFILENAME\fP mentioned.
.TP
.B dump\-edns \fIFILENAME\fP
Dumps the EDNS status to the filename mentioned. This file should not exist
already, PowerDNS will refuse to overwrite it. While dumping, the recursor
will not answer questions.
.TP
.B dump\-failedservers \fIFILENAME\fP
Dump the contents of the failed server map to the \fIFILENAME\fP mentioned.
This file should not exist already, PowerDNS will refuse to
overwrite it otherwise. While dumping, the recursor will not answer
questions.
.TP
.B dump\-non\-resolving \fIFILENAME\fP
Dump the contents of the map of nameserver names that did not resolve to
an address. This file should not exist already, PowerDNS will
refuse to overwrite it otherwise. While dumping, the recursor will
not answer questions.
.TP
.B dump\-nsspeeds \fIFILENAME\fP
Dumps the nameserver speed statistics to the \fIFILENAME\fP mentioned. This
file should not exist already, PowerDNS will refuse to overwrite it. While
dumping, the recursor will not answer questions. Statistics are kept per
thread, and the dumps end up in the same file.
.TP
.B dump\-rpz \fIZONE NAME\fP \fIFILE NAME\fP
Dumps the content of the RPZ zone named \fIZONE NAME\fP to the \fIFILENAME\fP
mentioned. This file should not exist already, PowerDNS will refuse to
overwrite it otherwise. While dumping, the recursor will not answer
questions. For details on how RPZ are named see
\fI\%https://docs.powerdns.com/recursor/lua\-config/rpz.html#policyname\fP\&.
.TP
.B dump\-saved\-parent\-ns\-sets \fIFILE NAME\fP
Dump the entries of the map containing saved parent NS sets
that were successfully used in resolving.
The total number of entries is also printed in the header.
An entry is saved if the recursor sees that the parent set includes
names not in the child set. This is an indication of a
misconfigured domain.
.TP
.B dump\-throttlemap \fIFILENAME\fP
Dump the contents of the throttle map to the \fIFILENAME\fP mentioned.
This file should not exist already, PowerDNS will refuse to
overwrite it otherwise. While dumping, the recursor will not answer
questions.
.TP
.B get \fISTATISTIC\fP [\fISTATISTIC\fP]...
Retrieve a statistic. For items that can be queried, see
\fI\%https://docs.powerdns.com/recursor/metrics.html\fP\&.
.TP
.B get\-all
Retrieve all known statistics.
.TP
.B get\-dont\-throttle\-names
Get the list of names that are not allowed to be throttled.
.TP
.B get\-dont\-throttle\-netmasks
Get the list of netmasks that are not allowed to be throttled.
.TP
.B get\-ntas
Get a list of the currently configured Negative Trust Anchors.
.TP
.B get\-tas
Get a list of the currently configured Trust Anchors.
.TP
.B get\-parameter \fIKEY\fP [\fIKEY\fP]...
Retrieves the specified configuration parameter(s).
.TP
.B get\-proxymapping\-stats
Get the list of proxy\-mapped subnets and associated counters.
.TP
.B get\-qtypelist
Retrieves QType statistics. Queries from cache aren\(aqt being counted yet.
.TP
.B get\-remotelogger\-stats
Retrieves the remote logger statistics, per type and address.
.TP
.B hash\-password [\fIWORK\-FACTOR\fP]
Asks for a password then returns the hashed and salted version,
to use as a webserver password or API key. This command does
not contact the recursor but does the hashing inside rec_control.
An optional scrypt work factor can be specified, in power of two.
The default is 1024.
.TP
.B help
Shows a list of supported commands understood by the running
\fBpdns_recursor\fP\&.
.TP
.B list\-dnssec\-algos
List supported (and potentially disabled) DNSSEC algorithms.
.TP
.B ping
Check if server is alive.
.TP
.B quit
Request shutdown of the recursor, exiting the process while
letting the OS clean up resources.
.TP
.B quit\-nicely
Request nice shutdown of the recursor. This method allows all
threads to finish their current work and releases resources before
exiting. This is the preferred method to stop the recursor.
.TP
.B reload\-acls
Reloads ACLs.
.TP
.B reload\-lua\-script [\fIFILENAME\fP]
(Re)loads Lua script \fIFILENAME\fP\&. If \fIFILENAME\fP is empty, attempt to reload
the currently loaded script. This replaces the script currently loaded.
.TP
.B reload\-lua\-config [\fIFILENAME\fP]
(Re)loads Lua configuration \fIFILENAME\fP\&. If \fIFILENAME\fP is empty, attempt
to reload the currently loaded file. Note that \fIFILENAME\fP will be fully
executed, any settings changed at runtime that are not modified in this
file, will still be active. The effects of reloading do not always take
place immediately, as some subsystems reload and replace configuration
in an asynchronous way. If YAML settings are used this command will
reload the runtime settable parts of the YAML settings.
.TP
.B reload\-yaml
Reload the runtime settable parts of the YAML settings.
.TP
.B reload\-zones
Reload authoritative and forward zones. Retains current configuration in
case of errors.
.TP
.B set\-carbon\-server \fICARBON SERVER\fP [\fICARBON OURNAME\fP]
Set the carbon\-server setting to \fICARBON SERVER\fP\&. If \fICARBON OURNAME\fP is
not empty, also set the carbon\-ourname setting to \fICARBON OURNAME\fP\&.
.TP
.B set\-dnssec\-log\-bogus \fISETTING\fP
Set dnssec\-log\-bogus setting to \fISETTING\fP\&. Set to \fBon\fP or \fByes\fP to log
DNSSEC validation failures and to \fBno\fP or \fBoff\fP to disable logging these
failures.
.TP
.B set\-ecs\-minimum\-ttl \fINUM\fP
Set ecs\-minimum\-ttl\-override to \fINUM\fP\&.
.TP
.B set\-max\-aggr\-nsec\-cache\-size \fINUM\fP
Change the maximum number of entries in the NSEC aggressive cache. If the
cache is disabled by setting its size to 0 in the config, the cache size
cannot be set by this command. Setting the size to 0 by this command still
keeps the cache, but makes it mostly ineffective as it is emptied periodically.
.TP
.B set\-max\-cache\-entries \fINUM\fP
Change the maximum number of entries in the DNS cache. If reduced, the
cache size will start shrinking to this number as part of the normal
cache purging process, which might take a while.
.TP
.B set\-max\-packetcache\-entries \fINUM\fP
Change the maximum number of entries in the packet cache. If reduced, the
cache size will start shrinking to this number as part of the normal
cache purging process, which might take a while.
.TP
.B set\-minimum\-ttl \fINUM\fP
Set minimum\-ttl\-override to \fINUM\fP\&.
.TP
.B set\-event\-trace\-enabled \fINUM\fP
Set logging of event trace messages, \fB0\fP = disabled, \fB1\fP = protobuf,
\fB2\fP = log file, \fB3\fP = protobuf and log file.
.TP
.B show\-yaml [\fIFILE\fP]
Show Yaml representation of old\-style config.
.TP
.B top\-queries
Shows the top\-20 queries. Statistics are over the last
\(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B top\-pub\-queries
Shows the top\-20 queries grouped by public suffix list. Statistics are over
the last \(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B top\-largeanswer\-remotes
Shows the top\-20 remote hosts causing large answers. Statistics are over
the last \(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B top\-remotes
Shows the top\-20 most active remote hosts. Statistics are over the last
\(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B top\-servfail\-queries
Shows the top\-20 queries causing servfail responses. Statistics are over
the last \(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B top\-bogus\-queries
Shows the top\-20 queries causing bogus responses. Statistics are over
the last \(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B top\-pub\-servfail\-queries
Shows the top\-20 queries causing servfail responses grouped by public
suffix list. Statistics are over the last \(aqstats\-ringbuffer\-entries\(aq
queries.
.TP
.B top\-pub\-bogus\-queries
Shows the top\-20 queries causing bogus responses grouped by public
suffix list. Statistics are over the last \(aqstats\-ringbuffer\-entries\(aq
queries.
.TP
.B top\-servfail\-remotes
Shows the top\-20 most active remote hosts causing servfail responses.
Statistics are over the last \(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B top\-bogus\-remotes
Shows the top\-20 most active remote hosts causing bogus responses.
Statistics are over the last \(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B top\-timeouts
Shows the top\-20 most active downstream timeout destinations.
Statistics are over the last \(aqstats\-ringbuffer\-entries\(aq queries.
.TP
.B trace\-regex \fIREGEX\fP \fIFILE\fP
Emit resolution trace for matching queries. No arguments disables tracing.
Before version 4.9.0, there was no \fIFILE\fP argument, traces were always
written to the log. Starting with version 4.9.0, trace information is
written to the file specified, which may be \fB\-\fP for the standard out
stream.
.sp
Queries matching this regular expression will generate voluminous tracing
output. Be aware that matches from the packet cache will still not generate
tracing. To unset the regex, pass \fBtrace\-regex\fP without a new regex.
.sp
The regular expression is matched against domain queries terminated with a
dot. For example the regex \fB\(aqpowerdns.com$\(aq\fP will not match a query for
\fB\(aqwww.powerdns.com\(aq\fP, since the attempted match will be with
\fB\(aqwww.powerdns.com.\(aq\fP\&.
.sp
In addition, since this is a regular expression, to exclusively match
queries for \fB\(aqwww.powerdns.com\(aq\fP, one should escape the dots:
\fB\(aq^www\e.powerdns\e.com\e.$\(aq\fP\&.
Note that the single quotes prevent
further interpretation of the backslashes by the shell.
.sp
Multiple matches can be chained with the \fB|\fP operator. For example, to
match all queries for Dutch (\fB\&.nl\fP) and German (\fB\&.de\fP) domain names, use:
\fB\(aq\e.nl\e.$|\e.de\e.$\(aq\fP\&.
.TP
.B unload\-lua\-script
Unloads Lua script if one was loaded.
.TP
.B version
Report the version of the running Recursor.
.TP
.B wipe\-cache \fIDOMAIN\fP [\fIDOMAIN\fP] [...]
Wipe entries for \fIDOMAIN\fP (exact name match) from the cache. This is useful
if, for example, an important server has a new IP address, but the TTL has
not yet expired. Multiple domain names can be passed.
\fIDOMAIN\fP can be suffixed with a \fB$\fP\&. to delete the whole tree from the
cache. i.e. \fBpowerdns.com$\fP will remove all cached entries under and
including the powerdns.com name.
.sp
\fBNote\fP: this command also wipes the negative cache.
.sp
\fBWarning\fP: Don\(aqt just wipe "www.somedomain.com", its NS records or CNAME
target may still be undesired, so wipe "somedomain.com" as well.
.TP
.B wipe\-cache\-typed \fIqtype\fP \fIDOMAIN\fP [\fIDOMAIN\fP] [...]
Same as wipe\-cache, but only wipe records of type \fIqtype\fP\&.
.UNINDENT
.SH SEE ALSO
.sp
\fBpdns_recursor(1)\fP
\fI\%https://docs.powerdns.com/recursor\fP
.SH AUTHOR
PowerDNS.COM BV
.SH COPYRIGHT
PowerDNS.COM BV
.\" Generated by docutils manpage writer.
.
|