Unverified Commit 3ff7b088 authored by Gavin Brown's avatar Gavin Brown
Browse files

update

parent 5b6711d7
...@@ -29,67 +29,67 @@ example of how this can be achieved. ...@@ -29,67 +29,67 @@ example of how this can be achieved.
- `--debug` - `--debug`
Enable debug mode. Set `Debug` option.
- `--loop=LOOP` - `--multithreaded`
Set loop duration. Set `Multithreaded` option.
- `--pidfile=FILE` - `--pidfile=FILE`
Specify pid file. Set `PidFile` option.
- `--database=FILE`
Set `Database` option.
- `--percentile=PERCENTILE`
Set `Percentile` option.
- `--family=(4|6)` - `--family=(4|6)`
Specify IP version. Set `Family` option.
- `--proto=QUESTION` - `--proto=(udp|tcp)`
Specify protocol. Set `Protocol` option.
- `--question=QUESTION` - `--loop=LOOP`
Specify question. Set `Loop` option.
- `--timeout=TIMEOUT` - `--timeout=TIMEOUT`
Specify timeout. Set `Timeout` option.
- `--recurse` - `--recurse`
Enable recursion. Set `Recurse` option.
- `--servers=SERVERS` - `--question=QUESTION`
Specify servers to check.
- `--statsfile=FILE`
Specify stats file. Set `Question` option.
- `--percentile=PERCENTILE` - `--servers=SERVERS`
Specify a percentile to use when generating statistics. Set `Servers` option.
- `--domains=DOMAINS` - `--domains=DOMAINS`
Specify domain names to query for a list of servers. Set `Domains` option.
- `--optimistic` - `--optimistic`
Enable Optimistic mode. Set `Optimistic` option.
- `--update=TIME` - `--update=TIME`
Specify automatic stats update interval. Set `UpdateInterval` option.
- `--multithreaded`
Run in multithreaded mode.
- `--database=FILE` - `--statsfile=FILE`
Specify SQLite database. Set `StatsFile` option.
# CONFIGURATION FILE # CONFIGURATION FILE
...@@ -100,11 +100,11 @@ The format is very simple. Here is an example: ...@@ -100,11 +100,11 @@ The format is very simple. Here is an example:
MultiThreaded true MultiThreaded true
PidFile /var/run/rdnsd/rdnsd.pid PidFile /var/run/rdnsd/rdnsd.pid
Database /var/run/rdnsd/rdnsd.db Database /var/run/rdnsd/rdnsd.db
StatsFile /var/run/rdnsd/rdnsd.log
Percentile 95 Percentile 95
AddressFamily 4 AddressFamily 4
Protocol udp Protocol udp
Loop 3 Loop 3
Timeout 1
Recurse false Recurse false
Question . A IN Question . A IN
Servers ns1.example.com,ns2.example.net Servers ns1.example.com,ns2.example.net
...@@ -118,24 +118,45 @@ configuration file. ...@@ -118,24 +118,45 @@ configuration file.
- `Debug (true|false)` - `Debug (true|false)`
Default: false Default: `false`
Normally, `rdnsd` will daemonise once started. If the `Debug` parameter Normally, `rdnsd` will daemonise once started. If the `Debug` parameter
is `true`, `rdnsd` will stay in the foreground and spam your terminal is `true`, `rdnsd` will stay in the foreground and spam your terminal
with debugging information. with debugging information.
- `Multithreaded (true|false)`
Default: `true`
This parameter enables multithreaded mode. In this mode, `rdnsd` will
probe servers in parallel inside separate threads. Otherwise, it probes
them in serial, one after the other. Use of multithreaded mode resolves
some issues with monitoring large numbers of servers, at the cost of
higher CPU load.
- `PidFile /path/to/pid/file` - `PidFile /path/to/pid/file`
Default: /var/run/rdnsd/rdnsd.pid Default: `/var/run/rdnsd/rdnsd.pid`
The file where `rdnsd` will write its pid. The file where `rdnsd` will write its pid.
- `StatsFile /path/to/stats/file` - `Database FILE`
Default: /var/run/rdnsd/rdnsd.log Default: `/var/run/rdnsd/rdnsd.sqlite`
If set, `rdnsd` will create an SQLite database at the specified file
and write statistics to it. The database will contain a single table
named `rdnsd`, which will contain the following columns:
The file where `rdnsd` will write statistics to when signalled. See - `id` - unique row ID
["OBTAINING STATISTICS"](#obtaining-statistics) for further information. - `date` - date/time the row was inserted
- `host` - hostname
- `family` - IP version (4 or 6)
- `proto` - transport protocol (UDP or TCP)
- `rate` - response rate as a decimal (0.00 - 1.00)
- `time` - average RTT in milliseconds
- `percentile_time` - average RTT in milliseconds at the
configured percentile.
- `Percentile PERCENTILE` - `Percentile PERCENTILE`
...@@ -151,27 +172,34 @@ configuration file. ...@@ -151,27 +172,34 @@ configuration file.
- `Protocol (udp|tcp)` - `Protocol (udp|tcp)`
Default: udp Default: `udp`
Specify the transport protocol (UDP or TCP) to use. Specify the transport protocol (UDP or TCP) to use.
- `Loop SECONDS` - `Loop SECONDS`
Default: 2 Default: `3`
This specifies the length of the main loop. If this is set to 2, then This specifies the length of the main loop. If this is set to 2, then
each server will be checked every 2 seconds. This value can be a decimal each server will be checked every 2 seconds. This value can be a decimal
fraction, eg 0.25. fraction, eg 0.25.
- `Timeout SECONDS`
Default: `1`
This specifies the timeout for DNS queries. A server will be considered
down if it does not respond within this amount of time.
- `Recurse (true|false)` - `Recurse (true|false)`
Default: false Default: `false`
Enable recursion. Enable recursion.
- `Question QUESTION` - `Question QUESTION`
Default: example.com. IN A Default: `example.com. IN A`
Specify the DNS question. The format is "QNAME QCLASS QTYPE". Specify the DNS question. The format is "QNAME QCLASS QTYPE".
...@@ -196,7 +224,7 @@ configuration file. ...@@ -196,7 +224,7 @@ configuration file.
- `Optimistic (true|false)` - `Optimistic (true|false)`
Default: false Default: `false`
This parameter controls what happens when `rdnsd` outputs statistics but This parameter controls what happens when `rdnsd` outputs statistics but
finds a server in its list that it has not yet had time to send a finds a server in its list that it has not yet had time to send a
...@@ -205,38 +233,19 @@ configuration file. ...@@ -205,38 +233,19 @@ configuration file.
- `UpdateInterval TIME` - `UpdateInterval TIME`
Default: 290 Default: `293`
This parameter tells `rdnsd` to automatically update the statistics file This parameter tells `rdnsd` to automatically update the statistics file
every `TIME` seconds. every `TIME` seconds.
- `Multithreaded (true|false)` - `StatsFile /path/to/stats/file`
Default: false
This parameter enables multithreaded mode. In this mode, `rdnsd` will
probe servers in parallel inside separate threads. Otherwise, it probes
them in serial, one after the other. Use of multithreaded mode resolves
some issues with monitoring large numbers of servers, at the cost of
higher CPU load.
- `Database FILE`
Default: none Default: none
If set, `rdnsd` will create an SQLite database at the specified file **Note:** this is a legacy option to provide backwards compatibility.
and write statistics to it. The database will contain a single table
named `rdnsd`, which will contain the following columns:
- `id` - unique row ID Th specifies the file where `rdnsd` will write statistics to when
- `date` - date/time the row was inserted signalled. See ["OBTAINING STATISTICS"](#obtaining-statistics) for further information.
- `host` - hostname
- `family` - IP version (4 or 6)
- `proto` - transport protocol (UDP or TCP)
- `rate` - response rate as a decimal (0.00 - 1.00)
- `time` - average RTT in milliseconds
- `percentile_time` - average RTT in milliseconds at the
configured percentile.
# RELOADING CONFIGURATION # RELOADING CONFIGURATION
...@@ -249,34 +258,34 @@ new options added to the configuration file. ...@@ -249,34 +258,34 @@ new options added to the configuration file.
# OBTAINING STATISTICS # OBTAINING STATISTICS
Every `UpdateInterval` seconds, `rdnsd` will write stats to the file Every `UpdateInterval` seconds, `rdnsd` will write stats to the SQLite
specified by `StatsFile`, and, if set, the SQLite database specified by database specified by `Database`, and, if set, the file specified by
`Database`. `StatsFile`.
The recommended way to obtain statistics is to query the SQLite database
specified by the `Database` directive.
If `UpdateInterval` is unset, automatic updates will not occur, so to If `UpdateInterval` is unset, automatic updates will not occur, so to
get statistics out of `rdnsd`, you must sending it a `USR1` signal: get statistics out of `rdnsd`, you must sending it a `USR1` signal:
$ kill -USR1 `cat /path/to/pid/file` $ kill -USR1 `cat /path/to/pid/file`
**NOTE:** if you have `N` servers and a `Loop` value of `M`, you must **NOTE:** if multithreaded mode is disabled, and you have `N` servers
be careful not to send the USR1 signal to `rdnsd` more often than every and a `Loop` value of `M`, you must be careful not to send the USR1
`N x M` seconds, otherwise `rdnsd` will not have enough time to test signal to `rdnsd` more often than every `N x M` seconds, otherwise
every server. You probably want to send the signal about every `3 x N x M` `rdnsd` will not have enough time to test every server. You probably
seconds if you want reliable statistics. want to send the signal about every `3 x N x M` seconds if you want
reliable statistics when not running in multithreaded mode.
If <rdnsd> is running in multithreaded mode, then you can send the `USR1`
signal much more often (once every `Loop x Timeout` seconds).
Note that `rdnsd` will not _immediately_ update the file upon receiving If `rdnsd` _is_ running in multithreaded mode, then you can send the
the `USR1` signal. You may need to wait up to `Loop` seconds for the `USR1` signal much more often (once every `Loop x Timeout` seconds).
current loop iteration to complete before the stats file is updated.
## STATISTICS FILE FORMAT ## (LEGACY) STATISTICS FILE FORMAT
The statistics file will contain one line for each server that is being The (legacy\* statistics file will contain one line for each server that
checked. Each line contains the nameserver checked, the response rate as is being checked. Each line contains the nameserver checked, the response
a decimal fraction, and the average response time (in milliseconds), for rate as a decimal fraction, and the average response time (in milliseconds),
example: for example:
ns0.example.com 1.00 25 ns0.example.com 1.00 25
...@@ -292,6 +301,10 @@ percentile. ...@@ -292,6 +301,10 @@ percentile.
Once the file has been written, `rdnsd`'s internal data is reset, so Once the file has been written, `rdnsd`'s internal data is reset, so
subsequent signals will produce fresh statistical data. subsequent signals will produce fresh statistical data.
Note that `rdnsd` will not _immediately_ update the file upon receiving
the `USR1` signal. You may need to wait up to `Loop` seconds for the
current loop iteration to complete before the stats file is updated.
# SEE ALSO # SEE ALSO
- [https://www.centralnic.com/](https://www.centralnic.com/) - [https://www.centralnic.com/](https://www.centralnic.com/)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment