From: Otto Moerbeek Date: Wed, 1 Feb 2023 09:23:48 +0000 (+0100) Subject: Upgrade guide and running recursor updates to new rec_control trace-regex X-Git-Tag: dnsdist-1.8.0-rc1~38^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=21c59bd3f5044149468ed38673656fdd85663cda;p=thirdparty%2Fpdns.git Upgrade guide and running recursor updates to new rec_control trace-regex --- diff --git a/pdns/recursordist/docs/running.rst b/pdns/recursordist/docs/running.rst index 88b4b26de6..0b73d078b6 100644 --- a/pdns/recursordist/docs/running.rst +++ b/pdns/recursordist/docs/running.rst @@ -76,21 +76,39 @@ When debugging resolving issues, it can be advantageous to have a dump of all th rec_control dump-cache /tmp/cache +.. _tracing: + Tracing Queries --------------- -To investigate failures with resolving certain domain names, the PowerDNS Recursor features a "tracing" infrastructure. -This infrastructure will log every step the Recursor takes to resolve a name and will log all DNSSEC related information as well. +To investigate failures with resolving certain domain names, the PowerDNS :program:`Recursor` features a tracing infrastructure. +This infrastructure will log every step the :program:`Recursor` takes to resolve a name and will log all DNSSEC related information as well. To enable tracing for all queries, enable the :ref:`setting-trace` setting. +Trace infomration will be written to the log. .. warning:: Enabling tracing for all queries on a system with a high query rate can severely impact performance. -Tracing can also be enabled at runtime, without restarting the Recursor, for specific domains. +Tracing can also be enabled at runtime, without restarting the :program:`Recursor`, for specific domains. These specific domains can be specified as a regular expression. This can be done using :doc:`rec_control trace-regex `:: - rec_control trace-regex '.*\.example.com\.$' + rec_control trace-regex '.*\.example.com\.$' Will enable tracing for any query *in* the example.com domain (but not example.com itself). + +Since version 4.9.0 ``trace_regex`` takes an extra file argument. +Trace information will be written to the file and not to the log. +If the file argument is a hyphen (``-``), trace information will be written to the standard output stream. +For example:: + + rec_control trace-regex 'example\.com\.$' - | grep asking + +will show which authoritative servers were consulted. + +Do not forget to disable tracing after diagnosis is done:: + + rec_control trace-regex + + diff --git a/pdns/recursordist/docs/upgrade.rst b/pdns/recursordist/docs/upgrade.rst index 8818dd06b6..5f5e2b6c07 100644 --- a/pdns/recursordist/docs/upgrade.rst +++ b/pdns/recursordist/docs/upgrade.rst @@ -15,6 +15,10 @@ This is now resolved, but has the consequence that some metrics (in particular r This affects the results shown by ``rec_control get-qtypelist`` and the ``response-by-qtype``, ``response-sizes`` and ``response-by-rcode`` items returned by the ``/api/v1/servers/localhost/statistics`` API endpoint. Additionally, most ``RCodes`` and ``QTypes`` that are marked ``Unassigned``, ``Reserved`` or ``Obsolete`` by IANA are not accounted, to reduce the memory consumed by these metrics. +:program:`rec_control` +^^^^^^^^^^^^^^^^^^^^^^ +The ``trace_regex`` subcommand has been changed to take a file argument. +Refer to :doc:`rec_control trace-regex ` and :ref:`tracing` for details and example use. 4.8.1 to 4.8.2 --------------