How to dump dnsmasq cache entries?

5.4k Views Asked by At

I want to see and dump DNS cache entries in DNsmasq.How can i do?

port=53
resolv-file=/etc/resolv.dnsmasq.conf
log-queries
log-facility=/root/dnsmasq.log
cache-size=1
#local-ttl=3600
log-async=50
clear-on-reload
interface=GE2
bind-interfaces
1

There are 1 best solutions below

0
Supratik Chatterjee On

The utility dnsmasq maintains an in-memory cache. You could restart the utility with the -q flag to log the results to /var/log/syslog.

Refer the following link, for full details: https://unix.stackexchange.com/questions/162973/how-to-measure-dns-cache-efficiency-cached-items/163075#163075