Last active
August 23, 2016 13:07
-
-
Save smj10j/45ea9ab1dd40c0a12bfff74d5379852b to your computer and use it in GitHub Desktop.
Get dnsmasq cache status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# activate debugging | |
#set -x | |
# fail on any errors | |
set -e | |
# OSX | |
tac <(sudo killall -SIGUSR1 dnsmasq && tac /usr/local/var/log/dnsmasq/dnsmasq.log | grep -m1 -B1000 ": time ") | |
#sudo killall -SIGUSR1 dnsmasq && tac /usr/local/var/log/dnsmasq/dnsmasq.log | grep -m1 -B1000 ": time " | tac | |
# Ubuntu/Debian | |
#sudo service dnsmasq dump-stats && tac <(sudo killall -SIGUSR1 dnsmasq && sudo tac /var/log/syslog | grep -m1 -B1000 ": time ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# activate debugging | |
#set -x | |
# fail on any errors | |
set -e | |
# OSX | |
watch -dc -n10 'sudo killall -SIGUSR1 dnsmasq && tac /usr/local/var/log/dnsmasq/dnsmasq.log | grep -m1 -B1000 ": time " | tac' | |
#watch -dc -n10 ./dnsmasq-status.command | |
# Ubuntu/Debian | |
#sudo watch -dc -n10 'service dnsmasq dump-stats; killall -SIGUSR1 dnsmasq; tac /var/log/syslog | grep -m1 -B1000 ": time " | tac' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment