What's new

Solved Dnsmasq cache statistics?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

kstamand

Occasional Visitor
Is there any way to get statistics for dnsmasq cache usage?

A general Google search showed one possibility (pkill -USR1 dnsmasq), but I didn’t find anything in the log(s) with that information.
 
Code:
killall -s USR1 dnsmasq
Doesn’t appear to work. I checked syslog (messages) and dnsmasq.log and not seeing any related statistics.

dnsmasq.conf has not been modified from default, other than by what Diversion adds.

Am I missing something?
 
The command is correct so you must be using some sort of non-default logging.

Code:
Nov  1 08:00:00 dnsmasq[30398]: time 4964517
Nov  1 08:00:00 dnsmasq[30398]: cache size 1500, 0/33795 cache insertions re-used unexpired cache entries.
Nov  1 08:00:00 dnsmasq[30398]: queries forwarded 47209, queries answered locally 53093
Nov  1 08:00:00 dnsmasq[30398]: pool memory in use 0, max 44, allocated 2200
Nov  1 08:00:00 dnsmasq[30398]: server 1.1.1.1#53: queries sent 10344, retried or failed 0
Nov  1 08:00:00 dnsmasq[30398]: server 194.168.4.100#53: queries sent 10344, retried or failed 11
 
The command is correct so you must be using some sort of non-default logging.

Code:
Nov  1 08:00:00 dnsmasq[30398]: time 4964517
Nov  1 08:00:00 dnsmasq[30398]: cache size 1500, 0/33795 cache insertions re-used unexpired cache entries.
Nov  1 08:00:00 dnsmasq[30398]: queries forwarded 47209, queries answered locally 53093
Nov  1 08:00:00 dnsmasq[30398]: pool memory in use 0, max 44, allocated 2200
Nov  1 08:00:00 dnsmasq[30398]: server 1.1.1.1#53: queries sent 10344, retried or failed 0
Nov  1 08:00:00 dnsmasq[30398]: server 194.168.4.100#53: queries sent 10344, retried or failed 11
I found that while Diversion is running that the stats will not show up in the logs with the killall command.

Any thoughts or should I post a separate question in the Asuswrt-Merlin AddOns channel?
 
I found that while Diversion is running that the stats will not show up in the logs with the killall command.

Any thoughts or should I post a separate question in the Asuswrt-Merlin AddOns channel?
Thanks @ColinTaylor and @dave14305, I was finally able to find the stats in the dnsmasq.log - i was assuming the stats would be at the end of the log after issuing the command but they were at the start of the very long list of block lines that were printed after the stats.

THANKS MUCH of the Help
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top