I need to find how to display my DNS cache on the mac. I have tried
multi Google searches but failed to come up with a good solution.
The best I found was how to remove the cache with the command
sudo killall -HUP mDNSResponder
which is great but I need to see the cache to see if the change works.
MacOS – the equivalent of ipconfig/displaydns (and flushdns) in OS X
dnsmacosterminal
Best Answer
As @PrasseethaKR and @kjagiello point out, on High Siera mDNSResponer has moved from
syslog
tolog
function. In addition, your DNS lookups are now considered private and will show as such in both Console andlog stream
.To view your DNS lookups in real time on High Sierra open an Terminal and run:
To go back to using private just run the following command.
AFAIK you cannot view the contents of old private messages, only messages logged with
private_data:on
can appear. To view your entire history use theshow
command Because it can return a large amount of data I also use--last
to limit the data, e.g. the last 2 hours would be...Cheers!