From: Otto Date: Mon, 15 Feb 2021 11:06:24 +0000 (+0100) Subject: Add a general note to the manpage on how file handling is changed. X-Git-Tag: dnsdist-1.6.0-alpha2~39^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=014c570a6fd2bf866e605d64f3422d79f2cd2c1d;p=thirdparty%2Fpdns.git Add a general note to the manpage on how file handling is changed. Also, remove the snippets about where the files are written in case of chroot for each file-writing command. --- diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index 1b7540bcf6..65d0c88e6f 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -1673,7 +1673,7 @@ RecursorControlChannel::Answer RecursorControlParser::getAnswer(int s, const str " remove netmasks that are not allowed to be throttled. If N is '*', remove all\n" "clear-nta [DOMAIN]... Clear the Negative Trust Anchor for DOMAINs, if no DOMAIN is specified, remove all\n" "clear-ta [DOMAIN]... Clear the Trust Anchor for DOMAINs\n" -"dum-cache dump cache contents to the named file\n" +"dump-cache dump cache contents to the named file\n" "dump-edns [status] dump EDNS status to the named file\n" "dump-nsspeeds dump nsspeeds statistics to the named file\n" "dump-rpz dump the content of a RPZ zone to the named file\n" diff --git a/pdns/recursordist/docs/manpages/rec_control.1.rst b/pdns/recursordist/docs/manpages/rec_control.1.rst index 54bcd2b8a5..a76e4570fd 100644 --- a/pdns/recursordist/docs/manpages/rec_control.1.rst +++ b/pdns/recursordist/docs/manpages/rec_control.1.rst @@ -31,6 +31,12 @@ To dump the cache to disk, execute:: # rec_control dump-cache /tmp/the-cache +.. note:: + + Before version 4.5.0, for each command that writes to a file, :program:`pdns_recursor` would open the file to write to. + Starting with 4.5.0, the files are opened by the :program:`rec_control` command itself using the credentials and the current working directory of the user running :program:`rec_control`. + A single minus *-* can be used as a filename to write the data to the standard output stream. + Options ------- --help provide this helpful message. @@ -78,91 +84,43 @@ clear-ta [*DOMAIN*]... dump-cache *FILENAME* Dumps the entire cache to *FILENAME*. This file should not exist already, - PowerDNS will refuse to overwrite it. While dumping, the recursor will not - answer questions. + PowerDNS will refuse to overwrite it. While dumping, the recursor + might not answer questions. Typical PowerDNS Recursors run multiple threads, therefore you'll see duplicate, different entries for the same domains. The negative cache is also dumped to the same file. The per-thread positive and negative cache dumps are separated with an appropriate comment. - .. note:: - - :program:`pdns_recursor` often runs in a chroot. You can - retrieve the file using:: - - rec_control dump-cache /tmp/file - mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename - dump-edns *FILENAME* 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. - .. note:: - - :program:`pdns_recursor` often runs in a chroot. You can - retrieve the file using:: - - rec_control dump-edns /tmp/file - mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename - dump-nsspeeds *FILENAME* Dumps the nameserver speed statistics to the *FILENAME* 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. - .. note:: - - :program:`pdns_recursor` often runs in a chroot. You can - retrieve the file using:: - - rec_control dump-nsspeeds /tmp/file - mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename - dump-rpz *ZONE NAME* *FILE NAME* Dumps the content of the RPZ zone named *ZONE NAME* to the *FILENAME* mentioned. This file should not exist already, PowerDNS will refuse to overwrite it otherwise. While dumping, the recursor will not answer questions. - .. note:: - - :program:`pdns_recursor` often runs in a chroot. You can - retrieve the file using:: - - rec_control dump-rpz ZONE_NAME /tmp/file - mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename - dump-throttlemap *FILENAME* Dump the contents of the throttle map to the *FILENAME* mentioned. This file should not exist already, PowerDNS will refuse to overwrite it otherwise. While dumping, the recursor will not answer questions. - .. note:: - - :program:`pdns_recursor` often runs in a chroot. You can - retrieve the file using:: - - rec_control dump-throttlemap /tmp/file - mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename - dump-failedservers *FILENAME* Dump the contents of the failed server map to the *FILENAME* mentioned. This file should not exist already, PowerDNS will refuse to overwrite it otherwise. While dumping, the recursor will not answer questions. - .. note:: - - :program:`pdns_recursor` often runs in a chroot. You can - retrieve the file using:: - - rec_control dump-failedservers /tmp/file - mv /proc/$(pidof pdns_recursor)/root/tmp/file /tmp/filename - get *STATISTIC* [*STATISTIC*]... Retrieve a statistic. For items that can be queried, see :doc:`../metrics`