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
merged 1 commit into from Jul 4, 2018

Conversation

Projects
None yet
3 participants
@rgacogne
Member

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.

Checklist

I have:

  • read the CONTRIBUTING.md 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)

@rgacogne rgacogne added this to the dnsdist-1.3.x milestone Jun 22, 2018

@phonedph1

This comment has been minimized.

Contributor

phonedph1 commented Jun 22, 2018

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

@pieterlexis

This comment has been minimized.

Member

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
@rgacogne

This comment has been minimized.

Member

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
;
powerdns.com. 3572 A ; key 2000355501, length 57, tcp 0, added 1529912626
www.powerdns.com. 3590 A ; key 4247463626, length 61, tcp 0, added 1529912644
nx.powerdns.com. 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

LGTM analysis: C/C++ No alert changes
Details
LGTM analysis: JavaScript No alert changes
Details
LGTM analysis: Python No alert changes
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@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