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

Conversation

rgacogne
Copy link
Member

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)

@phonedph1
Copy link
Contributor

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

@pieterlexis
Copy link
Contributor

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
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
;
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 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants