cmdmon: limit reported clients by number of packets

Add a new field to the CLIENT_ACCESSES_BY_INDEX request to specify the
minimum number of NTP or cmdmon packets for a client to be reported.

Add -p option to the chronyc clients command to specify the threshold
(by default 0). This option can be used to minimize the number of cmdmon
requests when interested only in clients sending a large number
of requests.
This commit is contained in:
Miroslav Lichvar
2020-05-18 13:58:55 +02:00
parent ee2220f2e7
commit 28cf4acf13
6 changed files with 44 additions and 23 deletions

View File

@@ -954,13 +954,16 @@ This command can be used to examine the effect of a series of *allow*, *allow
all*, *deny*, and *deny all* commands specified either via *chronyc*, or in
*chronyd*'s configuration file.
[[clients]]*clients* [*-r*]::
[[clients]]*clients* [*-p* _packets_] *[*-r*]::
This command shows a list of clients that have accessed the server, through
either the NTP or command ports. It does not include accesses over
the Unix domain command socket.
+
If the *-r* option is specified, *chronyd* will reset the counters of received
and dropped packets after reporting the current values.
The *-p* option specifies the minimum number of received NTP or command
packets needed to include a client in the list. The default value is 0, i.e.
all clients are reported. If the *-r* option is specified, *chronyd* will reset
the counters of received and dropped packets after reporting the current
values.
+
An example of the output is:
+