Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: Add the ability to dump a summary of the cache content #6749

merged 1 commit into from Jul 4, 2018


Copy link

Short description

The new feature writes a summary of the packet cache content to a file, dumping for each entry:

  • qname
  • remaining TTL
  • qtype
  • computed hash
  • response's length
  • TCP or UDP
  • the timestamp of when the entry was added to the cache.


I have:

  • read the document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

Copy link

This is much better than what I had come up with!

Copy link

Looks good. Perhaps the TTL and QType should be swapped?

Also, I would like a 'header' on the first line like this:

; qname TTL type

Copy link
Member Author

Perhaps the TTL and QType should be swapped?

I had the same feeling but decided to keep the same order than the one when dumping the recursor's packet cache. But the more I think about it, the less relevant it is so I'm OK with swapping it.

Also, I would like a 'header' on the first line like this:

I'm not sure it's really needed, because that's almost what we already have:

; dnsdist's packet cache dump follows
; 3572 A ; key 2000355501, length 57, tcp 0, added 1529912626 3590 A ; key 4247463626, length 61, tcp 0, added 1529912644 3595 A ; key 1069543761, length 109, tcp 0, added 1529912649

@rgacogne rgacogne merged commit 3e0d3a4 into PowerDNS:master Jul 4, 2018
@rgacogne rgacogne deleted the dnsdist-cache-dump branch July 4, 2018 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants