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

@rgacogne rgacogne commented Jun 22, 2018

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

@phonedph1 phonedph1 commented Jun 22, 2018

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

Copy link

@pieterlexis pieterlexis commented Jun 23, 2018

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

@rgacogne rgacogne commented Jun 25, 2018

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 requested a review from pieterlexis Jun 28, 2018
@rgacogne rgacogne merged commit 3e0d3a4 into PowerDNS:master Jul 4, 2018
4 checks passed
4 checks passed
LGTM analysis: C/C++ No alert changes
LGTM analysis: JavaScript No alert changes
LGTM analysis: Python No alert changes
continuous-integration/travis-ci/pr The Travis CI build passed
@rgacogne rgacogne deleted the rgacogne:dnsdist-cache-dump branch Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants