ablog

不器用で落着きのない技術者のメモ

macOS Sierra で DNS リゾルバキャッシュを確認する方法

/var/log/system.log を tail して、

% tail -f /var/log/system.log

以下のコマンドで出力する。

% sudo killall -INFO mDNSResponder

参考

% man mDNSResponder

(中略)

     By default, only log level Error is logged.

     A SIGUSR1 signal toggles additional logging, with Warning and Notice enabled by default:

           % sudo killall -USR1 mDNSResponder

     Once this logging is enabled, users can additionally use syslog(1) to change the log filter for the process. For example, to enable log levels Emer-
     gency - Debug:

           % sudo syslog -c mDNSResponder -d

     A SIGUSR2 signal toggles packet logging:

           % sudo killall -USR2 mDNSResponder

     A SIGINFO signal will dump a snapshot summary of the internal state to /var/log/system.log:

           % sudo killall -INFO mDNSResponder