ntpd.1ntpdmdoc revision 1.1.1.2.4.3 1 1.1.1.2.4.3 snj .Dd October 21 2015
2 1.1.1.2.4.2 snj .Dt NTPD 1ntpdmdoc User Commands
3 1.1.1.2.4.2 snj .Os
4 1.1.1.2.4.2 snj .\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
5 1.1.1.2.4.2 snj .\"
6 1.1.1.2.4.3 snj .\" It has been AutoGen-ed October 21, 2015 at 12:38:30 PM by AutoGen 5.18.5
7 1.1.1.2.4.2 snj .\" From the definitions ntpd-opts.def
8 1.1.1.2.4.2 snj .\" and the template file agmdoc-cmd.tpl
9 1.1.1.2.4.2 snj .Sh NAME
10 1.1.1.2.4.2 snj .Nm ntpd
11 1.1.1.2.4.2 snj .Nd NTP daemon program
12 1.1.1.2.4.2 snj .Sh SYNOPSIS
13 1.1.1.2.4.2 snj .Nm
14 1.1.1.2.4.2 snj .\" Mixture of short (flag) options and long options
15 1.1.1.2.4.2 snj .Op Fl flags
16 1.1.1.2.4.2 snj .Op Fl flag Op Ar value
17 1.1.1.2.4.2 snj .Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
18 1.1.1.2.4.2 snj [ <server1> ... <serverN> ]
19 1.1.1.2.4.2 snj .Pp
20 1.1.1.2.4.2 snj .Sh DESCRIPTION
21 1.1.1.2.4.2 snj The
22 1.1.1.2.4.2 snj .Nm
23 1.1.1.2.4.2 snj utility is an operating system daemon which sets
24 1.1.1.2.4.2 snj and maintains the system time of day in synchronism with Internet
25 1.1.1.2.4.2 snj standard time servers.
26 1.1.1.2.4.2 snj It is a complete implementation of the
27 1.1.1.2.4.2 snj Network Time Protocol (NTP) version 4, as defined by RFC\-5905,
28 1.1.1.2.4.2 snj but also retains compatibility with
29 1.1.1.2.4.2 snj version 3, as defined by RFC\-1305, and versions 1
30 1.1.1.2.4.2 snj and 2, as defined by RFC\-1059 and RFC\-1119, respectively.
31 1.1.1.2.4.2 snj .Pp
32 1.1.1.2.4.2 snj The
33 1.1.1.2.4.2 snj .Nm
34 1.1.1.2.4.2 snj utility does most computations in 64\-bit floating point
35 1.1.1.2.4.2 snj arithmetic and does relatively clumsy 64\-bit fixed point operations
36 1.1.1.2.4.2 snj only when necessary to preserve the ultimate precision, about 232
37 1.1.1.2.4.2 snj picoseconds.
38 1.1.1.2.4.2 snj While the ultimate precision is not achievable with
39 1.1.1.2.4.2 snj ordinary workstations and networks of today, it may be required
40 1.1.1.2.4.2 snj with future gigahertz CPU clocks and gigabit LANs.
41 1.1.1.2.4.2 snj .Pp
42 1.1.1.2.4.2 snj Ordinarily,
43 1.1.1.2.4.2 snj .Nm
44 1.1.1.2.4.2 snj reads the
45 1.1.1.2.4.2 snj .Xr ntp.conf 5
46 1.1.1.2.4.2 snj configuration file at startup time in order to determine the
47 1.1.1.2.4.2 snj synchronization sources and operating modes.
48 1.1.1.2.4.2 snj It is also possible to
49 1.1.1.2.4.2 snj specify a working, although limited, configuration entirely on the
50 1.1.1.2.4.2 snj command line, obviating the need for a configuration file.
51 1.1.1.2.4.2 snj This may
52 1.1.1.2.4.2 snj be particularly useful when the local host is to be configured as a
53 1.1.1.2.4.2 snj broadcast/multicast client, with all peers being determined by
54 1.1.1.2.4.2 snj listening to broadcasts at run time.
55 1.1.1.2.4.2 snj .Pp
56 1.1.1.2.4.2 snj If NetInfo support is built into
57 1.1.1.2.4.2 snj .Nm ,
58 1.1.1.2.4.2 snj then
59 1.1.1.2.4.2 snj .Nm
60 1.1.1.2.4.2 snj will attempt to read its configuration from the
61 1.1.1.2.4.2 snj NetInfo if the default
62 1.1.1.2.4.2 snj .Xr ntp.conf 5
63 1.1.1.2.4.2 snj file cannot be read and no file is
64 1.1.1.2.4.2 snj specified by the
65 1.1.1.2.4.2 snj .Fl c
66 1.1.1.2.4.2 snj option.
67 1.1.1.2.4.2 snj .Pp
68 1.1.1.2.4.2 snj Various internal
69 1.1.1.2.4.2 snj .Nm
70 1.1.1.2.4.2 snj variables can be displayed and
71 1.1.1.2.4.2 snj configuration options altered while the
72 1.1.1.2.4.2 snj .Nm
73 1.1.1.2.4.2 snj is running
74 1.1.1.2.4.2 snj using the
75 1.1.1.2.4.2 snj .Xr ntpq 1ntpqmdoc
76 1.1.1.2.4.2 snj and
77 1.1.1.2.4.2 snj .Xr ntpdc 1ntpdcmdoc
78 1.1.1.2.4.2 snj utility programs.
79 1.1.1.2.4.2 snj .Pp
80 1.1.1.2.4.2 snj When
81 1.1.1.2.4.2 snj .Nm
82 1.1.1.2.4.2 snj starts it looks at the value of
83 1.1.1.2.4.2 snj .Xr umask 2 ,
84 1.1.1.2.4.2 snj and if zero
85 1.1.1.2.4.2 snj .Nm
86 1.1.1.2.4.2 snj will set the
87 1.1.1.2.4.2 snj .Xr umask 2
88 1.1.1.2.4.2 snj to 022.
89 1.1.1.2.4.2 snj .Sh "OPTIONS"
90 1.1.1.2.4.2 snj .Bl -tag
91 1.1.1.2.4.2 snj .It Fl 4 , Fl \-ipv4
92 1.1.1.2.4.2 snj Force IPv4 DNS name resolution.
93 1.1.1.2.4.2 snj This option must not appear in combination with any of the following options:
94 1.1.1.2.4.2 snj ipv6.
95 1.1.1.2.4.2 snj .sp
96 1.1.1.2.4.2 snj Force DNS resolution of following host names on the command line
97 1.1.1.2.4.2 snj to the IPv4 namespace.
98 1.1.1.2.4.2 snj .It Fl 6 , Fl \-ipv6
99 1.1.1.2.4.2 snj Force IPv6 DNS name resolution.
100 1.1.1.2.4.2 snj This option must not appear in combination with any of the following options:
101 1.1.1.2.4.2 snj ipv4.
102 1.1.1.2.4.2 snj .sp
103 1.1.1.2.4.2 snj Force DNS resolution of following host names on the command line
104 1.1.1.2.4.2 snj to the IPv6 namespace.
105 1.1.1.2.4.2 snj .It Fl a , Fl \-authreq
106 1.1.1.2.4.2 snj Require crypto authentication.
107 1.1.1.2.4.2 snj This option must not appear in combination with any of the following options:
108 1.1.1.2.4.2 snj authnoreq.
109 1.1.1.2.4.2 snj .sp
110 1.1.1.2.4.2 snj Require cryptographic authentication for broadcast client,
111 1.1.1.2.4.2 snj multicast client and symmetric passive associations.
112 1.1.1.2.4.2 snj This is the default.
113 1.1.1.2.4.2 snj .It Fl A , Fl \-authnoreq
114 1.1.1.2.4.2 snj Do not require crypto authentication.
115 1.1.1.2.4.2 snj This option must not appear in combination with any of the following options:
116 1.1.1.2.4.2 snj authreq.
117 1.1.1.2.4.2 snj .sp
118 1.1.1.2.4.2 snj Do not require cryptographic authentication for broadcast client,
119 1.1.1.2.4.2 snj multicast client and symmetric passive associations.
120 1.1.1.2.4.2 snj This is almost never a good idea.
121 1.1.1.2.4.2 snj .It Fl b , Fl \-bcastsync
122 1.1.1.2.4.2 snj Allow us to sync to broadcast servers.
123 1.1.1.2.4.2 snj .sp
124 1.1.1.2.4.2 snj .It Fl c Ar string , Fl \-configfile Ns = Ns Ar string
125 1.1.1.2.4.2 snj configuration file name.
126 1.1.1.2.4.2 snj .sp
127 1.1.1.2.4.2 snj The name and path of the configuration file,
128 1.1.1.2.4.2 snj \fI/etc/ntp.conf\fP
129 1.1.1.2.4.2 snj by default.
130 1.1.1.2.4.2 snj .It Fl d , Fl \-debug\-level
131 1.1.1.2.4.2 snj Increase debug verbosity level.
132 1.1.1.2.4.2 snj This option may appear an unlimited number of times.
133 1.1.1.2.4.2 snj .sp
134 1.1.1.2.4.2 snj .It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
135 1.1.1.2.4.2 snj Set the debug verbosity level.
136 1.1.1.2.4.2 snj This option may appear an unlimited number of times.
137 1.1.1.2.4.2 snj This option takes an integer number as its argument.
138 1.1.1.2.4.2 snj .sp
139 1.1.1.2.4.2 snj .It Fl f Ar string , Fl \-driftfile Ns = Ns Ar string
140 1.1.1.2.4.2 snj frequency drift file name.
141 1.1.1.2.4.2 snj .sp
142 1.1.1.2.4.2 snj The name and path of the frequency file,
143 1.1.1.2.4.2 snj \fI/etc/ntp.drift\fP
144 1.1.1.2.4.2 snj by default.
145 1.1.1.2.4.2 snj This is the same operation as the
146 1.1.1.2.4.2 snj \fBdriftfile\fP \fIdriftfile\fP
147 1.1.1.2.4.3 snj configuration specification in the
148 1.1.1.2.4.2 snj \fI/etc/ntp.conf\fP
149 1.1.1.2.4.2 snj file.
150 1.1.1.2.4.2 snj .It Fl g , Fl \-panicgate
151 1.1.1.2.4.2 snj Allow the first adjustment to be Big.
152 1.1.1.2.4.2 snj This option may appear an unlimited number of times.
153 1.1.1.2.4.2 snj .sp
154 1.1.1.2.4.2 snj Normally,
155 1.1.1.2.4.2 snj \fBntpd\fP
156 1.1.1.2.4.2 snj exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
157 1.1.1.2.4.2 snj \fBntpd\fP
158 1.1.1.2.4.2 snj will exit with a message to the system log. This option can be used with the
159 1.1.1.2.4.2 snj \fB\-q\fP
160 1.1.1.2.4.2 snj and
161 1.1.1.2.4.2 snj \fB\-x\fP
162 1.1.1.2.4.2 snj options.
163 1.1.1.2.4.2 snj See the
164 1.1.1.2.4.2 snj \fBtinker\fP
165 1.1.1.2.4.2 snj configuration file directive for other options.
166 1.1.1.2.4.3 snj .It Fl G , Fl \-force\-step\-once
167 1.1.1.2.4.3 snj Step any initial offset correction..
168 1.1.1.2.4.3 snj .sp
169 1.1.1.2.4.3 snj Normally,
170 1.1.1.2.4.3 snj \fBntpd\fP
171 1.1.1.2.4.3 snj steps the time if the time offset exceeds the step threshold,
172 1.1.1.2.4.3 snj which is 128 ms by default, and otherwise slews the time.
173 1.1.1.2.4.3 snj This option forces the initial offset correction to be stepped,
174 1.1.1.2.4.3 snj so the highest time accuracy can be achieved quickly.
175 1.1.1.2.4.3 snj However, this may also cause the time to be stepped back
176 1.1.1.2.4.3 snj so this option must not be used if
177 1.1.1.2.4.3 snj applications requiring monotonic time are running.
178 1.1.1.2.4.3 snj See the \fBtinker\fP configuration file directive for other options.
179 1.1.1.2.4.2 snj .It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
180 1.1.1.2.4.2 snj Jail directory.
181 1.1.1.2.4.2 snj .sp
182 1.1.1.2.4.2 snj Chroot the server to the directory
183 1.1.1.2.4.2 snj \fIjaildir\fP
184 1.1.1.2.4.2 snj .
185 1.1.1.2.4.2 snj This option also implies that the server attempts to drop root privileges at startup.
186 1.1.1.2.4.2 snj You may need to also specify a
187 1.1.1.2.4.2 snj \fB\-u\fP
188 1.1.1.2.4.2 snj option.
189 1.1.1.2.4.2 snj This option is only available if the OS supports adjusting the clock
190 1.1.1.2.4.2 snj without full root privileges.
191 1.1.1.2.4.2 snj This option is supported under NetBSD (configure with
192 1.1.1.2.4.2 snj \fB\-\-enable\-clockctl\fP) or Linux (configure with
193 1.1.1.2.4.2 snj \fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
194 1.1.1.2.4.2 snj .It Fl I Ar iface , Fl \-interface Ns = Ns Ar iface
195 1.1.1.2.4.2 snj Listen on an interface name or address.
196 1.1.1.2.4.2 snj This option may appear an unlimited number of times.
197 1.1.1.2.4.2 snj .sp
198 1.1.1.2.4.2 snj Open the network address given, or all the addresses associated with the
199 1.1.1.2.4.2 snj given interface name. This option may appear multiple times. This option
200 1.1.1.2.4.2 snj also implies not opening other addresses, except wildcard and localhost.
201 1.1.1.2.4.2 snj This option is deprecated. Please consider using the configuration file
202 1.1.1.2.4.3 snj \fBinterface\fP command, which is more versatile.
203 1.1.1.2.4.2 snj .It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
204 1.1.1.2.4.2 snj path to symmetric keys.
205 1.1.1.2.4.2 snj .sp
206 1.1.1.2.4.2 snj Specify the name and path of the symmetric key file.
207 1.1.1.2.4.2 snj \fI/etc/ntp.keys\fP
208 1.1.1.2.4.2 snj is the default.
209 1.1.1.2.4.2 snj This is the same operation as the
210 1.1.1.2.4.2 snj \fBkeys\fP \fIkeyfile\fP
211 1.1.1.2.4.2 snj configuration file directive.
212 1.1.1.2.4.2 snj .It Fl l Ar string , Fl \-logfile Ns = Ns Ar string
213 1.1.1.2.4.2 snj path to the log file.
214 1.1.1.2.4.2 snj .sp
215 1.1.1.2.4.2 snj Specify the name and path of the log file.
216 1.1.1.2.4.2 snj The default is the system log file.
217 1.1.1.2.4.2 snj This is the same operation as the
218 1.1.1.2.4.2 snj \fBlogfile\fP \fIlogfile\fP
219 1.1.1.2.4.2 snj configuration file directive.
220 1.1.1.2.4.2 snj .It Fl L , Fl \-novirtualips
221 1.1.1.2.4.2 snj Do not listen to virtual interfaces.
222 1.1.1.2.4.2 snj .sp
223 1.1.1.2.4.2 snj Do not listen to virtual interfaces, defined as those with
224 1.1.1.2.4.2 snj names containing a colon. This option is deprecated. Please
225 1.1.1.2.4.2 snj consider using the configuration file \fBinterface\fP command, which
226 1.1.1.2.4.2 snj is more versatile.
227 1.1.1.2.4.2 snj .It Fl M , Fl \-modifymmtimer
228 1.1.1.2.4.2 snj Modify Multimedia Timer (Windows only).
229 1.1.1.2.4.2 snj .sp
230 1.1.1.2.4.2 snj Set the Windows Multimedia Timer to highest resolution. This
231 1.1.1.2.4.2 snj ensures the resolution does not change while ntpd is running,
232 1.1.1.2.4.2 snj avoiding timekeeping glitches associated with changes.
233 1.1.1.2.4.2 snj .It Fl n , Fl \-nofork
234 1.1.1.2.4.2 snj Do not fork.
235 1.1.1.2.4.2 snj This option must not appear in combination with any of the following options:
236 1.1.1.2.4.2 snj wait\-sync.
237 1.1.1.2.4.2 snj .sp
238 1.1.1.2.4.2 snj .It Fl N , Fl \-nice
239 1.1.1.2.4.2 snj Run at high priority.
240 1.1.1.2.4.2 snj .sp
241 1.1.1.2.4.2 snj To the extent permitted by the operating system, run
242 1.1.1.2.4.2 snj \fBntpd\fP
243 1.1.1.2.4.2 snj at the highest priority.
244 1.1.1.2.4.2 snj .It Fl p Ar string , Fl \-pidfile Ns = Ns Ar string
245 1.1.1.2.4.2 snj path to the PID file.
246 1.1.1.2.4.2 snj .sp
247 1.1.1.2.4.2 snj Specify the name and path of the file used to record
248 1.1.1.2.4.2 snj \fBntpd\fP's
249 1.1.1.2.4.2 snj process ID.
250 1.1.1.2.4.2 snj This is the same operation as the
251 1.1.1.2.4.2 snj \fBpidfile\fP \fIpidfile\fP
252 1.1.1.2.4.2 snj configuration file directive.
253 1.1.1.2.4.2 snj .It Fl P Ar number , Fl \-priority Ns = Ns Ar number
254 1.1.1.2.4.2 snj Process priority.
255 1.1.1.2.4.2 snj This option takes an integer number as its argument.
256 1.1.1.2.4.2 snj .sp
257 1.1.1.2.4.2 snj To the extent permitted by the operating system, run
258 1.1.1.2.4.2 snj \fBntpd\fP
259 1.1.1.2.4.2 snj at the specified
260 1.1.1.2.4.2 snj \fBsched_setscheduler(SCHED_FIFO)\fP
261 1.1.1.2.4.2 snj priority.
262 1.1.1.2.4.2 snj .It Fl q , Fl \-quit
263 1.1.1.2.4.2 snj Set the time and quit.
264 1.1.1.2.4.2 snj This option must not appear in combination with any of the following options:
265 1.1.1.2.4.2 snj saveconfigquit, wait\-sync.
266 1.1.1.2.4.2 snj .sp
267 1.1.1.2.4.2 snj \fBntpd\fP
268 1.1.1.2.4.2 snj will not daemonize and will exit after the clock is first
269 1.1.1.2.4.2 snj synchronized. This behavior mimics that of the
270 1.1.1.2.4.2 snj \fBntpdate\fP
271 1.1.1.2.4.2 snj program, which will soon be replaced with a shell script.
272 1.1.1.2.4.2 snj The
273 1.1.1.2.4.2 snj \fB\-g\fP
274 1.1.1.2.4.2 snj and
275 1.1.1.2.4.2 snj \fB\-x\fP
276 1.1.1.2.4.2 snj options can be used with this option.
277 1.1.1.2.4.2 snj Note: The kernel time discipline is disabled with this option.
278 1.1.1.2.4.2 snj .It Fl r Ar string , Fl \-propagationdelay Ns = Ns Ar string
279 1.1.1.2.4.2 snj Broadcast/propagation delay.
280 1.1.1.2.4.2 snj .sp
281 1.1.1.2.4.2 snj Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
282 1.1.1.2.4.2 snj .It Fl \-saveconfigquit Ns = Ns Ar string
283 1.1.1.2.4.2 snj Save parsed configuration and quit.
284 1.1.1.2.4.2 snj This option must not appear in combination with any of the following options:
285 1.1.1.2.4.2 snj quit, wait\-sync.
286 1.1.1.2.4.2 snj .sp
287 1.1.1.2.4.2 snj Cause \fBntpd\fP to parse its startup configuration file and save an
288 1.1.1.2.4.2 snj equivalent to the given filename and exit. This option was
289 1.1.1.2.4.2 snj designed for automated testing.
290 1.1.1.2.4.2 snj .It Fl s Ar string , Fl \-statsdir Ns = Ns Ar string
291 1.1.1.2.4.2 snj Statistics file location.
292 1.1.1.2.4.2 snj .sp
293 1.1.1.2.4.2 snj Specify the directory path for files created by the statistics facility.
294 1.1.1.2.4.2 snj This is the same operation as the
295 1.1.1.2.4.2 snj \fBstatsdir\fP \fIstatsdir\fP
296 1.1.1.2.4.2 snj configuration file directive.
297 1.1.1.2.4.2 snj .It Fl t Ar tkey , Fl \-trustedkey Ns = Ns Ar tkey
298 1.1.1.2.4.2 snj Trusted key number.
299 1.1.1.2.4.2 snj This option may appear an unlimited number of times.
300 1.1.1.2.4.2 snj .sp
301 1.1.1.2.4.2 snj Add the specified key number to the trusted key list.
302 1.1.1.2.4.2 snj .It Fl u Ar string , Fl \-user Ns = Ns Ar string
303 1.1.1.2.4.2 snj Run as userid (or userid:groupid).
304 1.1.1.2.4.2 snj .sp
305 1.1.1.2.4.2 snj Specify a user, and optionally a group, to switch to.
306 1.1.1.2.4.2 snj This option is only available if the OS supports adjusting the clock
307 1.1.1.2.4.2 snj without full root privileges.
308 1.1.1.2.4.2 snj This option is supported under NetBSD (configure with
309 1.1.1.2.4.2 snj \fB\-\-enable\-clockctl\fP) or Linux (configure with
310 1.1.1.2.4.2 snj \fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
311 1.1.1.2.4.2 snj .It Fl U Ar number , Fl \-updateinterval Ns = Ns Ar number
312 1.1.1.2.4.2 snj interval in seconds between scans for new or dropped interfaces.
313 1.1.1.2.4.2 snj This option takes an integer number as its argument.
314 1.1.1.2.4.2 snj .sp
315 1.1.1.2.4.2 snj Give the time in seconds between two scans for new or dropped interfaces.
316 1.1.1.2.4.2 snj For systems with routing socket support the scans will be performed shortly after the interface change
317 1.1.1.2.4.2 snj has been detected by the system.
318 1.1.1.2.4.2 snj Use 0 to disable scanning. 60 seconds is the minimum time between scans.
319 1.1.1.2.4.2 snj .It Fl \-var Ns = Ns Ar nvar
320 1.1.1.2.4.2 snj make ARG an ntp variable (RW).
321 1.1.1.2.4.2 snj This option may appear an unlimited number of times.
322 1.1.1.2.4.2 snj .sp
323 1.1.1.2.4.2 snj .It Fl \-dvar Ns = Ns Ar ndvar
324 1.1.1.2.4.2 snj make ARG an ntp variable (RW|DEF).
325 1.1.1.2.4.2 snj This option may appear an unlimited number of times.
326 1.1.1.2.4.2 snj .sp
327 1.1.1.2.4.2 snj .It Fl w Ar number , Fl \-wait\-sync Ns = Ns Ar number
328 1.1.1.2.4.2 snj Seconds to wait for first clock sync.
329 1.1.1.2.4.2 snj This option must not appear in combination with any of the following options:
330 1.1.1.2.4.2 snj nofork, quit, saveconfigquit.
331 1.1.1.2.4.2 snj This option takes an integer number as its argument.
332 1.1.1.2.4.2 snj .sp
333 1.1.1.2.4.2 snj If greater than zero, alters \fBntpd\fP's behavior when forking to
334 1.1.1.2.4.2 snj daemonize. Instead of exiting with status 0 immediately after
335 1.1.1.2.4.2 snj the fork, the parent waits up to the specified number of
336 1.1.1.2.4.2 snj seconds for the child to first synchronize the clock. The exit
337 1.1.1.2.4.2 snj status is zero (success) if the clock was synchronized,
338 1.1.1.2.4.2 snj otherwise it is \fBETIMEDOUT\fP.
339 1.1.1.2.4.2 snj This provides the option for a script starting \fBntpd\fP to easily
340 1.1.1.2.4.2 snj wait for the first set of the clock before proceeding.
341 1.1.1.2.4.2 snj .It Fl x , Fl \-slew
342 1.1.1.2.4.2 snj Slew up to 600 seconds.
343 1.1.1.2.4.2 snj .sp
344 1.1.1.2.4.2 snj Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
345 1.1.1.2.4.2 snj This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
346 1.1.1.2.4.2 snj Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.
347 1.1.1.2.4.2 snj Thus, an adjustment as much as 600 s will take almost 14 days to complete.
348 1.1.1.2.4.2 snj This option can be used with the
349 1.1.1.2.4.2 snj \fB\-g\fP
350 1.1.1.2.4.2 snj and
351 1.1.1.2.4.2 snj \fB\-q\fP
352 1.1.1.2.4.2 snj options.
353 1.1.1.2.4.2 snj See the
354 1.1.1.2.4.2 snj \fBtinker\fP
355 1.1.1.2.4.2 snj configuration file directive for other options.
356 1.1.1.2.4.2 snj Note: The kernel time discipline is disabled with this option.
357 1.1.1.2.4.2 snj .It Fl \-usepcc
358 1.1.1.2.4.2 snj Use CPU cycle counter (Windows only).
359 1.1.1.2.4.2 snj .sp
360 1.1.1.2.4.2 snj Attempt to substitute the CPU counter for \fBQueryPerformanceCounter\fP.
361 1.1.1.2.4.2 snj The CPU counter and \fBQueryPerformanceCounter\fP are compared, and if
362 1.1.1.2.4.2 snj they have the same frequency, the CPU counter (RDTSC on x86) is
363 1.1.1.2.4.2 snj used directly, saving the overhead of a system call.
364 1.1.1.2.4.2 snj .It Fl \-pccfreq Ns = Ns Ar string
365 1.1.1.2.4.2 snj Force CPU cycle counter use (Windows only).
366 1.1.1.2.4.2 snj .sp
367 1.1.1.2.4.2 snj Force substitution the CPU counter for \fBQueryPerformanceCounter\fP.
368 1.1.1.2.4.2 snj The CPU counter (RDTSC on x86) is used unconditionally with the
369 1.1.1.2.4.2 snj given frequency (in Hz).
370 1.1.1.2.4.2 snj .It Fl m , Fl \-mdns
371 1.1.1.2.4.2 snj Register with mDNS as a NTP server.
372 1.1.1.2.4.2 snj .sp
373 1.1.1.2.4.2 snj Registers as an NTP server with the local mDNS server which allows
374 1.1.1.2.4.2 snj the server to be discovered via mDNS client lookup.
375 1.1.1.2.4.2 snj .It Fl \&? , Fl \-help
376 1.1.1.2.4.2 snj Display usage information and exit.
377 1.1.1.2.4.2 snj .It Fl \&! , Fl \-more\-help
378 1.1.1.2.4.2 snj Pass the extended usage information through a pager.
379 1.1.1.2.4.2 snj .It Fl \-version Op Brq Ar v|c|n
380 1.1.1.2.4.2 snj Output version of program and exit. The default mode is `v', a simple
381 1.1.1.2.4.2 snj version. The `c' mode will print copyright information and `n' will
382 1.1.1.2.4.2 snj print the full copyright notice.
383 1.1.1.2.4.2 snj .El
384 1.1.1.2.4.2 snj .Sh "OPTION PRESETS"
385 1.1.1.2.4.2 snj Any option that is not marked as \fInot presettable\fP may be preset
386 1.1.1.2.4.2 snj by loading values from environment variables named:
387 1.1.1.2.4.2 snj .nf
388 1.1.1.2.4.2 snj \fBNTPD_<option\-name>\fP or \fBNTPD\fP
389 1.1.1.2.4.2 snj .fi
390 1.1.1.2.4.2 snj .ad
391 1.1.1.2.4.2 snj .Sh USAGE
392 1.1.1.2.4.2 snj .Ss "How NTP Operates"
393 1.1.1.2.4.2 snj The
394 1.1.1.2.4.2 snj .Nm
395 1.1.1.2.4.2 snj utility operates by exchanging messages with
396 1.1.1.2.4.2 snj one or more configured servers over a range of designated poll intervals.
397 1.1.1.2.4.2 snj When
398 1.1.1.2.4.2 snj started, whether for the first or subsequent times, the program
399 1.1.1.2.4.2 snj requires several exchanges from the majority of these servers so
400 1.1.1.2.4.2 snj the signal processing and mitigation algorithms can accumulate and
401 1.1.1.2.4.2 snj groom the data and set the clock.
402 1.1.1.2.4.2 snj In order to protect the network
403 1.1.1.2.4.2 snj from bursts, the initial poll interval for each server is delayed
404 1.1.1.2.4.2 snj an interval randomized over a few seconds.
405 1.1.1.2.4.2 snj At the default initial poll
406 1.1.1.2.4.2 snj interval of 64s, several minutes can elapse before the clock is
407 1.1.1.2.4.2 snj set.
408 1.1.1.2.4.2 snj This initial delay to set the clock
409 1.1.1.2.4.2 snj can be safely and dramatically reduced using the
410 1.1.1.2.4.2 snj .Cm iburst
411 1.1.1.2.4.2 snj keyword with the
412 1.1.1.2.4.2 snj .Ic server
413 1.1.1.2.4.2 snj configuration
414 1.1.1.2.4.2 snj command, as described in
415 1.1.1.2.4.2 snj .Xr ntp.conf 5 .
416 1.1.1.2.4.2 snj .Pp
417 1.1.1.2.4.2 snj Most operating systems and hardware of today incorporate a
418 1.1.1.2.4.2 snj time\-of\-year (TOY) chip to maintain the time during periods when
419 1.1.1.2.4.2 snj the power is off.
420 1.1.1.2.4.2 snj When the machine is booted, the chip is used to
421 1.1.1.2.4.2 snj initialize the operating system time.
422 1.1.1.2.4.2 snj After the machine has
423 1.1.1.2.4.2 snj synchronized to a NTP server, the operating system corrects the
424 1.1.1.2.4.2 snj chip from time to time.
425 1.1.1.2.4.2 snj In the default case, if
426 1.1.1.2.4.2 snj .Nm
427 1.1.1.2.4.2 snj detects that the time on the host
428 1.1.1.2.4.2 snj is more than 1000s from the server time,
429 1.1.1.2.4.2 snj .Nm
430 1.1.1.2.4.2 snj assumes something must be terribly wrong and the only
431 1.1.1.2.4.2 snj reliable action is for the operator to intervene and set the clock
432 1.1.1.2.4.2 snj by hand.
433 1.1.1.2.4.2 snj (Reasons for this include there is no TOY chip,
434 1.1.1.2.4.2 snj or its battery is dead, or that the TOY chip is just of poor quality.)
435 1.1.1.2.4.2 snj This causes
436 1.1.1.2.4.2 snj .Nm
437 1.1.1.2.4.2 snj to exit with a panic message to
438 1.1.1.2.4.2 snj the system log.
439 1.1.1.2.4.2 snj The
440 1.1.1.2.4.2 snj .Fl g
441 1.1.1.2.4.2 snj option overrides this check and the
442 1.1.1.2.4.2 snj clock will be set to the server time regardless of the chip time
443 1.1.1.2.4.2 snj (up to 68 years in the past or future \(em
444 1.1.1.2.4.2 snj this is a limitation of the NTPv4 protocol).
445 1.1.1.2.4.2 snj However, and to protect against broken hardware, such as when the
446 1.1.1.2.4.2 snj CMOS battery fails or the clock counter becomes defective, once the
447 1.1.1.2.4.2 snj clock has been set an error greater than 1000s will cause
448 1.1.1.2.4.2 snj .Nm
449 1.1.1.2.4.2 snj to exit anyway.
450 1.1.1.2.4.2 snj .Pp
451 1.1.1.2.4.2 snj Under ordinary conditions,
452 1.1.1.2.4.2 snj .Nm
453 1.1.1.2.4.2 snj adjusts the clock in
454 1.1.1.2.4.2 snj small steps so that the timescale is effectively continuous and
455 1.1.1.2.4.2 snj without discontinuities.
456 1.1.1.2.4.2 snj Under conditions of extreme network
457 1.1.1.2.4.2 snj congestion, the roundtrip delay jitter can exceed three seconds and
458 1.1.1.2.4.2 snj the synchronization distance, which is equal to one\-half the
459 1.1.1.2.4.2 snj roundtrip delay plus error budget terms, can become very large.
460 1.1.1.2.4.2 snj The
461 1.1.1.2.4.2 snj .Nm
462 1.1.1.2.4.2 snj algorithms discard sample offsets exceeding 128 ms,
463 1.1.1.2.4.2 snj unless the interval during which no sample offset is less than 128
464 1.1.1.2.4.2 snj ms exceeds 900s.
465 1.1.1.2.4.2 snj The first sample after that, no matter what the
466 1.1.1.2.4.2 snj offset, steps the clock to the indicated time.
467 1.1.1.2.4.2 snj In practice this
468 1.1.1.2.4.2 snj reduces the false alarm rate where the clock is stepped in error to
469 1.1.1.2.4.2 snj a vanishingly low incidence.
470 1.1.1.2.4.2 snj .Pp
471 1.1.1.2.4.2 snj As the result of this behavior, once the clock has been set it
472 1.1.1.2.4.2 snj very rarely strays more than 128 ms even under extreme cases of
473 1.1.1.2.4.2 snj network path congestion and jitter.
474 1.1.1.2.4.2 snj Sometimes, in particular when
475 1.1.1.2.4.2 snj .Nm
476 1.1.1.2.4.2 snj is first started without a valid drift file
477 1.1.1.2.4.2 snj on a system with a large intrinsic drift
478 1.1.1.2.4.2 snj the error might grow to exceed 128 ms,
479 1.1.1.2.4.2 snj which would cause the clock to be set backwards
480 1.1.1.2.4.2 snj if the local clock time is more than 128 s
481 1.1.1.2.4.2 snj in the future relative to the server.
482 1.1.1.2.4.2 snj In some applications, this behavior may be unacceptable.
483 1.1.1.2.4.2 snj There are several solutions, however.
484 1.1.1.2.4.2 snj If the
485 1.1.1.2.4.2 snj .Fl x
486 1.1.1.2.4.2 snj option is included on the command line, the clock will
487 1.1.1.2.4.2 snj never be stepped and only slew corrections will be used.
488 1.1.1.2.4.2 snj But this choice comes with a cost that
489 1.1.1.2.4.2 snj should be carefully explored before deciding to use
490 1.1.1.2.4.2 snj the
491 1.1.1.2.4.2 snj .Fl x
492 1.1.1.2.4.2 snj option.
493 1.1.1.2.4.2 snj The maximum slew rate possible is limited
494 1.1.1.2.4.2 snj to 500 parts\-per\-million (PPM) as a consequence of the correctness
495 1.1.1.2.4.2 snj principles on which the NTP protocol and algorithm design are
496 1.1.1.2.4.2 snj based.
497 1.1.1.2.4.2 snj As a result, the local clock can take a long time to
498 1.1.1.2.4.2 snj converge to an acceptable offset, about 2,000 s for each second the
499 1.1.1.2.4.2 snj clock is outside the acceptable range.
500 1.1.1.2.4.2 snj During this interval the
501 1.1.1.2.4.2 snj local clock will not be consistent with any other network clock and
502 1.1.1.2.4.2 snj the system cannot be used for distributed applications that require
503 1.1.1.2.4.2 snj correctly synchronized network time.
504 1.1.1.2.4.2 snj .Pp
505 1.1.1.2.4.2 snj In spite of the above precautions, sometimes when large
506 1.1.1.2.4.2 snj frequency errors are present the resulting time offsets stray
507 1.1.1.2.4.2 snj outside the 128\-ms range and an eventual step or slew time
508 1.1.1.2.4.2 snj correction is required.
509 1.1.1.2.4.2 snj If following such a correction the
510 1.1.1.2.4.2 snj frequency error is so large that the first sample is outside the
511 1.1.1.2.4.2 snj acceptable range,
512 1.1.1.2.4.2 snj .Nm
513 1.1.1.2.4.2 snj enters the same state as when the
514 1.1.1.2.4.2 snj .Pa ntp.drift
515 1.1.1.2.4.2 snj file is not present.
516 1.1.1.2.4.2 snj The intent of this behavior
517 1.1.1.2.4.2 snj is to quickly correct the frequency and restore operation to the
518 1.1.1.2.4.2 snj normal tracking mode.
519 1.1.1.2.4.2 snj In the most extreme cases
520 1.1.1.2.4.2 snj (the host
521 1.1.1.2.4.2 snj .Cm time.ien.it
522 1.1.1.2.4.2 snj comes to mind), there may be occasional
523 1.1.1.2.4.2 snj step/slew corrections and subsequent frequency corrections.
524 1.1.1.2.4.2 snj It
525 1.1.1.2.4.2 snj helps in these cases to use the
526 1.1.1.2.4.2 snj .Cm burst
527 1.1.1.2.4.2 snj keyword when
528 1.1.1.2.4.2 snj configuring the server, but
529 1.1.1.2.4.2 snj ONLY
530 1.1.1.2.4.2 snj when you have permission to do so from the owner of the target host.
531 1.1.1.2.4.2 snj .Pp
532 1.1.1.2.4.2 snj Finally,
533 1.1.1.2.4.2 snj in the past many startup scripts would run
534 1.1.1.2.4.2 snj .Xr ntpdate 1ntpdatemdoc
535 1.1.1.2.4.3 snj or
536 1.1.1.2.4.3 snj .Xr sntp 1sntpmdoc
537 1.1.1.2.4.2 snj to get the system clock close to correct before starting
538 1.1.1.2.4.2 snj .Xr ntpd 1ntpdmdoc ,
539 1.1.1.2.4.2 snj but this was never more than a mediocre hack and is no longer needed.
540 1.1.1.2.4.2 snj If you are following the instructions in
541 1.1.1.2.4.2 snj .Sx "Starting NTP (Best Current Practice)"
542 1.1.1.2.4.2 snj and you still need to set the system time before starting
543 1.1.1.2.4.2 snj .Nm ,
544 1.1.1.2.4.2 snj please open a bug report and document what is going on,
545 1.1.1.2.4.2 snj and then look at using
546 1.1.1.2.4.3 snj .Xr sntp 1sntpmdoc
547 1.1.1.2.4.3 snj if you really need to set the clock before starting
548 1.1.1.2.4.3 snj .Nm .
549 1.1.1.2.4.2 snj .Pp
550 1.1.1.2.4.2 snj There is a way to start
551 1.1.1.2.4.2 snj .Xr ntpd 1ntpdmdoc
552 1.1.1.2.4.2 snj that often addresses all of the problems mentioned above.
553 1.1.1.2.4.2 snj .Ss "Starting NTP (Best Current Practice)"
554 1.1.1.2.4.2 snj First, use the
555 1.1.1.2.4.2 snj .Cm iburst
556 1.1.1.2.4.2 snj option on your
557 1.1.1.2.4.2 snj .Cm server
558 1.1.1.2.4.2 snj entries.
559 1.1.1.2.4.2 snj .Pp
560 1.1.1.2.4.2 snj If you can also keep a good
561 1.1.1.2.4.2 snj .Pa ntp.drift
562 1.1.1.2.4.2 snj file then
563 1.1.1.2.4.2 snj .Xr ntpd 1ntpdmdoc
564 1.1.1.2.4.2 snj will effectively "warm\-start" and your system's clock will
565 1.1.1.2.4.2 snj be stable in under 11 seconds' time.
566 1.1.1.2.4.2 snj .Pp
567 1.1.1.2.4.2 snj As soon as possible in the startup sequence, start
568 1.1.1.2.4.2 snj .Xr ntpd 1ntpdmdoc
569 1.1.1.2.4.2 snj with at least the
570 1.1.1.2.4.2 snj .Fl g
571 1.1.1.2.4.2 snj and perhaps the
572 1.1.1.2.4.2 snj .Fl N
573 1.1.1.2.4.2 snj options.
574 1.1.1.2.4.2 snj Then,
575 1.1.1.2.4.2 snj start the rest of your "normal" processes.
576 1.1.1.2.4.2 snj This will give
577 1.1.1.2.4.2 snj .Xr ntpd 1ntpdmdoc
578 1.1.1.2.4.2 snj as much time as possible to get the system's clock synchronized and stable.
579 1.1.1.2.4.2 snj .Pp
580 1.1.1.2.4.2 snj Finally,
581 1.1.1.2.4.2 snj if you have processes like
582 1.1.1.2.4.2 snj .Cm dovecot
583 1.1.1.2.4.2 snj or database servers
584 1.1.1.2.4.2 snj that require
585 1.1.1.2.4.2 snj monotonically\-increasing time,
586 1.1.1.2.4.2 snj run
587 1.1.1.2.4.2 snj .Xr ntp\-wait 1ntp\-waitmdoc
588 1.1.1.2.4.2 snj as late as possible in the boot sequence
589 1.1.1.2.4.2 snj (perhaps with the
590 1.1.1.2.4.2 snj .Fl v
591 1.1.1.2.4.2 snj flag)
592 1.1.1.2.4.2 snj and after
593 1.1.1.2.4.2 snj .Xr ntp\-wait 1ntp\-waitmdoc
594 1.1.1.2.4.2 snj exits successfully
595 1.1.1.2.4.2 snj it is as safe as it will ever be to start any process that require
596 1.1.1.2.4.2 snj stable time.
597 1.1.1.2.4.2 snj .Ss "Frequency Discipline"
598 1.1.1.2.4.2 snj The
599 1.1.1.2.4.2 snj .Nm
600 1.1.1.2.4.2 snj behavior at startup depends on whether the
601 1.1.1.2.4.2 snj frequency file, usually
602 1.1.1.2.4.2 snj .Pa ntp.drift ,
603 1.1.1.2.4.2 snj exists.
604 1.1.1.2.4.2 snj This file
605 1.1.1.2.4.2 snj contains the latest estimate of clock frequency error.
606 1.1.1.2.4.2 snj When the
607 1.1.1.2.4.2 snj .Nm
608 1.1.1.2.4.2 snj is started and the file does not exist, the
609 1.1.1.2.4.2 snj .Nm
610 1.1.1.2.4.2 snj enters a special mode designed to quickly adapt to
611 1.1.1.2.4.2 snj the particular system clock oscillator time and frequency error.
612 1.1.1.2.4.2 snj This takes approximately 15 minutes, after which the time and
613 1.1.1.2.4.2 snj frequency are set to nominal values and the
614 1.1.1.2.4.2 snj .Nm
615 1.1.1.2.4.2 snj enters
616 1.1.1.2.4.2 snj normal mode, where the time and frequency are continuously tracked
617 1.1.1.2.4.2 snj relative to the server.
618 1.1.1.2.4.2 snj After one hour the frequency file is
619 1.1.1.2.4.2 snj created and the current frequency offset written to it.
620 1.1.1.2.4.2 snj When the
621 1.1.1.2.4.2 snj .Nm
622 1.1.1.2.4.2 snj is started and the file does exist, the
623 1.1.1.2.4.2 snj .Nm
624 1.1.1.2.4.2 snj frequency is initialized from the file and enters normal mode
625 1.1.1.2.4.2 snj immediately.
626 1.1.1.2.4.2 snj After that the current frequency offset is written to
627 1.1.1.2.4.2 snj the file at hourly intervals.
628 1.1.1.2.4.2 snj .Ss "Operating Modes"
629 1.1.1.2.4.2 snj The
630 1.1.1.2.4.2 snj .Nm
631 1.1.1.2.4.2 snj utility can operate in any of several modes, including
632 1.1.1.2.4.2 snj symmetric active/passive, client/server broadcast/multicast and
633 1.1.1.2.4.2 snj manycast, as described in the
634 1.1.1.2.4.2 snj .Qq Association Management
635 1.1.1.2.4.2 snj page
636 1.1.1.2.4.2 snj (available as part of the HTML documentation
637 1.1.1.2.4.2 snj provided in
638 1.1.1.2.4.2 snj .Pa /usr/share/doc/ntp ) .
639 1.1.1.2.4.2 snj It normally operates continuously while
640 1.1.1.2.4.2 snj monitoring for small changes in frequency and trimming the clock
641 1.1.1.2.4.2 snj for the ultimate precision.
642 1.1.1.2.4.2 snj However, it can operate in a one\-time
643 1.1.1.2.4.2 snj mode where the time is set from an external server and frequency is
644 1.1.1.2.4.2 snj set from a previously recorded frequency file.
645 1.1.1.2.4.2 snj A
646 1.1.1.2.4.2 snj broadcast/multicast or manycast client can discover remote servers,
647 1.1.1.2.4.2 snj compute server\-client propagation delay correction factors and
648 1.1.1.2.4.2 snj configure itself automatically.
649 1.1.1.2.4.2 snj This makes it possible to deploy a
650 1.1.1.2.4.2 snj fleet of workstations without specifying configuration details
651 1.1.1.2.4.2 snj specific to the local environment.
652 1.1.1.2.4.2 snj .Pp
653 1.1.1.2.4.2 snj By default,
654 1.1.1.2.4.2 snj .Nm
655 1.1.1.2.4.2 snj runs in continuous mode where each of
656 1.1.1.2.4.2 snj possibly several external servers is polled at intervals determined
657 1.1.1.2.4.2 snj by an intricate state machine.
658 1.1.1.2.4.2 snj The state machine measures the
659 1.1.1.2.4.2 snj incidental roundtrip delay jitter and oscillator frequency wander
660 1.1.1.2.4.2 snj and determines the best poll interval using a heuristic algorithm.
661 1.1.1.2.4.2 snj Ordinarily, and in most operating environments, the state machine
662 1.1.1.2.4.2 snj will start with 64s intervals and eventually increase in steps to
663 1.1.1.2.4.2 snj 1024s.
664 1.1.1.2.4.2 snj A small amount of random variation is introduced in order to
665 1.1.1.2.4.2 snj avoid bunching at the servers.
666 1.1.1.2.4.2 snj In addition, should a server become
667 1.1.1.2.4.2 snj unreachable for some time, the poll interval is increased in steps
668 1.1.1.2.4.2 snj to 1024s in order to reduce network overhead.
669 1.1.1.2.4.2 snj .Pp
670 1.1.1.2.4.2 snj In some cases it may not be practical for
671 1.1.1.2.4.2 snj .Nm
672 1.1.1.2.4.2 snj to run continuously.
673 1.1.1.2.4.2 snj A common workaround has been to run the
674 1.1.1.2.4.2 snj .Xr ntpdate 1ntpdatemdoc
675 1.1.1.2.4.2 snj or
676 1.1.1.2.4.2 snj .Xr sntp 1sntpmdoc
677 1.1.1.2.4.2 snj programs from a
678 1.1.1.2.4.2 snj .Xr cron 8
679 1.1.1.2.4.2 snj job at designated
680 1.1.1.2.4.2 snj times.
681 1.1.1.2.4.2 snj However, these programs do not have the crafted signal
682 1.1.1.2.4.2 snj processing, error checking or mitigation algorithms of
683 1.1.1.2.4.2 snj .Nm .
684 1.1.1.2.4.2 snj The
685 1.1.1.2.4.2 snj .Fl q
686 1.1.1.2.4.2 snj option is intended for this purpose.
687 1.1.1.2.4.2 snj Setting this option will cause
688 1.1.1.2.4.2 snj .Nm
689 1.1.1.2.4.2 snj to exit just after
690 1.1.1.2.4.2 snj setting the clock for the first time.
691 1.1.1.2.4.2 snj The procedure for initially
692 1.1.1.2.4.2 snj setting the clock is the same as in continuous mode; most
693 1.1.1.2.4.2 snj applications will probably want to specify the
694 1.1.1.2.4.2 snj .Cm iburst
695 1.1.1.2.4.2 snj keyword with the
696 1.1.1.2.4.2 snj .Ic server
697 1.1.1.2.4.2 snj configuration command.
698 1.1.1.2.4.2 snj With this
699 1.1.1.2.4.2 snj keyword a volley of messages are exchanged to groom the data and
700 1.1.1.2.4.2 snj the clock is set in about 10 s.
701 1.1.1.2.4.2 snj If nothing is heard after a
702 1.1.1.2.4.2 snj couple of minutes, the daemon times out and exits.
703 1.1.1.2.4.2 snj After a suitable
704 1.1.1.2.4.2 snj period of mourning, the
705 1.1.1.2.4.2 snj .Xr ntpdate 1ntpdatemdoc
706 1.1.1.2.4.2 snj program will be
707 1.1.1.2.4.2 snj retired.
708 1.1.1.2.4.2 snj .Pp
709 1.1.1.2.4.2 snj When kernel support is available to discipline the clock
710 1.1.1.2.4.2 snj frequency, which is the case for stock Solaris, Tru64, Linux and
711 1.1.1.2.4.2 snj .Fx ,
712 1.1.1.2.4.2 snj a useful feature is available to discipline the clock
713 1.1.1.2.4.2 snj frequency.
714 1.1.1.2.4.2 snj First,
715 1.1.1.2.4.2 snj .Nm
716 1.1.1.2.4.2 snj is run in continuous mode with
717 1.1.1.2.4.2 snj selected servers in order to measure and record the intrinsic clock
718 1.1.1.2.4.2 snj frequency offset in the frequency file.
719 1.1.1.2.4.2 snj It may take some hours for
720 1.1.1.2.4.2 snj the frequency and offset to settle down.
721 1.1.1.2.4.2 snj Then the
722 1.1.1.2.4.2 snj .Nm
723 1.1.1.2.4.2 snj is
724 1.1.1.2.4.2 snj stopped and run in one\-time mode as required.
725 1.1.1.2.4.2 snj At each startup, the
726 1.1.1.2.4.2 snj frequency is read from the file and initializes the kernel
727 1.1.1.2.4.2 snj frequency.
728 1.1.1.2.4.2 snj .Ss "Poll Interval Control"
729 1.1.1.2.4.2 snj This version of NTP includes an intricate state machine to
730 1.1.1.2.4.2 snj reduce the network load while maintaining a quality of
731 1.1.1.2.4.2 snj synchronization consistent with the observed jitter and wander.
732 1.1.1.2.4.2 snj There are a number of ways to tailor the operation in order enhance
733 1.1.1.2.4.2 snj accuracy by reducing the interval or to reduce network overhead by
734 1.1.1.2.4.2 snj increasing it.
735 1.1.1.2.4.2 snj However, the user is advised to carefully consider
736 1.1.1.2.4.2 snj the consequences of changing the poll adjustment range from the
737 1.1.1.2.4.2 snj default minimum of 64 s to the default maximum of 1,024 s.
738 1.1.1.2.4.2 snj The
739 1.1.1.2.4.2 snj default minimum can be changed with the
740 1.1.1.2.4.2 snj .Ic tinker
741 1.1.1.2.4.2 snj .Cm minpoll
742 1.1.1.2.4.2 snj command to a value not less than 16 s.
743 1.1.1.2.4.2 snj This value is used for all
744 1.1.1.2.4.2 snj configured associations, unless overridden by the
745 1.1.1.2.4.2 snj .Cm minpoll
746 1.1.1.2.4.2 snj option on the configuration command.
747 1.1.1.2.4.2 snj Note that most device drivers
748 1.1.1.2.4.2 snj will not operate properly if the poll interval is less than 64 s
749 1.1.1.2.4.2 snj and that the broadcast server and manycast client associations will
750 1.1.1.2.4.2 snj also use the default, unless overridden.
751 1.1.1.2.4.2 snj .Pp
752 1.1.1.2.4.2 snj In some cases involving dial up or toll services, it may be
753 1.1.1.2.4.2 snj useful to increase the minimum interval to a few tens of minutes
754 1.1.1.2.4.2 snj and maximum interval to a day or so.
755 1.1.1.2.4.2 snj Under normal operation
756 1.1.1.2.4.2 snj conditions, once the clock discipline loop has stabilized the
757 1.1.1.2.4.2 snj interval will be increased in steps from the minimum to the
758 1.1.1.2.4.2 snj maximum.
759 1.1.1.2.4.2 snj However, this assumes the intrinsic clock frequency error
760 1.1.1.2.4.2 snj is small enough for the discipline loop correct it.
761 1.1.1.2.4.2 snj The capture
762 1.1.1.2.4.2 snj range of the loop is 500 PPM at an interval of 64s decreasing by a
763 1.1.1.2.4.2 snj factor of two for each doubling of interval.
764 1.1.1.2.4.2 snj At a minimum of 1,024
765 1.1.1.2.4.2 snj s, for example, the capture range is only 31 PPM.
766 1.1.1.2.4.2 snj If the intrinsic
767 1.1.1.2.4.2 snj error is greater than this, the drift file
768 1.1.1.2.4.2 snj .Pa ntp.drift
769 1.1.1.2.4.2 snj will
770 1.1.1.2.4.2 snj have to be specially tailored to reduce the residual error below
771 1.1.1.2.4.2 snj this limit.
772 1.1.1.2.4.2 snj Once this is done, the drift file is automatically
773 1.1.1.2.4.2 snj updated once per hour and is available to initialize the frequency
774 1.1.1.2.4.2 snj on subsequent daemon restarts.
775 1.1.1.2.4.2 snj .Ss "The huff\-n'\-puff Filter"
776 1.1.1.2.4.2 snj In scenarios where a considerable amount of data are to be
777 1.1.1.2.4.2 snj downloaded or uploaded over telephone modems, timekeeping quality
778 1.1.1.2.4.2 snj can be seriously degraded.
779 1.1.1.2.4.2 snj This occurs because the differential
780 1.1.1.2.4.2 snj delays on the two directions of transmission can be quite large.
781 1.1.1.2.4.2 snj In
782 1.1.1.2.4.2 snj many cases the apparent time errors are so large as to exceed the
783 1.1.1.2.4.2 snj step threshold and a step correction can occur during and after the
784 1.1.1.2.4.2 snj data transfer is in progress.
785 1.1.1.2.4.2 snj .Pp
786 1.1.1.2.4.2 snj The huff\-n'\-puff filter is designed to correct the apparent time
787 1.1.1.2.4.2 snj offset in these cases.
788 1.1.1.2.4.2 snj It depends on knowledge of the propagation
789 1.1.1.2.4.2 snj delay when no other traffic is present.
790 1.1.1.2.4.2 snj In common scenarios this
791 1.1.1.2.4.2 snj occurs during other than work hours.
792 1.1.1.2.4.2 snj The filter maintains a shift
793 1.1.1.2.4.2 snj register that remembers the minimum delay over the most recent
794 1.1.1.2.4.2 snj interval measured usually in hours.
795 1.1.1.2.4.2 snj Under conditions of severe
796 1.1.1.2.4.2 snj delay, the filter corrects the apparent offset using the sign of
797 1.1.1.2.4.2 snj the offset and the difference between the apparent delay and
798 1.1.1.2.4.2 snj minimum delay.
799 1.1.1.2.4.2 snj The name of the filter reflects the negative (huff)
800 1.1.1.2.4.2 snj and positive (puff) correction, which depends on the sign of the
801 1.1.1.2.4.2 snj offset.
802 1.1.1.2.4.2 snj .Pp
803 1.1.1.2.4.2 snj The filter is activated by the
804 1.1.1.2.4.2 snj .Ic tinker
805 1.1.1.2.4.2 snj command and
806 1.1.1.2.4.2 snj .Cm huffpuff
807 1.1.1.2.4.2 snj keyword, as described in
808 1.1.1.2.4.2 snj .Xr ntp.conf 5 .
809 1.1.1.2.4.2 snj .Sh "ENVIRONMENT"
810 1.1.1.2.4.2 snj See \fBOPTION PRESETS\fP for configuration environment variables.
811 1.1.1.2.4.2 snj .Sh FILES
812 1.1.1.2.4.2 snj .Bl -tag -width /etc/ntp.drift -compact
813 1.1.1.2.4.2 snj .It Pa /etc/ntp.conf
814 1.1.1.2.4.2 snj the default name of the configuration file
815 1.1.1.2.4.2 snj .It Pa /etc/ntp.drift
816 1.1.1.2.4.2 snj the default name of the drift file
817 1.1.1.2.4.2 snj .It Pa /etc/ntp.keys
818 1.1.1.2.4.2 snj the default name of the key file
819 1.1.1.2.4.2 snj .El
820 1.1.1.2.4.2 snj .Sh "EXIT STATUS"
821 1.1.1.2.4.2 snj One of the following exit values will be returned:
822 1.1.1.2.4.2 snj .Bl -tag
823 1.1.1.2.4.2 snj .It 0 " (EXIT_SUCCESS)"
824 1.1.1.2.4.2 snj Successful program execution.
825 1.1.1.2.4.2 snj .It 1 " (EXIT_FAILURE)"
826 1.1.1.2.4.2 snj The operation failed or the command syntax was not valid.
827 1.1.1.2.4.2 snj .It 70 " (EX_SOFTWARE)"
828 1.1.1.2.4.2 snj libopts had an internal operational error. Please report
829 1.1.1.2.4.2 snj it to autogen\-users (a] lists.sourceforge.net. Thank you.
830 1.1.1.2.4.2 snj .El
831 1.1.1.2.4.2 snj .Sh "SEE ALSO"
832 1.1.1.2.4.2 snj .Xr ntp.conf 5 ,
833 1.1.1.2.4.2 snj .Xr ntpdate 1ntpdatemdoc ,
834 1.1.1.2.4.2 snj .Xr ntpdc 1ntpdcmdoc ,
835 1.1.1.2.4.2 snj .Xr ntpq 1ntpqmdoc ,
836 1.1.1.2.4.2 snj .Xr sntp 1sntpmdoc
837 1.1.1.2.4.2 snj .Pp
838 1.1.1.2.4.2 snj In addition to the manual pages provided,
839 1.1.1.2.4.2 snj comprehensive documentation is available on the world wide web
840 1.1.1.2.4.2 snj at
841 1.1.1.2.4.2 snj .Li http://www.ntp.org/ .
842 1.1.1.2.4.2 snj A snapshot of this documentation is available in HTML format in
843 1.1.1.2.4.2 snj .Pa /usr/share/doc/ntp .
844 1.1.1.2.4.2 snj .Rs
845 1.1.1.2.4.2 snj .%A David L. Mills
846 1.1.1.2.4.2 snj .%T Network Time Protocol (Version 1)
847 1.1.1.2.4.2 snj .%O RFC1059
848 1.1.1.2.4.2 snj .Re
849 1.1.1.2.4.2 snj .Rs
850 1.1.1.2.4.2 snj .%A David L. Mills
851 1.1.1.2.4.2 snj .%T Network Time Protocol (Version 2)
852 1.1.1.2.4.2 snj .%O RFC1119
853 1.1.1.2.4.2 snj .Re
854 1.1.1.2.4.2 snj .Rs
855 1.1.1.2.4.2 snj .%A David L. Mills
856 1.1.1.2.4.2 snj .%T Network Time Protocol (Version 3)
857 1.1.1.2.4.2 snj .%O RFC1305
858 1.1.1.2.4.2 snj .Re
859 1.1.1.2.4.2 snj .Rs
860 1.1.1.2.4.2 snj .%A David L. Mills
861 1.1.1.2.4.2 snj .%A J. Martin, Ed.
862 1.1.1.2.4.2 snj .%A J. Burbank
863 1.1.1.2.4.2 snj .%A W. Kasch
864 1.1.1.2.4.2 snj .%T Network Time Protocol Version 4: Protocol and Algorithms Specification
865 1.1.1.2.4.2 snj .%O RFC5905
866 1.1.1.2.4.2 snj .Re
867 1.1.1.2.4.2 snj .Rs
868 1.1.1.2.4.2 snj .%A David L. Mills
869 1.1.1.2.4.2 snj .%A B. Haberman, Ed.
870 1.1.1.2.4.2 snj .%T Network Time Protocol Version 4: Autokey Specification
871 1.1.1.2.4.2 snj .%O RFC5906
872 1.1.1.2.4.2 snj .Re
873 1.1.1.2.4.2 snj .Rs
874 1.1.1.2.4.2 snj .%A H. Gerstung
875 1.1.1.2.4.2 snj .%A C. Elliott
876 1.1.1.2.4.2 snj .%A B. Haberman, Ed.
877 1.1.1.2.4.2 snj .%T Definitions of Managed Objects for Network Time Protocol Version 4: (NTPv4)
878 1.1.1.2.4.2 snj .%O RFC5907
879 1.1.1.2.4.2 snj .Re
880 1.1.1.2.4.2 snj .Rs
881 1.1.1.2.4.2 snj .%A R. Gayraud
882 1.1.1.2.4.2 snj .%A B. Lourdelet
883 1.1.1.2.4.2 snj .%T Network Time Protocol (NTP) Server Option for DHCPv6
884 1.1.1.2.4.2 snj .%O RFC5908
885 1.1.1.2.4.2 snj .Re
886 1.1.1.2.4.2 snj .Sh "AUTHORS"
887 1.1.1.2.4.3 snj The University of Delaware and Network Time Foundation
888 1.1.1.2.4.2 snj .Sh "COPYRIGHT"
889 1.1.1.2.4.3 snj Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
890 1.1.1.2.4.2 snj This program is released under the terms of the NTP license, <http://ntp.org/license>.
891 1.1.1.2.4.2 snj .Sh BUGS
892 1.1.1.2.4.2 snj The
893 1.1.1.2.4.2 snj .Nm
894 1.1.1.2.4.2 snj utility has gotten rather fat.
895 1.1.1.2.4.2 snj While not huge, it has gotten
896 1.1.1.2.4.2 snj larger than might be desirable for an elevated\-priority
897 1.1.1.2.4.2 snj .Nm
898 1.1.1.2.4.2 snj running on a workstation, particularly since many of
899 1.1.1.2.4.2 snj the fancy features which consume the space were designed more with
900 1.1.1.2.4.2 snj a busy primary server, rather than a high stratum workstation in
901 1.1.1.2.4.2 snj mind.
902 1.1.1.2.4.2 snj .Pp
903 1.1.1.2.4.2 snj Please send bug reports to: http://bugs.ntp.org, bugs (a] ntp.org
904 1.1.1.2.4.2 snj .Sh NOTES
905 1.1.1.2.4.2 snj Portions of this document came from FreeBSD.
906 1.1.1.2.4.2 snj .Pp
907 1.1.1.2.4.2 snj This manual page was \fIAutoGen\fP\-erated from the \fBntpd\fP
908 1.1.1.2.4.2 snj option definitions.
909