diff options
author | Alexey Abramov <[email protected]> | 2025-05-08 19:47:43 +0200 |
---|---|---|
committer | Maxim Cournoyer <[email protected]> | 2025-05-16 17:01:11 +0900 |
commit | efcf1a233410797e092a3b413269575fd1b04afd (patch) | |
tree | 9dd794d2156913dba90372699861bfb0b37e08e0 /doc | |
parent | 50126b39aceb203c16596a433141dd71218c94fb (diff) |
services: dnsmasq: Add stats and reload shepherd actions.
* gnu/services/dns.scm (dnsmasq-service-reload-action): New function.
Implements SIGHUP handling for reloading configurations.
(dnsmasq-service-stats-action): New function. Implements SIGUSR1
handling for dumping statistics.
(dnsmasq-shepherd-service): Use new actions.
* doc/guix.texi: Document new actions with examples.
* gnu/tests/networking.scm (%test-dnsmasq): Add tests to verify the
functionality of new actions.
Change-Id: I31f0eb4b26a582e95f7bfdb240110c139f0e16cc
Signed-off-by: Maxim Cournoyer <[email protected]>
Modified-by: Maxim Cournoyer <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index b3c5c74faf..8e73685a21 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -36111,6 +36111,61 @@ This is the type of the dnsmasq service, whose value should be a (no-resolv? #t) (servers '("192.168.1.1")))) @end lisp + +@code{dnsmasq-service-type} provides two actions: + +@table @code +@item reload +Send a @code{SIGHUP} signal to @command{dnsmasq} to clear cache and +reload hosts files which triggers the following actions: + +@itemize @bullet +@item +Clear the DNS cache +@item +Reload @file{/etc/hosts} and @file{/etc/ethers} +@item +Reload files specified by @option{--dhcp-hostsfile}, @option{--dhcp-hostsdir}, +@option{--dhcp-optsfile}, @option{--dhcp-optsdir}, @option{--addn-hosts}, +or @option{--hostsdir} +@item +Execute DHCP lease change scripts for all existing leases +@item +Reread @file{/etc/resolv.conf} (only if @option{--no-poll} is +configured). +@end itemize + +@quotation Note +The @code{SIGHUP} signal does not trigger a reload of the main +configuration file. +@end quotation + +Example usage: +@example +herd reload dnsmasq +@end example + +@item stats +When @command{dnsmasq} receives a @code{SIGUSR1} signal, it writes +statistics to the system log including: + +@itemize @bullet +@item +Cache size and number of evicted entries +@item +Cache hits, misses, and authoritative queries answered +@item +For each upstream server: queries sent and errors received +@item +TCP connection fork statistics. +@end itemize + +Example usage: +@example +herd stats dnsmasq +@end example +@end table + @end defvar @deftp {Data Type} dnsmasq-configuration |