1CHRONYD(8) System Administration CHRONYD(8)
2
3
4
6 chronyd - chrony daemon
7
9 chronyd [OPTION]... [DIRECTIVE]...
10
12 chronyd is a daemon for synchronisation of the system clock. It can
13 synchronise the clock with NTP servers, reference clocks (e.g. a GPS
14 receiver), and manual input using wristwatch and keyboard via chronyc.
15 It can also operate as an NTPv4 (RFC 5905) server and peer to provide a
16 time service to other computers in the network.
17
18 If no configuration directives are specified on the command line,
19 chronyd will read them from a configuration file. The compiled-in
20 default location of the file is /etc/chrony.conf.
21
22 Informational messages, warnings, and errors will be logged to syslog.
23
25 -4
26 With this option hostnames will be resolved only to IPv4 addresses
27 and only IPv4 sockets will be created.
28
29 -6
30 With this option hostnames will be resolved only to IPv6 addresses
31 and only IPv6 sockets will be created.
32
33 -f file
34 This option can be used to specify an alternate location for the
35 configuration file. The compiled-in default value is
36 /etc/chrony.conf.
37
38 -n
39 When run in this mode, the program will not detach itself from the
40 terminal.
41
42 -d
43 When run in this mode, the program will not detach itself from the
44 terminal, and all messages will be written to the terminal instead
45 of syslog. If chronyd was compiled with enabled support for
46 debugging, this option can be used twice to enable debug messages.
47
48 -l file
49 This option enables writing of log messages to a file instead of
50 syslog or the terminal.
51
52 -L level
53 This option specifies the minimum severity level of messages to be
54 written to the log file, syslog, or terminal. The following levels
55 can be specified: 0 (informational), 1 (warning), 2 (non-fatal
56 error), and 3 (fatal error). The default value is 0.
57
58 -p
59 When run in this mode, chronyd will print the configuration and
60 exit. It will not detach from the terminal. This option can be used
61 to verify the syntax of the configuration and get the whole
62 configuration, even if it is split into multiple files and read by
63 the include or confdir directive.
64
65 -q
66 When run in this mode, chronyd will set the system clock once and
67 exit. It will not detach from the terminal.
68
69 -Q
70 This option is similar to the -q option, except it only prints the
71 offset without making any corrections of the clock and it allows
72 chronyd to be started without root privileges.
73
74 -r
75 This option will try to reload and then delete files containing
76 sample histories for each of the servers and reference clocks being
77 used. The files are expected to be in the directory specified by
78 the dumpdir directive in the configuration file. This option is
79 useful if you want to stop and restart chronyd briefly for any
80 reason, e.g. to install a new version. However, it should be used
81 only on systems where the kernel can maintain clock compensation
82 whilst not under chronyd’s control (i.e. Linux, FreeBSD, NetBSD,
83 Solaris, and macOS 10.13 or later).
84
85 -R
86 When this option is used, the initstepslew directive and the
87 makestep directive used with a positive limit will be ignored. This
88 option is useful when restarting chronyd and can be used in
89 conjunction with the -r option.
90
91 -s
92 This option will set the system clock from the computer’s real-time
93 clock (RTC) or to the last modification time of the file specified
94 by the driftfile directive. Real-time clocks are supported only on
95 Linux.
96
97 If used in conjunction with the -r flag, chronyd will attempt to
98 preserve the old samples after setting the system clock from the
99 RTC. This can be used to allow chronyd to perform long term
100 averaging of the gain or loss rate across system reboots, and is
101 useful for systems with intermittent access to network that are
102 shut down when not in use. For this to work well, it relies on
103 chronyd having been able to determine accurate statistics for the
104 difference between the RTC and system clock last time the computer
105 was on.
106
107 If the last modification time of the drift file is later than both
108 the current time and the RTC time, the system time will be set to
109 it to restore the time when chronyd was previously stopped. This is
110 useful on computers that have no RTC or the RTC is broken (e.g. it
111 has no battery).
112
113 -t timeout
114 This option sets a timeout (in seconds) after which chronyd will
115 exit. If the clock is not synchronised, it will exit with a
116 non-zero status. This is useful with the -q or -Q option to shorten
117 the maximum time waiting for measurements, or with the -r option to
118 limit the time when chronyd is running, but still allow it to
119 adjust the frequency of the system clock.
120
121 -u user
122 This option sets the name of the system user to which chronyd will
123 switch after start in order to drop root privileges. It overrides
124 the user directive. The compiled-in default value is chrony.
125
126 On Linux, chronyd needs to be compiled with support for the libcap
127 library. On macOS, FreeBSD, NetBSD and Solaris chronyd forks into
128 two processes. The child process retains root privileges, but can
129 only perform a very limited range of privileged system calls on
130 behalf of the parent.
131
132 -U
133 This option disables a check for root privileges to allow chronyd
134 to be started under a non-root user, assuming the process will have
135 all capabilities (e.g. provided by the service manager) and access
136 to all files, directories, and devices, needed to operate correctly
137 in the specified configuration. Note that different capabilities
138 might be needed with different configurations and different Linux
139 kernel versions. Starting chronyd under a non-root user is not
140 recommended when the configuration is not known, or at least
141 limited to specific directives.
142
143 -F level
144 This option configures a system call filter when chronyd is
145 compiled with support for the Linux secure computing (seccomp)
146 facility. In level 1 the process is killed when a forbidden system
147 call is made, in level -1 the SIGSYS signal is thrown instead and
148 in level 0 the filter is disabled. The default value is 0.
149
150 It is recommended to enable the filter only when it is known to
151 work on the version of the system where chrony is installed as the
152 filter needs to allow also system calls made from libraries that
153 chronyd is using (e.g. libc) and different versions or
154 implementations of the libraries might make different system calls.
155 If the filter is missing some system call, chronyd could be killed
156 even in normal operation.
157
158 -P priority
159 On Linux, this option will select the SCHED_FIFO real-time
160 scheduler at the specified priority (which must be between 0 and
161 100). On macOS, this option must have either a value of 0 to
162 disable the thread time constraint policy or 1 for the policy to be
163 enabled. Other systems do not support this option. The default
164 value is 0.
165
166 -m
167 This option will lock chronyd into RAM so that it will never be
168 paged out. This mode is only supported on Linux.
169
170 -x
171 This option disables the control of the system clock. chronyd will
172 not try to make any adjustments of the clock. It will assume the
173 clock is free running and still track its offset and frequency
174 relative to the estimated true time. This option allows chronyd to
175 be started without the capability to adjust or set the system clock
176 (e.g. in some containers) to operate as an NTP server.
177
178 -v, --version
179 With this option chronyd will print version number to the terminal
180 and exit.
181
182 -h, --help
183 With this option chronyd will print a help message to the terminal
184 and exit.
185
187 /etc/chrony.conf
188
190 chronyc(1), chrony.conf(5)
191
193 For instructions on how to report bugs, please visit
194 https://chrony.tuxfamily.org/.
195
197 chrony was written by Richard Curnow, Miroslav Lichvar, and others.
198
199
200
201chrony 4.0 2020-10-07 CHRONYD(8)