1CHRONYC(1)                        User manual                       CHRONYC(1)
2
3
4

NAME

6       chronyc - command-line interface for chrony daemon
7

SYNOPSIS

9       chronyc [OPTION]... [COMMAND]...
10

DESCRIPTION

12       chronyc is a command-line interface program which can be used to
13       monitor chronyd’s performance and to change various operating
14       parameters whilst it is running.
15
16       If no commands are specified on the command line, chronyc will expect
17       input from the user. The prompt chronyc> will be displayed when it is
18       being run from a terminal. If chronyc’s input or output are redirected
19       from or to a file, the prompt is not shown.
20
21       There are two ways chronyc can access chronyd. One is the Internet
22       Protocol (IPv4 or IPv6) and the other is a Unix domain socket, which is
23       accessible locally by the root or chrony user. By default, chronyc
24       first tries to connect to the Unix domain socket. The compiled-in
25       default path is /var/run/chrony/chronyd.sock. If that fails (e.g.
26       because chronyc is running under a non-root user), it will try to
27       connect to 127.0.0.1 and then ::1.
28
29       Only the following monitoring commands, which do not affect the
30       behaviour of chronyd, are allowed from the network: activity, manual
31       list, rtcdata, smoothing, sources, sourcestats, tracking, waitsync. The
32       set of hosts from which chronyd will accept these commands can be
33       configured with the cmdallow directive in the chronyd’s configuration
34       file or the cmdallow command in chronyc. By default, the commands are
35       accepted only from localhost (127.0.0.1 or ::1).
36
37       All other commands are allowed only through the Unix domain socket.
38       When sent over the network, chronyd will respond with a ‘Not
39       authorised’ error, even if it is from localhost. In chrony versions
40       before 2.2 they were allowed from the network if they were
41       authenticated with a password, but that is no longer supported.
42
43       Having full access to chronyd via chronyc is more or less equivalent to
44       being able to modify the chronyd’s configuration file and restart it.
45

OPTIONS

47       -4
48           With this option hostnames will be resolved only to IPv4 addresses.
49
50       -6
51           With this option hostnames will be resolved only to IPv6 addresses.
52
53       -n
54           This option disables resolving of IP addresses to hostnames, e.g.
55           to avoid slow DNS lookups. Long addresses will not be truncated to
56           fit into the column.
57
58       -c
59           This option enables printing of reports in a comma-separated values
60           (CSV) format. IP addresses will not be resolved to hostnames, time
61           will be printed as number of seconds since the epoch and values in
62           seconds will not be converted to other units.
63
64       -d
65           This option enables printing of debugging messages if chronyc was
66           compiled with debugging support.
67
68       -m
69           Normally, all arguments on the command line are interpreted as one
70           command. With this option multiple commands can be specified. Each
71           argument will be interpreted as a whole command.
72
73       -h host
74           This option allows the user to specify which host (or
75           comma-separated list of addresses) running the chronyd program is
76           to be contacted. This allows for remote monitoring, without having
77           to connect over SSH to the other host first.
78
79           The default is to contact chronyd running on the same host where
80           chronyc is being run.
81
82       -p port
83           This option allows the user to specify the UDP port number which
84           the target chronyd is using for its monitoring connections. This
85           defaults to 323; there would rarely be a need to change this.
86
87       -f file
88           This option is ignored and is provided only for compatibility.
89
90       -a
91           This option is ignored and is provided only for compatibility.
92
93       -v
94           With this option chronyc displays its version number on the
95           terminal and exits.
96

COMMANDS

