2.7. Monitoring NTP clients
Display the list of clients that accessed the chronyd Network Time Protocol (NTP) server. This information is useful for verifying which clients are actively synchronizing and checking their connection history.
Prerequisites
-
The
chronydservice is running. -
chronydis configured to allow NTP clients. For example, add theallowdirective to/etc/chrony.conf.
Procedure
Display a list of clients by using the
chronyc clientscommand:# chronyc clientsReview the command output:
Hostname NTP Drop Int IntL Last Cmd Drop Int Last ==================================================================================== client1.example.net 10 0 6 - 10s 0 0 6 12s client2.example.net 8 0 6 - 25s 0 0 6 28s desktop-192-0-2-100.example.net 3 6 - 9s 0 0 6 11sThe output fields include:
- Hostname: The hostname or IP address of the client.
- NTP: The number of NTP packets received from the client.
-
Drop: The number of packets dropped by
chronyd, typically due to rate-limiting. - Int: The client’s polling interval in seconds (as a log base 2 value, e.g., 6 = $2^6$ = 64s).
-
IntL: The average inter-poll interval (in seconds) for the client when rate limiting is active. This field shows
'-'if rate limiting is not currently active for the client. - Last: The elapsed time since the last NTP packet was received from this client. Use this value to determine which clients are synchronized or recently synchronized.
Cmd: The number of
chronyc(monitoring) command packets received from the client.注意If you have a number of clients and the command is slow to return, it might be due to performing DNS lookups. Use the
-noption to disable hostname resolution and display IP addresses instead:+
# chronyc -n clients重要By default,
chronydmonitors up to 4,096 clients. If you have more clients than this, you can increase the memory limit withclientloglimitin/etc/chrony.conffile. For example:clientloglimit 10000000