To list the entries of DNS cache in OSX 10.11.6, I tried dscacheutil -statistics
but that didn't work.
$ sudo dscacheutil -statistics
Unable to get details from the cache node
How can I just print what is there in the DNS cache without flushing it?
mDNSResponder (multicast DNS daemon) SIGINFO signal can dump a snapshot summary of the internal state to
/var/log/system.log
, including the cache details. To do this:Keep system log opened in one terminal:
Send a SIGINFO signal to mDNSResponder from another terminal:
Then check the logs in first terminal, you would be able to see cache dump:
(For more info:
man mDNSResponder
)