98       This section describes each of the commands available within the
99       chronyc program.
100
101   System clock
102       tracking
103           The tracking command displays parameters about the system’s clock
104           performance. An example of the output is shown below.
105
106               Reference ID    : CB00710F (foo.example.net)
107               Stratum         : 3
108               Ref time (UTC)  : Fri Jan 27 09:49:17 2017
109               System time     : 0.000006523 seconds slow of NTP time
110               Last offset     : -0.000006747 seconds
111               RMS offset      : 0.000035822 seconds
112               Frequency       : 3.225 ppm slow
113               Residual freq   : -0.000 ppm
114               Skew            : 0.129 ppm
115               Root delay      : 0.013639022 seconds
116               Root dispersion : 0.001100737 seconds
117               Update interval : 64.2 seconds
118               Leap status     : Normal
119
120           The fields are explained as follows:
121
122           Reference ID
123               This is the reference ID and name (or IP address) of the server
124               to which the computer is currently synchronised. For IPv4
125               addresses, the reference ID is equal to the address and for
126               IPv6 addresses it is the first 32 bits of the MD5 sum of the
127               address.
128
129               If the reference ID is 7F7F0101 and there is no name or IP
130               address, it means the computer is not synchronised to any
131               external source and that you have the local mode operating (via
132               the local command in chronyc, or the local directive in the
133               configuration file).
134
135               The reference ID is printed as a hexadecimal number. Note that
136               in older versions it used to be printed in quad-dotted notation
137               and could be confused with an IPv4 address.
138
139           Stratum
140               The stratum indicates how many hops away from a computer with
141               an attached reference clock we are. Such a computer is a
142               stratum-1 computer, so the computer in the example is two hops
143               away (i.e. foo.example.net is a stratum-2 and is synchronised
144               from a stratum-1).
145
146           Ref time
147               This is the time (UTC) at which the last measurement from the
148               reference source was processed.
149
150           System time
151               In normal operation, chronyd by default never steps the system
152               clock, because any jump in the time can have adverse
153               consequences for certain application programs. Instead, any
154               error in the system clock is corrected by slightly speeding up
155               or slowing down the system clock until the error has been
156               removed, and then returning to the system clock’s normal speed.
157               A consequence of this is that there will be a period when the
158               system clock (as read by other programs) will be different from
159               chronyd’s estimate of the current true time (which it reports
160               to NTP clients when it is operating in server mode). The value
161               reported on this line is the difference due to this effect.
162
163           Last offset
164               This is the estimated local offset on the last clock update.
165
166           RMS offset
167               This is a long-term average of the offset value.
168
169           Frequency
170               The ‘frequency’ is the rate by which the system’s clock would
171               be wrong if chronyd was not correcting it. It is expressed in
172               ppm (parts per million). For example, a value of 1 ppm would
173               mean that when the system’s clock thinks it has advanced 1
174               second, it has actually advanced by 1.000001 seconds relative
175               to true time.
176
177           Residual freq
178               This shows the ‘residual frequency’ for the currently selected
179               reference source. This reflects any difference between what the
180               measurements from the reference source indicate the frequency
181               should be and the frequency currently being used.
182
183               The reason this is not always zero is that a smoothing
184               procedure is applied to the frequency. Each time a measurement
185               from the reference source is obtained and a new residual
186               frequency computed, the estimated accuracy of this residual is
187               compared with the estimated accuracy (see ‘skew’ next) of the
188               existing frequency value. A weighted average is computed for
189               the new frequency, with weights depending on these accuracies.
190               If the measurements from the reference source follow a
191               consistent trend, the residual will be driven to zero over
192               time.
193
194           Skew
195               This is the estimated error bound on the frequency.
196
197           Root delay
198               This is the total of the network path delays to the stratum-1
199               computer from which the computer is ultimately synchronised.
200
201           Root dispersion
202               This is the total dispersion accumulated through all the
203               computers back to the stratum-1 computer from which the
204               computer is ultimately synchronised. Dispersion is due to
205               system clock resolution, statistical measurement variations,
206               etc.
207
208               An absolute bound on the computer’s clock accuracy (assuming
209               the stratum-1 computer is correct) is given by:
210
211                   clock_error <= |system_time_offset| + root_dispersion + (0.5 * root_delay)
212
213           Update interval
214               This is the interval between the last two clock updates.
215
216           Leap status
217               This is the leap status, which can be Normal, Insert second,
218               Delete second or Not synchronised.
219
220       makestep, makestep threshold limit
221           Normally chronyd will cause the system to gradually correct any
222           time offset, by slowing down or speeding up the clock as required.
223           In certain situations, the system clock might be so far adrift that
224           this slewing process would take a very long time to correct the
225           system clock.
226
227           The makestep command can be used in this situation. There are two
228           forms of the command. The first form has no parameters. It tells
229           chronyd to cancel any remaining correction that was being slewed
230           and jump the system clock by the equivalent amount, making it
231           correct immediately.
232
233           The second form configures the automatic stepping, similarly to the
234           makestep directive. It has two parameters, stepping threshold (in
235           seconds) and number of future clock updates for which the threshold
236           will be active. This can be used with the burst command to quickly
237           make a new measurement and correct the clock by stepping if needed,
238           without waiting for chronyd to complete the measurement and update
239           the clock.
240
241               makestep 0.1 1
242               burst 1/2
243
244           BE WARNED: Certain software will be seriously affected by such
245           jumps in the system time. (That is the reason why chronyd uses
246           slewing normally.)
247
248       maxupdateskew skew-in-ppm
249           This command has the same effect as the maxupdateskew directive in
250           the configuration file.
251
252       waitsync [max-tries [max-correction [max-skew [interval]]]]
253           The waitsync command waits for chronyd to synchronise.
254
255           Up to four optional arguments can be specified. The first is the
256           maximum number of tries before giving up and returning a non-zero
257           error code. When 0 is specified, or there are no arguments, the
258           number of tries will not be limited.
259
260           The second and third arguments are the maximum allowed remaining
261           correction of the system clock and the maximum allowed skew (in
262           ppm) as reported by the tracking command in the System time and
263           Skew fields. If not specified or zero, the value will not be
264           checked.
265
266           The fourth argument is the interval specified in seconds in which
267           the check is repeated. The interval is 10 seconds by default.
268
269           An example is:
270
271               waitsync 60 0.01
272
273           which will wait up to about 10 minutes (60 times 10 seconds) for
274           chronyd to synchronise to a source and the remaining correction to
275           be less than 10 milliseconds.
276
277   Time sources
278       sources [-v]
279           This command displays information about the current time sources
280           that chronyd is accessing.
281
282           The optional argument -v can be specified, meaning verbose. In this
283           case, extra caption lines are shown as a reminder of the meanings
284           of the columns.
285
286               210 Number of sources = 3
287               MS Name/IP address         Stratum Poll Reach LastRx Last sample
288               ===============================================================================
289               #* GPS0                          0   4   377    11   -479ns[ -621ns] +/-  134ns
290               ^? foo.example.net               2   6   377    23   -923us[ -924us] +/-   43ms
291               ^+ bar.example.net               1   6   377    21  -2629us[-2619us] +/-   86ms
292
293           The columns are as follows:
294
295           M
296               This indicates the mode of the source. ^ means a server, =
297               means a peer and # indicates a locally connected reference
298               clock.
299
300           S
301               This column indicates the state of the source.
302
303               ·   * indicates the source to which chronyd is currently
304                   synchronised.
305
306               ·   + indicates acceptable sources which are combined with the
307                   selected source.
308
309               ·   - indicates acceptable sources which are excluded by the
310                   combining algorithm.
311
312               ·   ? indicates sources to which connectivity has been lost or
313                   whose packets do not pass all tests. It is also shown at
314                   start-up, until at least 3 samples have been gathered from
315                   it.
316
317               ·   x indicates a clock which chronyd thinks is a falseticker
318                   (i.e. its time is inconsistent with a majority of other
319                   sources).
320
321               ·   ~ indicates a source whose time appears to have too much
322                   variability.
323
324           Name/IP address
325               This shows the name or the IP address of the source, or
326               reference ID for reference clocks.
327
328           Stratum
329               This shows the stratum of the source, as reported in its most
330               recently received sample. Stratum 1 indicates a computer with a
331               locally attached reference clock. A computer that is
332               synchronised to a stratum 1 computer is at stratum 2. A
333               computer that is synchronised to a stratum 2 computer is at
334               stratum 3, and so on.
335
336           Poll
337               This shows the rate at which the source is being polled, as a
338               base-2 logarithm of the interval in seconds. Thus, a value of 6
339               would indicate that a measurement is being made every 64
340               seconds. chronyd automatically varies the polling rate in
341               response to prevailing conditions.
342
343           Reach
344               This shows the source’s reachability register printed as an
345               octal number. The register has 8 bits and is updated on every
346               received or missed packet from the source. A value of 377
347               indicates that a valid reply was received for all from the last
348               eight transmissions.
349
350           LastRx
351               This column shows how long ago the last sample was received
352               from the source. This is normally in seconds. The letters m, h,
353               d or y indicate minutes, hours, days, or years.
354
355           Last sample
356               This column shows the offset between the local clock and the
357               source at the last measurement. The number in the square
358               brackets shows the actual measured offset. This can be suffixed
359               by ns (indicating nanoseconds), us (indicating microseconds),
360               ms (indicating milliseconds), or s (indicating seconds). The
361               number to the left of the square brackets shows the original
362               measurement, adjusted to allow for any slews applied to the
363               local clock since. The number following the +/- indicator shows
364               the margin of error in the measurement. Positive offsets
365               indicate that the local clock is ahead of the source.
366
367       sourcestats [-v]
368           The sourcestats command displays information about the drift rate
369           and offset estimation process for each of the sources currently
370           being examined by chronyd.
371
372           The optional argument -v can be specified, meaning verbose. In this
373           case, extra caption lines are shown as a reminder of the meanings
374           of the columns.
375
376           An example report is:
377
378               210 Number of sources = 1
379               Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
380               ===============================================================================
381               foo.example.net            11   5   46m     -0.001      0.045      1us    25us
382
383           The columns are as follows:
384
385           Name/IP Address
386               This is the name or IP address of the NTP server (or peer) or
387               reference ID of the reference clock to which the rest of the
388               line relates.
389
390           NP
391               This is the number of sample points currently being retained
392               for the server. The drift rate and current offset are estimated
393               by performing a linear regression through these points.
394
395           NR
396               This is the number of runs of residuals having the same sign
397               following the last regression. If this number starts to become
398               too small relative to the number of samples, it indicates that
399               a straight line is no longer a good fit to the data. If the
400               number of runs is too low, chronyd discards older samples and
401               re-runs the regression until the number of runs becomes
402               acceptable.
403
404           Span
405               This is the interval between the oldest and newest samples. If
406               no unit is shown the value is in seconds. In the example, the
407               interval is 46 minutes.
408
409           Frequency
410               This is the estimated residual frequency for the server, in
411               parts per million. In this case, the computer’s clock is
412               estimated to be running 1 part in 10^9 slow relative to the
413               server.
414
415           Freq Skew
416               This is the estimated error bounds on Freq (again in parts per
417               million).
418
419           Offset
420               This is the estimated offset of the source.
421
422           Std Dev
423               This is the estimated sample standard deviation.
424
425       reselect
426           To avoid excessive switching between sources, chronyd can stay
427           synchronised to a source even when it is not currently the best one
428           among the available sources.
429
430           The reselect command can be used to force chronyd to reselect the
431           best synchronisation source.
432
433       reselectdist distance
434           The reselectdist command sets the reselection distance. It is
435           equivalent to the reselectdist directive in the configuration file.
436
437   NTP sources
438       activity
439           This command reports the number of servers and peers that are
440           online and offline. If the auto_offline option is used in
441           specifying some of the servers or peers, the activity command can
442           be useful for detecting when all of them have entered the offline
443           state after the network link has been disconnected.
444
445           The report shows the number of servers and peers in 5 states:
446
447           online
448               the server or peer is currently online (i.e. assumed by chronyd
449               to be reachable)
450
451           offline
452               the server or peer is currently offline (i.e. assumed by
453               chronyd to be unreachable, and no measurements from it will be
454               attempted.)
455
456           burst_online
457               a burst command has been initiated for the server or peer and
458               is being performed; after the burst is complete, the server or
459               peer will be returned to the online state.
460
461           burst_offline
462               a burst command has been initiated for the server or peer and
463               is being performed; after the burst is complete, the server or
464               peer will be returned to the offline state.
465
466           unresolved
467               the name of the server or peer was not resolved to an address
468               yet; this source is not visible in the sources and sourcestats
469               reports.
470
471       ntpdata [address]
472           The ntpdata command displays the last valid measurement and other
473           NTP-specific information about the specified NTP source, or all NTP
474           sources if no address was specified. An example of the output is
475           shown below.
476
477               Remote address  : 203.0.113.15 (CB00710F)
478               Remote port     : 123
479               Local address   : 203.0.113.74 (CB00714A)
480               Leap status     : Normal
481               Version         : 4
482               Mode            : Server
483               Stratum         : 1
484               Poll interval   : 10 (1024 seconds)
485               Precision       : -24 (0.000000060 seconds)
486               Root delay      : 0.000015 seconds
487               Root dispersion : 0.000015 seconds
488               Reference ID    : 47505300 (GPS)
489               Reference time  : Fri Nov 25 15:22:12 2016
490               Offset          : -0.000060878 seconds
491               Peer delay      : 0.000175634 seconds
492               Peer dispersion : 0.000000681 seconds
493               Response time   : 0.000053050 seconds
494               Jitter asymmetry: +0.00
495               NTP tests       : 111 111 1111
496               Interleaved     : No
497               Authenticated   : No
498               TX timestamping : Kernel
499               RX timestamping : Kernel
500               Total TX        : 24
501               Total RX        : 24
502               Total valid RX  : 24
503
504           The fields are explained as follows:
505
506           Remote address
507               The IP address of the NTP server or peer, and the corresponding
508               reference ID.
509
510           Remote port
511               The UDP port number to which the request was sent. The standard
512               NTP port is 123.
513
514           Local address
515               The local IP address which received the response, and the
516               corresponding reference ID.
517
518           Leap status, Version, Mode, Stratum, Poll interval, Precision, Root
519           delay, Root dispersion, Reference ID, Reference time
520               The NTP values from the last valid response.
521
522           Offset, Peer delay, Peer dispersion
523               The measured values.
524
525           Response time
526               The time the server or peer spent in processing of the request
527               and waiting before sending the response.
528
529           Jitter asymmetry
530               The estimated asymmetry of network jitter on the path to the
531               source. The asymmetry can be between -0.5 and 0.5. A negative
532               value means the delay of packets sent to the source is more
533               variable than the delay of packets sent from the source back.
534
535           NTP tests
536               Results of RFC 5905 tests 1 through 3, 5 through 7, and tests
537               for maximum delay, delay ratio, delay dev ratio, and
538               synchronisation loop.
539
540           Interleaved
541               This shows if the response was in the interleaved mode.
542
543           Authenticated
544               This shows if the response was authenticated.
545
546           TX timestamping
547               The source of the local transmit timestamp. Valid values are
548               Daemon, Kernel, and Hardware.
549
550           RX timestamping
551               The source of the local receive timestamp.
552
553           Total TX
554               The number of packets sent to the source.
555
556           Total RX
557               The number of all packets received from the source.
558
559           Total valid RX
560               The number of valid packets received from the source.
561
562       add peer address [option]...
563           The add peer command allows a new NTP peer to be added whilst
564           chronyd is running.
565
566           Following the words add peer, the syntax of the following
567           parameters and options is similar to that for the peer directive in
568           the configuration file. The following peer options can be set in
569           the command: port, minpoll, maxpoll, presend, maxdelayratio,
570           maxdelay, key.
571
572           An example of using this command is shown below.
573
574               add peer foo.example.net minpoll 6 maxpoll 10 key 25
575
576       add server address [option]...
577           The add server command allows a new NTP server to be added whilst
578           chronyd is running.
579
580           Following the words add server, the syntax of the following
581           parameters and options is similar to that for the server directive
582           in the configuration file. The following server options can be set
583           in the command: port, minpoll, maxpoll, presend, maxdelayratio,
584           maxdelay, key.
585
586           An example of using this command is shown below:
587
588               add server foo.example.net minpoll 6 maxpoll 10 key 25
589
590       delete address
591           The delete command allows an NTP server or peer to be removed from
592           the current set of sources.
593
594       burst good/max [mask/masked-address], burst good/max
595       [masked-address/masked-bits], burst good/max [address]
596           The burst command tells chronyd to make a set of measurements to
597           each of its NTP sources over a short duration (rather than the
598           usual periodic measurements that it makes). After such a burst,
599           chronyd will revert to the previous state for each source. This
600           might be either online, if the source was being periodically
601           measured in the normal way, or offline, if the source had been
602           indicated as being offline. (A source can be switched between the
603           online and offline states with the online and offline commands.)
604
605           The mask and masked-address arguments are optional, in which case
606           chronyd will initiate a burst for all of its currently defined
607           sources.
608
609           The arguments have the following meaning and format:
610
611           good
612               This defines the number of good measurements that chronyd will
613               want to obtain from each source. A measurement is good if it
614               passes certain tests, for example, the round trip time to the
615               source must be acceptable. (This allows chronyd to reject
616               measurements that are likely to be bogus.)
617
618           max
619               This defines the maximum number of measurements that chronyd
620               will attempt to make, even if the required number of good
621               measurements has not been obtained.
622
623           mask
624               This is an IP address with which the IP address of each of
625               chronyd’s sources is to be masked.
626
627           masked-address
628               This is an IP address. If the masked IP address of a source
629               matches this value then the burst command is applied to that
630               source.
631
632           masked-bits
633               This can be used with masked-address for CIDR notation, which
634               is a shorter alternative to the form with mask.
635
636           address
637               This is an IP address or a hostname. The burst command is
638               applied only to that source.
639
640
641
642           If no mask or masked-address arguments are provided, every source
643           will be matched.
644
645           An example of the two-argument form of the command is:
646
647               burst 2/10
648
649           This will cause chronyd to attempt to get two good measurements
650           from each source, stopping after two have been obtained, but in no
651           event will it try more than ten probes to the source.
652
653           Examples of the four-argument form of the command are:
654
655               burst 2/10 255.255.0.0/1.2.0.0
656               burst 2/10 2001:db8:789a::/48
657
658           In the first case, the two out of ten sampling will only be applied
659           to sources whose IPv4 addresses are of the form 1.2.x.y, where x
660           and y are arbitrary. In the second case, the sampling will be
661           applied to sources whose IPv6 addresses have first 48 bits equal to
662           2001:db8:789a.
663
664           Example of the three-argument form of the command is:
665
666               burst 2/10 foo.example.net
667
668       maxdelay address delay
669           This allows the maxdelay option for one of the sources to be
670           modified, in the same way as specifying the maxdelay option for the
671           server directive in the configuration file.
672
673       maxdelaydevratio address ratio
674           This allows the maxdelaydevratio option for one of the sources to
675           be modified, in the same way as specifying the maxdelaydevratio
676           option for the server directive in the configuration file.
677
678       maxdelayratio address ratio
679           This allows the maxdelayratio option for one of the sources to be
680           modified, in the same way as specifying the maxdelayratio option
681           for the server directive in the configuration file.
682
683       maxpoll address maxpoll
684           The maxpoll command is used to modify the maximum polling interval
685           for one of the current set of sources. It is equivalent to the
686           maxpoll option in the server directive in the configuration file.
687
688           Note that the new maximum polling interval only takes effect after
689           the next measurement has been made.
690
691       minpoll address minpoll
692           The minpoll command is used to modify the minimum polling interval
693           for one of the current set of sources. It is equivalent to the
694           minpoll option in the server directive in the configuration file.
695
696           Note that the new minimum polling interval only takes effect after
697           the next measurement has been made.
698
699       minstratum address minstratum
700           The minstratum command is used to modify the minimum stratum for
701           one of the current set of sources. It is equivalent to the
702           minstratum option in the server directive in the configuration
703           file.
704
705       offline [address], offline [masked-address/masked-bits], offline
706       [mask/masked-address]
707           The offline command is used to warn chronyd that the network
708           connection to a particular host or hosts is about to be lost, e.g.
709           on computers with intermittent connection to their time sources.
710
711           Another case where offline could be used is where a computer serves
712           time to a local group of computers, and has a permanent connection
713           to true time servers outside the organisation. However, the
714           external connection is heavily loaded at certain times of the day
715           and the measurements obtained are less reliable at those times. In
716           this case, it is probably most useful to determine the gain or loss
717           rate during the quiet periods and let the whole network coast
718           through the loaded periods. The offline and online commands can be
719           used to achieve this.
720
721           There are four forms of the offline command. The first form is a
722           wildcard, meaning all sources. The second form allows an IP address
723           mask and a masked address to be specified. The third form uses CIDR
724           notation. The fourth form uses an IP address or a hostname. These
725           forms are illustrated below.
726
727               offline
728               offline 255.255.255.0/1.2.3.0
729               offline 2001:db8:789a::/48
730               offline foo.example.net
731
732           The second form means that the offline command is to be applied to
733           any source whose IPv4 address is in the 1.2.3 subnet. (The host’s
734           address is logically and-ed with the mask, and if the result
735           matches the masked-address the host is processed.) The third form
736           means that the command is to be applied to all sources whose IPv6
737           addresses have their first 48 bits equal to 2001:db8:789a. The
738           fourth form means that the command is to be applied only to that
739           one source.
740
741           The wildcard form of the address is equivalent to:
742
743               offline 0.0.0.0/0.0.0.0
744               offline ::/0
745
746       online [address], online [masked-address/masked-bits], online
747       [mask/masked-address]
748           The online command is opposite in function to the offline command.
749           It is used to advise chronyd that network connectivity to a
750           particular source or sources has been restored.
751
752           The syntax is identical to that of the offline command.
753
754       polltarget address polltarget
755           The polltarget command is used to modify the poll target for one of
756           the current set of sources. It is equivalent to the polltarget
757           option in the server directive in the configuration file.
758
759       refresh
760           The refresh command can be used to force chronyd to resolve the
761           names of configured sources to IP addresses again, e.g. after
762           suspending and resuming the machine in a different network.
763
764           Sources that stop responding will be replaced with newly resolved
765           addresses automatically after 8 polling intervals, but this command
766           can still be useful to replace them immediately and not wait until
767           they are marked as unreachable.
768
769   Manual time input
770       manual on, manual off, manual delete index, manual list, manual reset
771           The manual command enables and disables use of the settime command,
772           and is used to modify the behaviour of the manual clock driver.
773
774           The on form of the command enables use of the settime command.
775
776           The off form of the command disables use of the settime command.
777
778           The list form of the command lists all the samples currently stored
779           in chronyd. The output is illustrated below.
780
781               210 n_samples = 1
782               #    Date  Time(UTC)    Slewed   Original   Residual
783               ====================================================
784                0 27Jan99 22:09:20       0.00       0.97       0.00
785
786           The columns are as as follows:
787
788            1. The sample index (used for the manual delete command).
789
790            2. The date and time of the sample.
791
792            3. The system clock error when the timestamp was entered, adjusted
793               to allow for changes made to the system clock since.
794
795            4. The system clock error when the timestamp was entered, as it
796               originally was (without allowing for changes to the system
797               clock since).
798
799            5. The regression residual at this point, in seconds. This allows
800               ‘outliers’ to be easily spotted, so that they can be deleted
801               using the manual delete command.
802
803
804
805           The delete form of the command deletes a single sample. The
806           parameter is the index of the sample, as shown in the first column
807           of the output from manual list. Following deletion of the data
808           point, the current error and drift rate are re-estimated from the
809           remaining data points and the system clock trimmed if necessary.
810           This option is intended to allow ‘outliers’ to be discarded, i.e.
811           samples where the administrator realises they have entered a very
812           poor timestamp.
813
814           The reset form of the command deletes all samples at once. The
815           system clock is left running as it was before the command was
816           entered.
817
818       settime time
819           The settime command allows the current time to be entered manually,
820           if this option has been configured into chronyd. (It can be
821           configured either with the manual directive in the configuration
822           file, or with the manual command of chronyc.)
823
824           It should be noted that the computer’s sense of time will only be
825           as accurate as the reference you use for providing this input (e.g.
826           your watch), as well as how well you can time the press of the
827           return key.
828
829           Providing your computer’s time zone is set up properly, you will be
830           able to enter a local time (rather than UTC).
831
832           The response to a successful settime command indicates the amount
833           that the computer’s clock was wrong. It should be apparent from
834           this if you have entered the time wrongly, e.g. with the wrong time
835           zone.
836
837           The rate of drift of the system clock is estimated by a regression
838           process using the entered measurement and all previous measurements
839           entered during the present run of chronyd. However, the entered
840           measurement is used for adjusting the current clock offset (rather
841           than the estimated intercept from the regression, which is
842           ignored). Contrast what happens with the manual delete command,
843           where the intercept is used to set the current offset (since there
844           is no measurement that has just been entered in that case).
845
846           The time is parsed by the public domain getdate algorithm.
847           Consequently, you can only specify time to the nearest second.
848
849           Examples of inputs that are valid are shown below:
850
851               settime 16:30
852               settime 16:30:05
853               settime Nov 21, 2015 16:30:05
854
855           For a full description of getdate, see the getdate documentation
856           (bundled, for example, with the source for GNU tar).
857
858   NTP access
859       accheck address
860           This command allows you to check whether client NTP access is
861           allowed from a particular host.
862
863           Examples of use, showing a named host and a numeric IP address, are
864           as follows:
865
866               accheck foo.example.net
867               accheck 1.2.3.4
868               accheck 2001:db8::1
869
870           This command can be used to examine the effect of a series of
871           allow, allow all, deny, and deny all commands specified either via
872           chronyc, or in chronyd’s configuration file.
873
874       clients
875           This command shows a list of clients that have accessed the server,
876           through either the NTP or command ports. It does not include
877           accesses over the Unix domain command socket. There are no
878           arguments.
879
880           An example of the output is:
881
882               Hostname                      NTP   Drop Int IntL Last     Cmd   Drop Int  Last
883               ===============================================================================
884               localhost                       2      0   2   -   133      15      0  -1     7
885               foo.example.net                12      0   6   -    23       0      0   -     -
886
887           Each row shows the data for a single host. Only hosts that have
888           passed the host access checks (set with the allow, deny, cmdallow
889           and cmddeny commands or configuration file directives) are logged.
890           The intervals are displayed as a power of 2 in seconds.
891
892           The columns are as follows:
893
894            1. The hostname of the client.
895
896            2. The number of NTP packets received from the client.
897
898            3. The number of NTP packets dropped to limit the response rate.
899
900            4. The average interval between NTP packets.
901
902            5. The average interval between NTP packets after limiting the
903               response rate.
904
905            6. Time since the last NTP packet was received
906
907            7. The number of command packets received from the client.
908
909            8. The number of command packets dropped to limit the response
910               rate.
911
912            9. The average interval between command packets.
913
914            10. Time since the last command packet was received.
915
916       serverstats
917           The serverstats command displays how many valid NTP and command
918           requests chronyd as a server received from clients, how many of
919           them were dropped to limit the response rate as configured by the
920           ratelimit and cmdratelimit directives, and how many client log
921           records were dropped due to the memory limit configured by the
922           clientloglimit directive. An example of the output is shown below.
923
924               NTP packets received       : 1598
925               NTP packets dropped        : 8
926               Command packets received   : 19
927               Command packets dropped    : 0
928               Client log records dropped : 0
929
930       allow [all] [subnet]
931           The effect of the allow command is identical to the allow directive
932           in the configuration file.
933
934           The syntax is illustrated in the following examples:
935
936               allow foo.example.net
937               allow all 1.2
938               allow 3.4.5
939               allow 6.7.8/22
940               allow 6.7.8.9/22
941               allow 2001:db8:789a::/48
942               allow 0/0
943               allow ::/0
944               allow
945               allow all
946
947       deny [all] [subnet]
948           The effect of the allow command is identical to the deny directive
949           in the configuration file.
950
951           The syntax is illustrated in the following examples:
952
953               deny foo.example.net
954               deny all 1.2
955               deny 3.4.5
956               deny 6.7.8/22
957               deny 6.7.8.9/22
958               deny 2001:db8:789a::/48
959               deny 0/0
960               deny ::/0
961               deny
962               deny all
963
964       local [option]..., local off
965           The local command allows chronyd to be told that it is to appear as
966           a reference source, even if it is not itself properly synchronised
967           to an external source. (This can be used on isolated networks, to
968           allow one computer to be a master time server with the other
969           computers slaving to it.)
970
971           The first form enables the local reference mode on the host. The
972           syntax is identical to the local directive in the configuration
973           file.
974
975           The second form disables the local reference mode.
976
977       smoothing
978           The smoothing command displays the current state of the NTP server
979           time smoothing, which can be enabled with the smoothtime directive.
980           An example of the output is shown below.
981
982               Active         : Yes
983               Offset         : +1.000268817 seconds
984               Frequency      : -0.142859 ppm
985               Wander         : -0.010000 ppm per second
986               Last update    : 17.8 seconds ago
987               Remaining time : 19988.4 seconds
988
989           The fields are explained as follows:
990
991           Active
992               This shows if the server time smoothing is currently active.
993               Possible values are Yes and No. If the leaponly option is
994               included in the smoothtime directive, (leap second only) will
995               be shown on the line.
996
997           Offset
998               This is the current offset applied to the time sent to NTP
999               clients. Positive value means the clients are getting time
1000               that’s ahead of true time.
1001
1002           Frequency
1003               The current frequency offset of the served time. Negative value
1004               means the time observed by clients is running slower than true
1005               time.
1006
1007           Wander
1008               The current frequency wander of the served time. Negative value
1009               means the time observed by clients is slowing down.
1010
1011           Last update
1012               This field shows how long ago the time smoothing process was
1013               updated, e.g. chronyd accumulated a new measurement.
1014
1015           Remaining time
1016               The time it would take for the smoothing process to get to zero
1017               offset and frequency if there were no more updates.
1018
1019       smoothtime activate, smoothtime reset
1020           The smoothtime command can be used to activate or reset the server
1021           time smoothing process if it is configured with the smoothtime
1022           directive.
1023
1024   Monitoring access
1025       cmdaccheck address
1026           This command is similar to the accheck command, except that it is
1027           used to check whether monitoring access is permitted from a named
1028           host.
1029
1030           Examples of use are as follows:
1031
1032               cmdaccheck foo.example.net
1033               cmdaccheck 1.2.3.4
1034               cmdaccheck 2001:db8::1
1035
1036       cmdallow [all] [subnet]
1037           This is similar to the allow command, except that it is used to
1038           allow particular hosts or subnets to use chronyc to monitor with
1039           chronyd on the current host.
1040
1041       cmddeny [all] [subnet]
1042           This is similar to the deny command, except that it is used to
1043           allow particular hosts or subnets to use chronyc to monitor chronyd
1044           on the current host.
1045
1046   Real-time clock (RTC)
1047       rtcdata
1048           The rtcdata command displays the current RTC parameters.
1049
1050           An example output is shown below.
1051
1052               RTC ref time (GMT) : Sat May 30 07:25:56 2015
1053               Number of samples  : 10
1054               Number of runs     : 5
1055               Sample span period :  549
1056               RTC is fast by     :    -1.632736 seconds
1057               RTC gains time at  :  -107.623 ppm
1058
1059           The fields have the following meaning:
1060
1061           RTC ref time (GMT)
1062               This is the RTC reading the last time its error was measured.
1063
1064           Number of samples
1065               This is the number of previous measurements being used to
1066               determine the RTC gain or loss rate.
1067
1068           Number of runs
1069               This is the number of runs of residuals of the same sign
1070               following the regression fit for (RTC error) versus (RTC time).
1071               A value which is small indicates that the measurements are not
1072               well approximated by a linear model, and that the algorithm
1073               will tend to delete the older measurements to improve the fit.
1074
1075           Sample span period
1076               This is the period that the measurements span (from the oldest
1077               to the newest). Without a unit the value is in seconds;
1078               suffixes m for minutes, h for hours, d for days or y for years
1079               can be used.
1080
1081           RTC is fast by
1082               This is the estimate of how many seconds fast the RTC when it
1083               thought the time was at the reference time (above). If this
1084               value is large, you might (or might not) want to use the
1085               trimrtc command to bring the RTC into line with the system
1086               clock. (Note, a large error will not affect chronyd’s
1087               operation, unless it becomes so big as to start causing
1088               rounding errors.)
1089
1090           RTC gains time at
1091               This is the amount of time gained (positive) or lost (negative)
1092               by the real time clock for each second that it ticks. It is
1093               measured in parts per million. So if the value shown was +1,
1094               suppose the RTC was exactly right when it crosses a particular
1095               second boundary. Then it would be 1 microsecond fast when it
1096               crosses its next second boundary.
1097
1098       trimrtc
1099           The trimrtc command is used to correct the system’s real-time clock
1100           (RTC) to the main system clock. It has no effect if the error
1101           between the two clocks is currently estimated at less than a
1102           second.
1103
1104           The command takes no arguments. It performs the following steps (if
1105           the RTC is more than 1 second away from the system clock):
1106
1107            1. Remember the currently estimated gain or loss rate of the RTC
1108               and flush the previous measurements.
1109
1110            2. Step the real-time clock to bring it within a second of the
1111               system clock.
1112
1113            3. Make several measurements to accurately determine the new
1114               offset between the RTC and the system clock (i.e. the remaining
1115               fraction of a second error).
1116
1117            4. Save the RTC parameters to the RTC file (specified with the
1118               rtcfile directive in the configuration file).
1119
1120
1121
1122           The last step is done as a precaution against the computer
1123           suffering a power failure before either the daemon exits or the
1124           writertc command is issued.
1125
1126           chronyd will still work perfectly well both whilst operating and
1127           across machine reboots even if the trimrtc command is never used
1128           (and the RTC is allowed to drift away from true time). The trimrtc
1129           command is provided as a method by which it can be corrected, in a
1130           manner compatible with chronyd using it to maintain accurate time
1131           across machine reboots.
1132
1133           The trimrtc command can be executed automatically by chronyd with
1134           the rtcautotrim directive in the configuration file.
1135
1136       writertc
1137           The writertc command writes the currently estimated error and gain
1138           or loss rate parameters for the RTC to the RTC file (specified with
1139           the rtcfile directive). This information is also written
1140           automatically when chronyd is killed (by the SIGHUP, SIGINT,
1141           SIGQUIT or SIGTERM signals) or when the trimrtc command is issued.
1142
1143   Other daemon commands
1144       cyclelogs
1145           The cyclelogs command causes all of chronyd’s open log files to be
1146           closed and re-opened. This allows them to be renamed so that they
1147           can be periodically purged. An example of how to do this is shown
1148           below.
1149
1150               # mv /var/log/chrony/measurements.log /var/log/chrony/measurements1.log
1151               # chronyc cyclelogs
1152               # ls -l /var/log/chrony
1153               -rw-r--r--   1 root     root            0 Jun  8 18:17 measurements.log
1154               -rw-r--r--   1 root     root        12345 Jun  8 18:17 measurements1.log
1155               # rm -f measurements1.log
1156
1157       dump
1158           The dump command causes chronyd to write its current history of
1159           measurements for each of its sources to dump files in the directory
1160           specified in the configuration file by the dumpdir directive. Note
1161           that chronyd does this automatically when it exits. This command is
1162           mainly useful for inspection of the history whilst chronyd is
1163           running.
1164
1165       rekey
1166           The rekey command causes chronyd to re-read the key file specified
1167           in the configuration file by the keyfile directive.
1168
1169   Client commands
1170       dns option
1171           The dns command configures how hostnames and IP addresses are
1172           resolved in chronyc. IP addresses can be resolved to hostnames when
1173           printing results of sources, sourcestats, tracking and clients
1174           commands. Hostnames are resolved in commands that take an address
1175           as argument.
1176
1177           There are five options:
1178
1179           dns -n
1180               Disables resolving IP addresses to hostnames. Raw IP addresses
1181               will be displayed.
1182
1183           dns +n
1184               Enables resolving IP addresses to hostnames. This is the
1185               default unless chronyc was started with -n option.
1186
1187           dns -4
1188               Resolves hostnames only to IPv4 addresses.
1189
1190           dns -6
1191               Resolves hostnames only to IPv6 addresses.
1192
1193           dns -46
1194               Resolves hostnames to both address families. This is the
1195               default behaviour unless chronyc was started with the -4 or -6
1196               option.
1197
1198       timeout timeout
1199           The timeout command sets the initial timeout for chronyc requests
1200           in milliseconds. If no response is received from chronyd, the
1201           timeout is doubled and the request is resent. The maximum number of
1202           retries is configured with the retries command.
1203
1204           By default, the timeout is 1000 milliseconds.
1205
1206       retries retries
1207           The retries command sets the maximum number of retries for chronyc
1208           requests before giving up. The response timeout is controlled by
1209           the timeout command.
1210
1211           The default is 2.
1212
1213       keygen [id [type [bits]]]
1214           The keygen command generates a key that can be added to the key
1215           file (specified with the keyfile directive) to allow NTP
1216           authentication between server and client, or peers. The key is
1217           generated from the /dev/urandom device and it is printed to
1218           standard output.
1219
1220           The command has three optional arguments. The first argument is the
1221           key number (by default 1), which will be specified with the key
1222           option of the server or peer directives in the configuration file.
1223           The second argument is the hash function (by default SHA1 or MD5 if
1224           SHA1 is not available) and the third argument is the number of bits
1225           the key should have, between 80 and 4096 bits (by default 160
1226           bits).
1227
1228           An example is:
1229
1230               keygen 73 SHA1 256
1231
1232           which generates a 256-bit SHA1 key with number 73. The printed line
1233           should then be securely transferred and added to the key files on
1234           both server and client, or peers.
1235
1236       exit, quit
1237           The exit and quit commands exit from chronyc and return the user to
1238           the shell.
1239
1240       help
1241           The help command displays a summary of the commands and their
1242           arguments.
1243

SEE ALSO

1245       chrony.conf(5), chronyd(8)
1246

BUGS

1248       For instructions on how to report bugs, please visit <https://
1249       chrony.tuxfamily.org/>.
1250

AUTHORS

1252       chrony was written by Richard Curnow, Miroslav Lichvar, and others.
1253
1254
1255
1256chrony 3.2                        2017-09-15                        CHRONYC(1)
Impressum