Skip to content

Instantly share code, notes, and snippets.

@gpant
Last active January 5, 2023 19:18
Show Gist options
  • Select an option

  • Save gpant/2f52dd7d861f9067dec76f53b6117787 to your computer and use it in GitHub Desktop.

Select an option

Save gpant/2f52dd7d861f9067dec76f53b6117787 to your computer and use it in GitHub Desktop.
Bind Update Statistics
Create a cron entry like this:
* * * * * /home/bindstats.sh > /dev/null 2>&1
Create the file /home/bindstats.sh and paste the following:
#!/bin/bash
if [ -f /var/named/data/named_stats.txt ]; then
rm /var/named/data/named_stats.txt
fi
/usr/sbin/rndc stats
Make the script executable:
chmod +x /home/bindstats.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment