dnsmasq
を設定しました Debianサーバー上のキャッシュ専用DNSサーバーとして機能し、正常に機能しています(digを介したDNS応答時間の改善が見られます)。
ただし、dnsmasq
とは何かを理解したいのですが はいつでもキャッシュできるので、達成している効率(つまりヒット率)について考え始めることができます。
マニュアルページとWebを調べましたが、dnsmasq
がどのように表示されるかわかりません。 はいつでもキャッシュします(たとえば、dnsmasq.leaseファイルに保存されているリースの場合とは異なります)。
dnsmasq
ですか DNSキャッシュはメモリにのみ保持されますか?または、ログファイルの変更を行う必要がありますか?
承認された回答:
dnsmasq
にアクセスできません しかし、このスレッドのタイトルによると:dnsmasqはキャッシングですか?信号USR1をdnsmasq
に送信できます プロセスにより、統計がシステムログにダンプされます。
$ sudo pkill -USR1 dnsmasq
次に、システムログを参照します:
$ sudo tail /var/log/syslog
Jan 21 13:37:57 dnsmasq[29469]: time 1232566677
Jan 21 13:37:57 dnsmasq[29469]: cache size 150, 0/475 cache insertions re-used unexpired cache entries.
Jan 21 13:37:57 dnsmasq[29469]: queries forwarded 392, queries answered locally 16
Jan 21 13:37:57 dnsmasq[29469]: server 208.67.222.222#53: queries sent 206, retried or failed 12
Jan 21 13:37:57 dnsmasq[29469]: server 208.67.220.220#53: queries sent 210, retried or failed 6
注: dnsmasq
だと思います キャッシュをRAMに保持します。
したがって、キャッシュをダンプする場合は、-q
を有効にする必要があります dnsmasq
のときに切り替える が呼び出されます。これはdnsmasq
に記載されています マニュアルページ:
-d, --no-daemon
Debug mode: don't fork to the background, don't write a pid file,
don't change user id, generate a complete cache dump on
receipt on SIGUSR1, log to stderr as well as syslog, don't fork new
processes to handle TCP queries. Note that this option is for use in
debugging only, to stop dnsmasq daemonising in production, use -k.
-q, --log-queries
Log the results of DNS queries handled by dnsmasq. Enable a full
cache dump on receipt of SIGUSR1.
コマンドの完了時にペイン/ウィンドウが閉じないようにする– Tmux?
Linux – FsがクラッシュしてFsckを実行した後、一部のファイルは回復されましたが、Lost + foundに配置されませんでしたか?