What is the equivalent of ipconfig/displaydns (and flushdns) in OS X?

As @PrasseethaKR and @kjagiello point out, on High Siera mDNSResponer has moved from syslog to log function. In addition, your DNS lookups are now considered private and will show as such in both Console and log stream.

To view your DNS lookups in real time on High Sierra open an Terminal and run:

sudo log config --mode "private_data:on"
log stream --predicate 'process == "mDNSResponder"' --info

To go back to using private just run the following command.

sudo log config --mode "private_data:off"

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 the show 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...

log show --last 2h --predicate 'process == "mDNSResponder"' --info

Cheers!


To see the DNS cache, you can use the following command in Terminal to dump a snapshot summary of the internal state of mDNSResponder to /var/log/system.log:

sudo killall -INFO mDNSResponder

Then to review, you can either use Console and filter using mDNSResponder or since Terminal is already handy just use:

grep mDNSResponder /var/log/system.log

To flush the DNS cache, use the following command:

sudo killall -HUP mDNSResponder