Re: [Dnsmasq-discuss] new config file in /etc/dnsmasq.d

2022-03-09 Thread Donald Muller
>From the manpage

NOTES
When it receives a SIGHUP, dnsmasq clears its cache and then re-loads 
/etc/hosts and /etc/ethers and any file given by --dhcp-hostsfile, 
--dhcp-hostsdir, --dhcp-optsfile, --dhcp-optsdir, --addn-hosts or --hostsdir. 
The DHCP lease change script is called for all existing DHCP leases. If 
--no-poll is set SIGHUP also re-reads /etc/resolv.conf. SIGHUP does NOT re-read 
the configuration file.
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. The number of cache 
hits and misses and the number of authoritative queries answered are also 
given. For each upstream server it gives the number of queries sent, and the 
number which resulted in an error. In --no-daemon mode or when full logging is 
enabled (--log-queries), a complete dump of the contents of the cache is made.

The cache statistics are also available in the DNS as answers to queries of 
class CHAOS and type TXT in domain bind. The domain names are cachesize.bind, 
insertions.bind, evictions.bind, misses.bind, hits.bind, auth.bind and 
servers.bind. An example command to query this, using the dig utility would be

dig +short chaos txt cachesize.bind

When it receives SIGUSR2 and it is logging direct to a file (see --log-facility 
) dnsmasq will close and reopen the log file. Note that during this operation, 
dnsmasq will not be running as root. When it first creates the logfile dnsmasq 
changes the ownership of the file to the non-root user it will run as. 
Logrotate should be configured to create a new log file with the ownership 
which matches the existing one before sending SIGUSR2. If TCP DNS queries are 
in progress, the old logfile will remain open in child processes which are 
handling TCP queries and may continue to be written. There is a limit of 150 
seconds, after which all existing TCP processes will have expired: for this 
reason, it is not wise to configure logfile compression for logfiles which have 
just been rotated. Using logrotate, the required options are create and 
delaycompress.


> -Original Message-
> From: Dnsmasq-discuss 
> On Behalf Of Frank Liu
> Sent: Wednesday, March 9, 2022 2:10 PM
> To: dnsmasq-discuss@lists.thekelleys.org.uk
> Subject: [Dnsmasq-discuss] new config file in /etc/dnsmasq.d
> 
> Hi,
> 
> If I add a new file in /etc/dnsmasq.d that has a few srv-host entries,
> what's the best way to signal dnsmasq, other than restart it, so that
> those records can be resolvable?
> 
> Thanks!
> Frank
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] new config file in /etc/dnsmasq.d

2022-03-09 Thread Rance Hall via Dnsmasq-discuss

I don't remember a mechanism in dnsmasq to achive this, although support for it (if it isn't too much work) would 
be something I'd happily help with.That being said, I think what you want is "inotify" on Linux, or 
"filewatcher" on Windows.  These services will watch files for changes and automatically trigger actions 
like "reload dnsmasq"Warning:  On Linux, inotify is an API so you still need a client to help you 
configure it.  Something like the inotify-tools package on arch.  (I think on debian based systems too)Hope this 
helpsOn Mar 9, 2022, at 1:43 PM, Frank Liu  wrote:Hi,If I add a new file in 
/etc/dnsmasq.d that has a few srv-host entries,what's the best way to signal dnsmasq, other than restart it, so 
thatthose records can be resolvable?Thanks!Frank___Dnsmasq-discuss 
mailing 
listdnsmasq-disc...@lists.thekelleys.org.ukhttps://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] new config file in /etc/dnsmasq.d

2022-03-09 Thread Frank Liu
Hi,

If I add a new file in /etc/dnsmasq.d that has a few srv-host entries,
what's the best way to signal dnsmasq, other than restart it, so that
those records can be resolvable?

Thanks!
Frank

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss