Package: dnsmasq
Version: 2.55-2
Severity: wishlist
Tags: patch
When it receives a SIGUSR1, dnsmasq writes statistics to the system log.
It writes the cache size, the number of names which have had to removed
from the cache before they expired in order to make room for new names
and the total number of names that have been inserted into the cache.
For each upstream server it gives the number of queries sent, and the
number which resulted in an error.
/etc/init.d/dnsmasq should provide a method to trigger that statistics
dump method.
Here is the patch to let /etc/init.d/dnsmasq provide a method to
trigger that statistics dump method:
root@arua:/etc/init.d# diff -pu dnsmasq.dist dnsmasq
--- dnsmasq.dist 2012-01-04 23:00:07.931824846 +0100
+++ dnsmasq 2012-01-04 23:25:50.059820719 +0100
@@ -256,8 +256,12 @@ case "$1" in
*) log_success_msg "(unknown)" ; exit 4 ;;
esac
;;
+ stats)
+ echo "Dumping stats to syslog..."
+ kill -s USR1 `cat /var/run/dnsmasq/$NAME.pid`
+ ;;
*)
- echo "Usage: /etc/init.d/$NAME
{start|stop|restart|force-reload|status}" >&2
+ echo "Usage: /etc/init.d/$NAME
{start|stop|restart|force-reload|status|stats}" >&2
exit 3
;;
esac
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]