I have a self-hosted authoritative DNS server, using MaraDNS. We're having smaller periods of unresponsiveness during peak times. I'm guessing because of this it has to do with MaraDNS not having enough resources.
I want to monitor how many DNS requests it's getting, I can't seem to find anything that would log numbers of requests for a time (just full requests which seems like overkill). See maraDNS config reference, log_level.
One thing I could do is:
tcpdump -q -i en0 port 53 | grep <something?> | echo '1\n' > somefile_txt
tcpdump -q -i en0 port 53
would get incoming traffic I believe, q
would keep the output to one line and simple. I don't know what the tcpdump will look like for getting a request. Then I'd just write 1's to a file and do a cat somefile_txt | wc -l
to see how many requests came in.
Is there a better way? Is there other ways to monitor DNS systems with more granularity?
Thanks!