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