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