xref: /freebsd/contrib/ntp/ntpd/ntpd.1ntpdmdoc (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1*f5f40dd6SCy Schubert.Dd May 25 2024
22b15cb3dSCy Schubert.Dt NTPD 1ntpdmdoc User Commands
32b15cb3dSCy Schubert.Os
42b15cb3dSCy Schubert.\"  EDIT THIS FILE WITH CAUTION  (ntpd-opts.mdoc)
52b15cb3dSCy Schubert.\"
6*f5f40dd6SCy Schubert.\"  It has been AutoGen-ed  May 25, 2024 at 12:03:54 AM by AutoGen 5.18.16
72b15cb3dSCy Schubert.\"  From the definitions    ntpd-opts.def
82b15cb3dSCy Schubert.\"  and the template file   agmdoc-cmd.tpl
92b15cb3dSCy Schubert.Sh NAME
102b15cb3dSCy Schubert.Nm ntpd
112b15cb3dSCy Schubert.Nd NTP daemon program
122b15cb3dSCy Schubert.Sh SYNOPSIS
132b15cb3dSCy Schubert.Nm
142b15cb3dSCy Schubert.\" Mixture of short (flag) options and long options
152b15cb3dSCy Schubert.Op Fl flags
162b15cb3dSCy Schubert.Op Fl flag Op Ar value
172b15cb3dSCy Schubert.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
182b15cb3dSCy Schubert[ <server1> ... <serverN> ]
192b15cb3dSCy Schubert.Pp
202b15cb3dSCy Schubert.Sh DESCRIPTION
212b15cb3dSCy SchubertThe
222b15cb3dSCy Schubert.Nm
232b15cb3dSCy Schubertutility is an operating system daemon which sets
242b15cb3dSCy Schubertand maintains the system time of day in synchronism with Internet
252b15cb3dSCy Schubertstandard time servers.
262b15cb3dSCy SchubertIt is a complete implementation of the
272b15cb3dSCy SchubertNetwork Time Protocol (NTP) version 4, as defined by RFC\-5905,
282b15cb3dSCy Schubertbut also retains compatibility with
292b15cb3dSCy Schubertversion 3, as defined by RFC\-1305, and versions 1
302b15cb3dSCy Schubertand 2, as defined by RFC\-1059 and RFC\-1119, respectively.
312b15cb3dSCy Schubert.Pp
322b15cb3dSCy SchubertThe
332b15cb3dSCy Schubert.Nm
342b15cb3dSCy Schubertutility does most computations in 64\-bit floating point
352b15cb3dSCy Schubertarithmetic and does relatively clumsy 64\-bit fixed point operations
362b15cb3dSCy Schubertonly when necessary to preserve the ultimate precision, about 232
372b15cb3dSCy Schubertpicoseconds.
382b15cb3dSCy SchubertWhile the ultimate precision is not achievable with
392b15cb3dSCy Schubertordinary workstations and networks of today, it may be required
402b15cb3dSCy Schubertwith future gigahertz CPU clocks and gigabit LANs.
412b15cb3dSCy Schubert.Pp
422b15cb3dSCy SchubertOrdinarily,
432b15cb3dSCy Schubert.Nm
442b15cb3dSCy Schubertreads the
452b15cb3dSCy Schubert.Xr ntp.conf 5
462b15cb3dSCy Schubertconfiguration file at startup time in order to determine the
472b15cb3dSCy Schubertsynchronization sources and operating modes.
482b15cb3dSCy SchubertIt is also possible to
492b15cb3dSCy Schubertspecify a working, although limited, configuration entirely on the
502b15cb3dSCy Schubertcommand line, obviating the need for a configuration file.
512b15cb3dSCy SchubertThis may
522b15cb3dSCy Schubertbe particularly useful when the local host is to be configured as a
532b15cb3dSCy Schubertbroadcast/multicast client, with all peers being determined by
542b15cb3dSCy Schubertlistening to broadcasts at run time.
552b15cb3dSCy Schubert.Pp
562b15cb3dSCy SchubertIf NetInfo support is built into
572b15cb3dSCy Schubert.Nm ,
582b15cb3dSCy Schubertthen
592b15cb3dSCy Schubert.Nm
602b15cb3dSCy Schubertwill attempt to read its configuration from the
612b15cb3dSCy SchubertNetInfo if the default
622b15cb3dSCy Schubert.Xr ntp.conf 5
632b15cb3dSCy Schubertfile cannot be read and no file is
642b15cb3dSCy Schubertspecified by the
652b15cb3dSCy Schubert.Fl c
662b15cb3dSCy Schubertoption.
672b15cb3dSCy Schubert.Pp
682b15cb3dSCy SchubertVarious internal
692b15cb3dSCy Schubert.Nm
702b15cb3dSCy Schubertvariables can be displayed and
712b15cb3dSCy Schubertconfiguration options altered while the
722b15cb3dSCy Schubert.Nm
732b15cb3dSCy Schubertis running
742b15cb3dSCy Schubertusing the
752b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc
762b15cb3dSCy Schubertand
772b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc
782b15cb3dSCy Schubertutility programs.
792b15cb3dSCy Schubert.Pp
802b15cb3dSCy SchubertWhen
812b15cb3dSCy Schubert.Nm
822b15cb3dSCy Schubertstarts it looks at the value of
832b15cb3dSCy Schubert.Xr umask 2 ,
842b15cb3dSCy Schubertand if zero
852b15cb3dSCy Schubert.Nm
862b15cb3dSCy Schubertwill set the
872b15cb3dSCy Schubert.Xr umask 2
882b15cb3dSCy Schubertto 022.
892b15cb3dSCy Schubert.Sh "OPTIONS"
902b15cb3dSCy Schubert.Bl -tag
912b15cb3dSCy Schubert.It  Fl 4 , Fl \-ipv4
922b15cb3dSCy SchubertForce IPv4 DNS name resolution.
932b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
942b15cb3dSCy Schubertipv6.
952b15cb3dSCy Schubert.sp
962b15cb3dSCy SchubertForce DNS resolution of following host names on the command line
972b15cb3dSCy Schubertto the IPv4 namespace.
982b15cb3dSCy Schubert.It  Fl 6 , Fl \-ipv6
992b15cb3dSCy SchubertForce IPv6 DNS name resolution.
1002b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
1012b15cb3dSCy Schubertipv4.
1022b15cb3dSCy Schubert.sp
1032b15cb3dSCy SchubertForce DNS resolution of following host names on the command line
1042b15cb3dSCy Schubertto the IPv6 namespace.
1052b15cb3dSCy Schubert.It  Fl a , Fl \-authreq
1062b15cb3dSCy SchubertRequire crypto authentication.
1072b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
1082b15cb3dSCy Schubertauthnoreq.
1092b15cb3dSCy Schubert.sp
1102b15cb3dSCy SchubertRequire cryptographic authentication for broadcast client,
1112b15cb3dSCy Schubertmulticast client and symmetric passive associations.
1122b15cb3dSCy SchubertThis is the default.
1132b15cb3dSCy Schubert.It  Fl A , Fl \-authnoreq
1142b15cb3dSCy SchubertDo not require crypto authentication.
1152b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
1162b15cb3dSCy Schubertauthreq.
1172b15cb3dSCy Schubert.sp
1182b15cb3dSCy SchubertDo not require cryptographic authentication for broadcast client,
1192b15cb3dSCy Schubertmulticast client and symmetric passive associations.
1202b15cb3dSCy SchubertThis is almost never a good idea.
1212b15cb3dSCy Schubert.It  Fl b , Fl \-bcastsync
1222b15cb3dSCy SchubertAllow us to sync to broadcast servers.
1232b15cb3dSCy Schubert.sp
1242b15cb3dSCy Schubert.It  Fl c Ar string , Fl \-configfile Ns = Ns Ar string
1252b15cb3dSCy Schubertconfiguration file name.
1262b15cb3dSCy Schubert.sp
1272b15cb3dSCy SchubertThe name and path of the configuration file,
1282b15cb3dSCy Schubert\fI/etc/ntp.conf\fP
1292b15cb3dSCy Schubertby default.
1302b15cb3dSCy Schubert.It  Fl d , Fl \-debug\-level
1312b15cb3dSCy SchubertIncrease debug verbosity level.
1322b15cb3dSCy SchubertThis option may appear an unlimited number of times.
1332b15cb3dSCy Schubert.sp
1342b15cb3dSCy Schubert.It  Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
1352b15cb3dSCy SchubertSet the debug verbosity level.
1362b15cb3dSCy SchubertThis option may appear an unlimited number of times.
1372b15cb3dSCy SchubertThis option takes an integer number as its argument.
1382b15cb3dSCy Schubert.sp
1392b15cb3dSCy Schubert.It  Fl f Ar string , Fl \-driftfile Ns = Ns Ar string
1402b15cb3dSCy Schubertfrequency drift file name.
1412b15cb3dSCy Schubert.sp
1422b15cb3dSCy SchubertThe name and path of the frequency file,
1432b15cb3dSCy Schubert\fI/etc/ntp.drift\fP
1442b15cb3dSCy Schubertby default.
1452b15cb3dSCy SchubertThis is the same operation as the
1462b15cb3dSCy Schubert\fBdriftfile\fP \fIdriftfile\fP
1472b15cb3dSCy Schubertconfiguration specification in the
1482b15cb3dSCy Schubert\fI/etc/ntp.conf\fP
1492b15cb3dSCy Schubertfile.
1502b15cb3dSCy Schubert.It  Fl g , Fl \-panicgate
1512b15cb3dSCy SchubertAllow the first adjustment to be Big.
1522b15cb3dSCy SchubertThis option may appear an unlimited number of times.
1532b15cb3dSCy Schubert.sp
1542b15cb3dSCy SchubertNormally,
1552b15cb3dSCy Schubert\fBntpd\fP
1562b15cb3dSCy Schubertexits 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,
1572b15cb3dSCy Schubert\fBntpd\fP
1582b15cb3dSCy Schubertwill exit with a message to the system log. This option can be used with the
1592b15cb3dSCy Schubert\fB\-q\fP
1602b15cb3dSCy Schubertand
1612b15cb3dSCy Schubert\fB\-x\fP
1622b15cb3dSCy Schubertoptions.
1632b15cb3dSCy SchubertSee the
1642b15cb3dSCy Schubert\fBtinker\fP
1652b15cb3dSCy Schubertconfiguration file directive for other options.
166a25439b6SCy Schubert.It  Fl G , Fl \-force\-step\-once
167a25439b6SCy SchubertStep any initial offset correction..
168a25439b6SCy Schubert.sp
169a25439b6SCy SchubertNormally,
170a25439b6SCy Schubert\fBntpd\fP
171a25439b6SCy Schubertsteps the time if the time offset exceeds the step threshold,
172a25439b6SCy Schubertwhich is 128 ms by default, and otherwise slews the time.
173a25439b6SCy SchubertThis option forces the initial offset correction to be stepped,
174a25439b6SCy Schubertso the highest time accuracy can be achieved quickly.
175a25439b6SCy SchubertHowever, this may also cause the time to be stepped back
176a25439b6SCy Schubertso this option must not be used if
177a25439b6SCy Schubertapplications requiring monotonic time are running.
178a25439b6SCy SchubertSee the \fBtinker\fP configuration file directive for other options.
1792b15cb3dSCy Schubert.It  Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
1802b15cb3dSCy SchubertJail directory.
1812b15cb3dSCy Schubert.sp
1822b15cb3dSCy SchubertChroot the server to the directory
1832b15cb3dSCy Schubert\fIjaildir\fP
1842b15cb3dSCy Schubert.
1852b15cb3dSCy SchubertThis option also implies that the server attempts to drop root privileges at startup.
1862b15cb3dSCy SchubertYou may need to also specify a
1872b15cb3dSCy Schubert\fB\-u\fP
1882b15cb3dSCy Schubertoption.
1892b15cb3dSCy SchubertThis option is only available if the OS supports adjusting the clock
1902b15cb3dSCy Schubertwithout full root privileges.
1912b15cb3dSCy SchubertThis option is supported under NetBSD (configure with
1922b15cb3dSCy Schubert\fB\-\-enable\-clockctl\fP) or Linux (configure with
1932b15cb3dSCy Schubert\fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
1942b15cb3dSCy Schubert.It  Fl I Ar iface , Fl \-interface Ns = Ns Ar iface
1952b15cb3dSCy SchubertListen on an interface name or address.
1962b15cb3dSCy SchubertThis option may appear an unlimited number of times.
1972b15cb3dSCy Schubert.sp
1982b15cb3dSCy SchubertOpen the network address given, or all the addresses associated with the
1992b15cb3dSCy Schubertgiven interface name.  This option may appear multiple times.  This option
2002b15cb3dSCy Schubertalso implies not opening other addresses, except wildcard and localhost.
2012b15cb3dSCy SchubertThis option is deprecated. Please consider using the configuration file
2022b15cb3dSCy Schubert\fBinterface\fP command, which is more versatile.
2032b15cb3dSCy Schubert.It  Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
2042b15cb3dSCy Schubertpath to symmetric keys.
2052b15cb3dSCy Schubert.sp
2062b15cb3dSCy SchubertSpecify the name and path of the symmetric key file.
2072b15cb3dSCy Schubert\fI/etc/ntp.keys\fP
2082b15cb3dSCy Schubertis the default.
2092b15cb3dSCy SchubertThis is the same operation as the
2102b15cb3dSCy Schubert\fBkeys\fP \fIkeyfile\fP
2112b15cb3dSCy Schubertconfiguration file directive.
2122b15cb3dSCy Schubert.It  Fl l Ar string , Fl \-logfile Ns = Ns Ar string
2132b15cb3dSCy Schubertpath to the log file.
2142b15cb3dSCy Schubert.sp
2152b15cb3dSCy SchubertSpecify the name and path of the log file.
2162b15cb3dSCy SchubertThe default is the system log file.
2172b15cb3dSCy SchubertThis is the same operation as the
2182b15cb3dSCy Schubert\fBlogfile\fP \fIlogfile\fP
2192b15cb3dSCy Schubertconfiguration file directive.
2202b15cb3dSCy Schubert.It  Fl L , Fl \-novirtualips
2212b15cb3dSCy SchubertDo not listen to virtual interfaces.
2222b15cb3dSCy Schubert.sp
2232b15cb3dSCy SchubertDo not listen to virtual interfaces, defined as those with
2242b15cb3dSCy Schubertnames containing a colon.  This option is deprecated.  Please
2252b15cb3dSCy Schubertconsider using the configuration file \fBinterface\fP command, which
2262b15cb3dSCy Schubertis more versatile.
2272b15cb3dSCy Schubert.It  Fl M , Fl \-modifymmtimer
2282b15cb3dSCy SchubertModify Multimedia Timer (Windows only).
2292b15cb3dSCy Schubert.sp
2302b15cb3dSCy SchubertSet the Windows Multimedia Timer to highest resolution.  This
2312b15cb3dSCy Schubertensures the resolution does not change while ntpd is running,
2322b15cb3dSCy Schubertavoiding timekeeping glitches associated with changes.
2332b15cb3dSCy Schubert.It  Fl n , Fl \-nofork
2342b15cb3dSCy SchubertDo not fork.
2352b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
2362b15cb3dSCy Schubertwait\-sync.
2372b15cb3dSCy Schubert.sp
2382b15cb3dSCy Schubert.It  Fl N , Fl \-nice
2392b15cb3dSCy SchubertRun at high priority.
2402b15cb3dSCy Schubert.sp
2412b15cb3dSCy SchubertTo the extent permitted by the operating system, run
2422b15cb3dSCy Schubert\fBntpd\fP
2432b15cb3dSCy Schubertat the highest priority.
2442b15cb3dSCy Schubert.It  Fl p Ar string , Fl \-pidfile Ns = Ns Ar string
2452b15cb3dSCy Schubertpath to the PID file.
2462b15cb3dSCy Schubert.sp
2472b15cb3dSCy SchubertSpecify the name and path of the file used to record
2482b15cb3dSCy Schubert\fBntpd\fP's
2492b15cb3dSCy Schubertprocess ID.
2502b15cb3dSCy SchubertThis is the same operation as the
2512b15cb3dSCy Schubert\fBpidfile\fP \fIpidfile\fP
2522b15cb3dSCy Schubertconfiguration file directive.
2532b15cb3dSCy Schubert.It  Fl P Ar number , Fl \-priority Ns = Ns Ar number
2542b15cb3dSCy SchubertProcess priority.
2552b15cb3dSCy SchubertThis option takes an integer number as its argument.
2562b15cb3dSCy Schubert.sp
2572b15cb3dSCy SchubertTo the extent permitted by the operating system, run
2582b15cb3dSCy Schubert\fBntpd\fP
2592b15cb3dSCy Schubertat the specified
2602b15cb3dSCy Schubert\fBsched_setscheduler(SCHED_FIFO)\fP
2612b15cb3dSCy Schubertpriority.
2622b15cb3dSCy Schubert.It  Fl q , Fl \-quit
2632b15cb3dSCy SchubertSet the time and quit.
2642b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
2652b15cb3dSCy Schubertsaveconfigquit, wait\-sync.
2662b15cb3dSCy Schubert.sp
2672b15cb3dSCy Schubert\fBntpd\fP
2682b15cb3dSCy Schubertwill not daemonize and will exit after the clock is first
2692b15cb3dSCy Schubertsynchronized.  This behavior mimics that of the
2702b15cb3dSCy Schubert\fBntpdate\fP
2712b15cb3dSCy Schubertprogram, which will soon be replaced with a shell script.
2722b15cb3dSCy SchubertThe
2732b15cb3dSCy Schubert\fB\-g\fP
2742b15cb3dSCy Schubertand
2752b15cb3dSCy Schubert\fB\-x\fP
2762b15cb3dSCy Schubertoptions can be used with this option.
2772b15cb3dSCy SchubertNote: The kernel time discipline is disabled with this option.
2782b15cb3dSCy Schubert.It  Fl r Ar string , Fl \-propagationdelay Ns = Ns Ar string
2792b15cb3dSCy SchubertBroadcast/propagation delay.
2802b15cb3dSCy Schubert.sp
2812b15cb3dSCy SchubertSpecify 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.
2822b15cb3dSCy Schubert.It  Fl \-saveconfigquit  Ns = Ns Ar string
2832b15cb3dSCy SchubertSave parsed configuration and quit.
2842b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
2852b15cb3dSCy Schubertquit, wait\-sync.
2862b15cb3dSCy Schubert.sp
2872b15cb3dSCy SchubertCause \fBntpd\fP to parse its startup configuration file and save an
2882b15cb3dSCy Schubertequivalent to the given filename and exit.  This option was
2892b15cb3dSCy Schubertdesigned for automated testing.
2902b15cb3dSCy Schubert.It  Fl s Ar string , Fl \-statsdir Ns = Ns Ar string
2912b15cb3dSCy SchubertStatistics file location.
2922b15cb3dSCy Schubert.sp
2932b15cb3dSCy SchubertSpecify the directory path for files created by the statistics facility.
2942b15cb3dSCy SchubertThis is the same operation as the
2952b15cb3dSCy Schubert\fBstatsdir\fP \fIstatsdir\fP
2962b15cb3dSCy Schubertconfiguration file directive.
2972b15cb3dSCy Schubert.It  Fl t Ar tkey , Fl \-trustedkey Ns = Ns Ar tkey
2982b15cb3dSCy SchubertTrusted key number.
2992b15cb3dSCy SchubertThis option may appear an unlimited number of times.
3002b15cb3dSCy Schubert.sp
3012b15cb3dSCy SchubertAdd the specified key number to the trusted key list.
3022b15cb3dSCy Schubert.It  Fl u Ar string , Fl \-user Ns = Ns Ar string
3032b15cb3dSCy SchubertRun as userid (or userid:groupid).
3042b15cb3dSCy Schubert.sp
3052b15cb3dSCy SchubertSpecify a user, and optionally a group, to switch to.
3062b15cb3dSCy SchubertThis option is only available if the OS supports adjusting the clock
3072b15cb3dSCy Schubertwithout full root privileges.
3082b15cb3dSCy SchubertThis option is supported under NetBSD (configure with
3092b15cb3dSCy Schubert\fB\-\-enable\-clockctl\fP) or Linux (configure with
3102b15cb3dSCy Schubert\fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
3112b15cb3dSCy Schubert.It  Fl U Ar number , Fl \-updateinterval Ns = Ns Ar number
3122b15cb3dSCy Schubertinterval in seconds between scans for new or dropped interfaces.
3132b15cb3dSCy SchubertThis option takes an integer number as its argument.
3142b15cb3dSCy Schubert.sp
3152b15cb3dSCy SchubertGive the time in seconds between two scans for new or dropped interfaces.
3162b15cb3dSCy SchubertFor systems with routing socket support the scans will be performed shortly after the interface change
3172b15cb3dSCy Schuberthas been detected by the system.
3182b15cb3dSCy SchubertUse 0 to disable scanning. 60 seconds is the minimum time between scans.
3192b15cb3dSCy Schubert.It  Fl \-var  Ns = Ns Ar nvar
3202b15cb3dSCy Schubertmake ARG an ntp variable (RW).
3212b15cb3dSCy SchubertThis option may appear an unlimited number of times.
3222b15cb3dSCy Schubert.sp
3232b15cb3dSCy Schubert.It  Fl \-dvar  Ns = Ns Ar ndvar
3242b15cb3dSCy Schubertmake ARG an ntp variable (RW|DEF).
3252b15cb3dSCy SchubertThis option may appear an unlimited number of times.
3262b15cb3dSCy Schubert.sp
3272b15cb3dSCy Schubert.It  Fl w Ar number , Fl \-wait\-sync Ns = Ns Ar number
3282b15cb3dSCy SchubertSeconds to wait for first clock sync.
3292b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
3302b15cb3dSCy Schubertnofork, quit, saveconfigquit.
3312b15cb3dSCy SchubertThis option takes an integer number as its argument.
3322b15cb3dSCy Schubert.sp
3332b15cb3dSCy SchubertIf greater than zero, alters \fBntpd\fP's behavior when forking to
3342b15cb3dSCy Schubertdaemonize.  Instead of exiting with status 0 immediately after
3352b15cb3dSCy Schubertthe fork, the parent waits up to the specified number of
3362b15cb3dSCy Schubertseconds for the child to first synchronize the clock.  The exit
3372b15cb3dSCy Schubertstatus is zero (success) if the clock was synchronized,
3382b15cb3dSCy Schubertotherwise it is \fBETIMEDOUT\fP.
3392b15cb3dSCy SchubertThis provides the option for a script starting \fBntpd\fP to easily
3402b15cb3dSCy Schubertwait for the first set of the clock before proceeding.
3412b15cb3dSCy Schubert.It  Fl x , Fl \-slew
3422b15cb3dSCy SchubertSlew up to 600 seconds.
3432b15cb3dSCy Schubert.sp
3442b15cb3dSCy SchubertNormally, 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.
3452b15cb3dSCy SchubertThis option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
3462b15cb3dSCy SchubertNote: 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.
3472b15cb3dSCy SchubertThus, an adjustment as much as 600 s will take almost 14 days to complete.
3482b15cb3dSCy SchubertThis option can be used with the
3492b15cb3dSCy Schubert\fB\-g\fP
3502b15cb3dSCy Schubertand
3512b15cb3dSCy Schubert\fB\-q\fP
3522b15cb3dSCy Schubertoptions.
3532b15cb3dSCy SchubertSee the
3542b15cb3dSCy Schubert\fBtinker\fP
3552b15cb3dSCy Schubertconfiguration file directive for other options.
3562b15cb3dSCy SchubertNote: The kernel time discipline is disabled with this option.
3572b15cb3dSCy Schubert.It  Fl \-usepcc
3582b15cb3dSCy SchubertUse CPU cycle counter (Windows only).
3592b15cb3dSCy Schubert.sp
3602b15cb3dSCy SchubertAttempt to substitute the CPU counter for \fBQueryPerformanceCounter\fP.
3612b15cb3dSCy SchubertThe CPU counter and \fBQueryPerformanceCounter\fP are compared, and if
3622b15cb3dSCy Schubertthey have the same frequency, the CPU counter (RDTSC on x86) is
3632b15cb3dSCy Schubertused directly, saving the overhead of a system call.
3642b15cb3dSCy Schubert.It  Fl \-pccfreq  Ns = Ns Ar string
3652b15cb3dSCy SchubertForce CPU cycle counter use (Windows only).
3662b15cb3dSCy Schubert.sp
3672b15cb3dSCy SchubertForce substitution the CPU counter for \fBQueryPerformanceCounter\fP.
3682b15cb3dSCy SchubertThe CPU counter (RDTSC on x86) is used unconditionally with the
3692b15cb3dSCy Schubertgiven frequency (in Hz).
3702b15cb3dSCy Schubert.It  Fl m , Fl \-mdns
3712b15cb3dSCy SchubertRegister with mDNS as a NTP server.
3722b15cb3dSCy Schubert.sp
3732b15cb3dSCy SchubertRegisters as an NTP server with the local mDNS server which allows
3742b15cb3dSCy Schubertthe server to be discovered via mDNS client lookup.
3752b15cb3dSCy Schubert.It Fl \&? , Fl \-help
3762b15cb3dSCy SchubertDisplay usage information and exit.
3772b15cb3dSCy Schubert.It Fl \&! , Fl \-more\-help
3782b15cb3dSCy SchubertPass the extended usage information through a pager.
3792b15cb3dSCy Schubert.It Fl \-version Op Brq Ar v|c|n
3802b15cb3dSCy SchubertOutput version of program and exit.  The default mode is `v', a simple
3812b15cb3dSCy Schubertversion.  The `c' mode will print copyright information and `n' will
3822b15cb3dSCy Schubertprint the full copyright notice.
3832b15cb3dSCy Schubert.El
3842b15cb3dSCy Schubert.Sh "OPTION PRESETS"
3852b15cb3dSCy SchubertAny option that is not marked as \fInot presettable\fP may be preset
3862b15cb3dSCy Schubertby loading values from environment variables named:
3872b15cb3dSCy Schubert.nf
3882b15cb3dSCy Schubert  \fBNTPD_<option\-name>\fP or \fBNTPD\fP
3892b15cb3dSCy Schubert.fi
3902b15cb3dSCy Schubert.ad
3912b15cb3dSCy Schubert.Sh USAGE
3922b15cb3dSCy Schubert.Ss "How NTP Operates"
3932b15cb3dSCy SchubertThe
3942b15cb3dSCy Schubert.Nm
3952b15cb3dSCy Schubertutility operates by exchanging messages with
3962b15cb3dSCy Schubertone or more configured servers over a range of designated poll intervals.
3972b15cb3dSCy SchubertWhen
3982b15cb3dSCy Schubertstarted, whether for the first or subsequent times, the program
3992b15cb3dSCy Schubertrequires several exchanges from the majority of these servers so
4002b15cb3dSCy Schubertthe signal processing and mitigation algorithms can accumulate and
4012b15cb3dSCy Schubertgroom the data and set the clock.
4022b15cb3dSCy SchubertIn order to protect the network
4032b15cb3dSCy Schubertfrom bursts, the initial poll interval for each server is delayed
4042b15cb3dSCy Schubertan interval randomized over a few seconds.
4052b15cb3dSCy SchubertAt the default initial poll
4062b15cb3dSCy Schubertinterval of 64s, several minutes can elapse before the clock is
4072b15cb3dSCy Schubertset.
4082b15cb3dSCy SchubertThis initial delay to set the clock
4092b15cb3dSCy Schubertcan be safely and dramatically reduced using the
4102b15cb3dSCy Schubert.Cm iburst
4112b15cb3dSCy Schubertkeyword with the
4122b15cb3dSCy Schubert.Ic server
4132b15cb3dSCy Schubertconfiguration
4142b15cb3dSCy Schubertcommand, as described in
4152b15cb3dSCy Schubert.Xr ntp.conf 5 .
4162b15cb3dSCy Schubert.Pp
4172b15cb3dSCy SchubertMost operating systems and hardware of today incorporate a
4182b15cb3dSCy Schuberttime\-of\-year (TOY) chip to maintain the time during periods when
4192b15cb3dSCy Schubertthe power is off.
4202b15cb3dSCy SchubertWhen the machine is booted, the chip is used to
4212b15cb3dSCy Schubertinitialize the operating system time.
4222b15cb3dSCy SchubertAfter the machine has
4232b15cb3dSCy Schubertsynchronized to a NTP server, the operating system corrects the
4242b15cb3dSCy Schubertchip from time to time.
4252b15cb3dSCy SchubertIn the default case, if
4262b15cb3dSCy Schubert.Nm
4272b15cb3dSCy Schubertdetects that the time on the host
4282b15cb3dSCy Schubertis more than 1000s from the server time,
4292b15cb3dSCy Schubert.Nm
4302b15cb3dSCy Schubertassumes something must be terribly wrong and the only
4312b15cb3dSCy Schubertreliable action is for the operator to intervene and set the clock
4322b15cb3dSCy Schubertby hand.
4332b15cb3dSCy Schubert(Reasons for this include there is no TOY chip,
4342b15cb3dSCy Schubertor its battery is dead, or that the TOY chip is just of poor quality.)
4352b15cb3dSCy SchubertThis causes
4362b15cb3dSCy Schubert.Nm
4372b15cb3dSCy Schubertto exit with a panic message to
4382b15cb3dSCy Schubertthe system log.
4392b15cb3dSCy SchubertThe
4402b15cb3dSCy Schubert.Fl g
4412b15cb3dSCy Schubertoption overrides this check and the
4422b15cb3dSCy Schubertclock will be set to the server time regardless of the chip time
4432b15cb3dSCy Schubert(up to 68 years in the past or future \(em
4442b15cb3dSCy Schubertthis is a limitation of the NTPv4 protocol).
4452b15cb3dSCy SchubertHowever, and to protect against broken hardware, such as when the
4462b15cb3dSCy SchubertCMOS battery fails or the clock counter becomes defective, once the
4472b15cb3dSCy Schubertclock has been set an error greater than 1000s will cause
4482b15cb3dSCy Schubert.Nm
4492b15cb3dSCy Schubertto exit anyway.
4502b15cb3dSCy Schubert.Pp
4512b15cb3dSCy SchubertUnder ordinary conditions,
4522b15cb3dSCy Schubert.Nm
4532b15cb3dSCy Schubertadjusts the clock in
4542b15cb3dSCy Schubertsmall steps so that the timescale is effectively continuous and
4552b15cb3dSCy Schubertwithout discontinuities.
4562b15cb3dSCy SchubertUnder conditions of extreme network
4572b15cb3dSCy Schubertcongestion, the roundtrip delay jitter can exceed three seconds and
4582b15cb3dSCy Schubertthe synchronization distance, which is equal to one\-half the
4592b15cb3dSCy Schubertroundtrip delay plus error budget terms, can become very large.
4602b15cb3dSCy SchubertThe
4612b15cb3dSCy Schubert.Nm
4622b15cb3dSCy Schubertalgorithms discard sample offsets exceeding 128 ms,
4632b15cb3dSCy Schubertunless the interval during which no sample offset is less than 128
4642b15cb3dSCy Schubertms exceeds 900s.
4652b15cb3dSCy SchubertThe first sample after that, no matter what the
4662b15cb3dSCy Schubertoffset, steps the clock to the indicated time.
4672b15cb3dSCy SchubertIn practice this
4682b15cb3dSCy Schubertreduces the false alarm rate where the clock is stepped in error to
4692b15cb3dSCy Schuberta vanishingly low incidence.
4702b15cb3dSCy Schubert.Pp
4712b15cb3dSCy SchubertAs the result of this behavior, once the clock has been set it
4722b15cb3dSCy Schubertvery rarely strays more than 128 ms even under extreme cases of
4732b15cb3dSCy Schubertnetwork path congestion and jitter.
4742b15cb3dSCy SchubertSometimes, in particular when
4752b15cb3dSCy Schubert.Nm
4762b15cb3dSCy Schubertis first started without a valid drift file
4772b15cb3dSCy Schuberton a system with a large intrinsic drift
4782b15cb3dSCy Schubertthe error might grow to exceed 128 ms,
4792b15cb3dSCy Schubertwhich would cause the clock to be set backwards
4802b15cb3dSCy Schubertif the local clock time is more than 128 s
4812b15cb3dSCy Schubertin the future relative to the server.
4822b15cb3dSCy SchubertIn some applications, this behavior may be unacceptable.
4832b15cb3dSCy SchubertThere are several solutions, however.
4842b15cb3dSCy SchubertIf the
4852b15cb3dSCy Schubert.Fl x
4862b15cb3dSCy Schubertoption is included on the command line, the clock will
4872b15cb3dSCy Schubertnever be stepped and only slew corrections will be used.
4882b15cb3dSCy SchubertBut this choice comes with a cost that
4892b15cb3dSCy Schubertshould be carefully explored before deciding to use
4902b15cb3dSCy Schubertthe
4912b15cb3dSCy Schubert.Fl x
4922b15cb3dSCy Schubertoption.
4932b15cb3dSCy SchubertThe maximum slew rate possible is limited
4942b15cb3dSCy Schubertto 500 parts\-per\-million (PPM) as a consequence of the correctness
4952b15cb3dSCy Schubertprinciples on which the NTP protocol and algorithm design are
4962b15cb3dSCy Schubertbased.
4972b15cb3dSCy SchubertAs a result, the local clock can take a long time to
4982b15cb3dSCy Schubertconverge to an acceptable offset, about 2,000 s for each second the
4992b15cb3dSCy Schubertclock is outside the acceptable range.
5002b15cb3dSCy SchubertDuring this interval the
5012b15cb3dSCy Schubertlocal clock will not be consistent with any other network clock and
5022b15cb3dSCy Schubertthe system cannot be used for distributed applications that require
5032b15cb3dSCy Schubertcorrectly synchronized network time.
5042b15cb3dSCy Schubert.Pp
5052b15cb3dSCy SchubertIn spite of the above precautions, sometimes when large
5062b15cb3dSCy Schubertfrequency errors are present the resulting time offsets stray
5072b15cb3dSCy Schubertoutside the 128\-ms range and an eventual step or slew time
5082b15cb3dSCy Schubertcorrection is required.
5092b15cb3dSCy SchubertIf following such a correction the
5102b15cb3dSCy Schubertfrequency error is so large that the first sample is outside the
5112b15cb3dSCy Schubertacceptable range,
5122b15cb3dSCy Schubert.Nm
5132b15cb3dSCy Schubertenters the same state as when the
5142b15cb3dSCy Schubert.Pa ntp.drift
5152b15cb3dSCy Schubertfile is not present.
5162b15cb3dSCy SchubertThe intent of this behavior
5172b15cb3dSCy Schubertis to quickly correct the frequency and restore operation to the
5182b15cb3dSCy Schubertnormal tracking mode.
5192b15cb3dSCy SchubertIn the most extreme cases
5202b15cb3dSCy Schubert(the host
5212b15cb3dSCy Schubert.Cm time.ien.it
5222b15cb3dSCy Schubertcomes to mind), there may be occasional
5232b15cb3dSCy Schubertstep/slew corrections and subsequent frequency corrections.
5242b15cb3dSCy SchubertIt
5252b15cb3dSCy Schuberthelps in these cases to use the
5262b15cb3dSCy Schubert.Cm burst
5272b15cb3dSCy Schubertkeyword when
5282b15cb3dSCy Schubertconfiguring the server, but
5292b15cb3dSCy SchubertONLY
5302b15cb3dSCy Schubertwhen you have permission to do so from the owner of the target host.
5312b15cb3dSCy Schubert.Pp
5322b15cb3dSCy SchubertFinally,
5332b15cb3dSCy Schubertin the past many startup scripts would run
5342b15cb3dSCy Schubert.Xr ntpdate 1ntpdatemdoc
5359034852cSGleb Smirnoffor
5369034852cSGleb Smirnoff.Xr sntp 1sntpmdoc
5372b15cb3dSCy Schubertto get the system clock close to correct before starting
5382b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc ,
5392b15cb3dSCy Schubertbut this was never more than a mediocre hack and is no longer needed.
5402b15cb3dSCy SchubertIf you are following the instructions in
5412b15cb3dSCy Schubert.Sx "Starting NTP (Best Current Practice)"
5422b15cb3dSCy Schubertand you still need to set the system time before starting
5432b15cb3dSCy Schubert.Nm ,
5442b15cb3dSCy Schubertplease open a bug report and document what is going on,
5452b15cb3dSCy Schubertand then look at using
5469034852cSGleb Smirnoff.Xr sntp 1sntpmdoc
5479034852cSGleb Smirnoffif you really need to set the clock before starting
5489034852cSGleb Smirnoff.Nm .
5492b15cb3dSCy Schubert.Pp
5502b15cb3dSCy SchubertThere is a way to start
5512b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
5522b15cb3dSCy Schubertthat often addresses all of the problems mentioned above.
5532b15cb3dSCy Schubert.Ss "Starting NTP (Best Current Practice)"
5542b15cb3dSCy SchubertFirst, use the
5552b15cb3dSCy Schubert.Cm iburst
5562b15cb3dSCy Schubertoption on your
5572b15cb3dSCy Schubert.Cm server
5582b15cb3dSCy Schubertentries.
5592b15cb3dSCy Schubert.Pp
5602b15cb3dSCy SchubertIf you can also keep a good
5612b15cb3dSCy Schubert.Pa ntp.drift
5622b15cb3dSCy Schubertfile then
5632b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
5642b15cb3dSCy Schubertwill effectively "warm\-start" and your system's clock will
5652b15cb3dSCy Schubertbe stable in under 11 seconds' time.
5662b15cb3dSCy Schubert.Pp
5672b15cb3dSCy SchubertAs soon as possible in the startup sequence, start
5682b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
5692b15cb3dSCy Schubertwith at least the
5702b15cb3dSCy Schubert.Fl g
5712b15cb3dSCy Schubertand perhaps the
5722b15cb3dSCy Schubert.Fl N
5732b15cb3dSCy Schubertoptions.
5742b15cb3dSCy SchubertThen,
5752b15cb3dSCy Schubertstart the rest of your "normal" processes.
5762b15cb3dSCy SchubertThis will give
5772b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc
5782b15cb3dSCy Schubertas much time as possible to get the system's clock synchronized and stable.
5792b15cb3dSCy Schubert.Pp
5802b15cb3dSCy SchubertFinally,
5812b15cb3dSCy Schubertif you have processes like
5822b15cb3dSCy Schubert.Cm dovecot
5832b15cb3dSCy Schubertor database servers
5842b15cb3dSCy Schubertthat require
5852b15cb3dSCy Schubertmonotonically\-increasing time,
5862b15cb3dSCy Schubertrun
5872b15cb3dSCy Schubert.Xr ntp\-wait 1ntp\-waitmdoc
5882b15cb3dSCy Schubertas late as possible in the boot sequence
5892b15cb3dSCy Schubert(perhaps with the
5902b15cb3dSCy Schubert.Fl v
5912b15cb3dSCy Schubertflag)
5922b15cb3dSCy Schubertand after
5932b15cb3dSCy Schubert.Xr ntp\-wait 1ntp\-waitmdoc
5942b15cb3dSCy Schubertexits successfully
5952b15cb3dSCy Schubertit is as safe as it will ever be to start any process that require
5962b15cb3dSCy Schubertstable time.
5972b15cb3dSCy Schubert.Ss "Frequency Discipline"
5982b15cb3dSCy SchubertThe
5992b15cb3dSCy Schubert.Nm
6002b15cb3dSCy Schubertbehavior at startup depends on whether the
6012b15cb3dSCy Schubertfrequency file, usually
6022b15cb3dSCy Schubert.Pa ntp.drift ,
6032b15cb3dSCy Schubertexists.
6042b15cb3dSCy SchubertThis file
6052b15cb3dSCy Schubertcontains the latest estimate of clock frequency error.
6062b15cb3dSCy SchubertWhen the
6072b15cb3dSCy Schubert.Nm
6082b15cb3dSCy Schubertis started and the file does not exist, the
6092b15cb3dSCy Schubert.Nm
6102b15cb3dSCy Schubertenters a special mode designed to quickly adapt to
6112b15cb3dSCy Schubertthe particular system clock oscillator time and frequency error.
6122b15cb3dSCy SchubertThis takes approximately 15 minutes, after which the time and
6132b15cb3dSCy Schubertfrequency are set to nominal values and the
6142b15cb3dSCy Schubert.Nm
6152b15cb3dSCy Schubertenters
6162b15cb3dSCy Schubertnormal mode, where the time and frequency are continuously tracked
6172b15cb3dSCy Schubertrelative to the server.
6182b15cb3dSCy SchubertAfter one hour the frequency file is
6192b15cb3dSCy Schubertcreated and the current frequency offset written to it.
6202b15cb3dSCy SchubertWhen the
6212b15cb3dSCy Schubert.Nm
6222b15cb3dSCy Schubertis started and the file does exist, the
6232b15cb3dSCy Schubert.Nm
6242b15cb3dSCy Schubertfrequency is initialized from the file and enters normal mode
6252b15cb3dSCy Schubertimmediately.
6262b15cb3dSCy SchubertAfter that the current frequency offset is written to
6272b15cb3dSCy Schubertthe file at hourly intervals.
6282b15cb3dSCy Schubert.Ss "Operating Modes"
6292b15cb3dSCy SchubertThe
6302b15cb3dSCy Schubert.Nm
6312b15cb3dSCy Schubertutility can operate in any of several modes, including
6322b15cb3dSCy Schubertsymmetric active/passive, client/server broadcast/multicast and
6332b15cb3dSCy Schubertmanycast, as described in the
6342b15cb3dSCy Schubert.Qq Association Management
6352b15cb3dSCy Schubertpage
6362b15cb3dSCy Schubert(available as part of the HTML documentation
6372b15cb3dSCy Schubertprovided in
6382b15cb3dSCy Schubert.Pa /usr/share/doc/ntp ) .
6392b15cb3dSCy SchubertIt normally operates continuously while
6402b15cb3dSCy Schubertmonitoring for small changes in frequency and trimming the clock
6412b15cb3dSCy Schubertfor the ultimate precision.
6422b15cb3dSCy SchubertHowever, it can operate in a one\-time
6432b15cb3dSCy Schubertmode where the time is set from an external server and frequency is
6442b15cb3dSCy Schubertset from a previously recorded frequency file.
6452b15cb3dSCy SchubertA
6462b15cb3dSCy Schubertbroadcast/multicast or manycast client can discover remote servers,
6472b15cb3dSCy Schubertcompute server\-client propagation delay correction factors and
6482b15cb3dSCy Schubertconfigure itself automatically.
6492b15cb3dSCy SchubertThis makes it possible to deploy a
6502b15cb3dSCy Schubertfleet of workstations without specifying configuration details
6512b15cb3dSCy Schubertspecific to the local environment.
6522b15cb3dSCy Schubert.Pp
6532b15cb3dSCy SchubertBy default,
6542b15cb3dSCy Schubert.Nm
6552b15cb3dSCy Schubertruns in continuous mode where each of
6562b15cb3dSCy Schubertpossibly several external servers is polled at intervals determined
6572b15cb3dSCy Schubertby an intricate state machine.
6582b15cb3dSCy SchubertThe state machine measures the
6592b15cb3dSCy Schubertincidental roundtrip delay jitter and oscillator frequency wander
6602b15cb3dSCy Schubertand determines the best poll interval using a heuristic algorithm.
6612b15cb3dSCy SchubertOrdinarily, and in most operating environments, the state machine
6622b15cb3dSCy Schubertwill start with 64s intervals and eventually increase in steps to
6632b15cb3dSCy Schubert1024s.
6642b15cb3dSCy SchubertA small amount of random variation is introduced in order to
6652b15cb3dSCy Schubertavoid bunching at the servers.
6662b15cb3dSCy SchubertIn addition, should a server become
6672b15cb3dSCy Schubertunreachable for some time, the poll interval is increased in steps
6682b15cb3dSCy Schubertto 1024s in order to reduce network overhead.
6692b15cb3dSCy Schubert.Pp
6702b15cb3dSCy SchubertIn some cases it may not be practical for
6712b15cb3dSCy Schubert.Nm
6722b15cb3dSCy Schubertto run continuously.
6732b15cb3dSCy SchubertA common workaround has been to run the
6742b15cb3dSCy Schubert.Xr ntpdate 1ntpdatemdoc
6752b15cb3dSCy Schubertor
6762b15cb3dSCy Schubert.Xr sntp 1sntpmdoc
6772b15cb3dSCy Schubertprograms from a
6782b15cb3dSCy Schubert.Xr cron 8
6792b15cb3dSCy Schubertjob at designated
6802b15cb3dSCy Schuberttimes.
6812b15cb3dSCy SchubertHowever, these programs do not have the crafted signal
6822b15cb3dSCy Schubertprocessing, error checking or mitigation algorithms of
6832b15cb3dSCy Schubert.Nm .
6842b15cb3dSCy SchubertThe
6852b15cb3dSCy Schubert.Fl q
6862b15cb3dSCy Schubertoption is intended for this purpose.
6872b15cb3dSCy SchubertSetting this option will cause
6882b15cb3dSCy Schubert.Nm
6892b15cb3dSCy Schubertto exit just after
6902b15cb3dSCy Schubertsetting the clock for the first time.
6912b15cb3dSCy SchubertThe procedure for initially
6922b15cb3dSCy Schubertsetting the clock is the same as in continuous mode; most
6932b15cb3dSCy Schubertapplications will probably want to specify the
6942b15cb3dSCy Schubert.Cm iburst
6952b15cb3dSCy Schubertkeyword with the
6962b15cb3dSCy Schubert.Ic server
6972b15cb3dSCy Schubertconfiguration command.
6982b15cb3dSCy SchubertWith this
6992b15cb3dSCy Schubertkeyword a volley of messages are exchanged to groom the data and
7002b15cb3dSCy Schubertthe clock is set in about 10 s.
7012b15cb3dSCy SchubertIf nothing is heard after a
7022b15cb3dSCy Schubertcouple of minutes, the daemon times out and exits.
7032b15cb3dSCy SchubertAfter a suitable
7042b15cb3dSCy Schubertperiod of mourning, the
7052b15cb3dSCy Schubert.Xr ntpdate 1ntpdatemdoc
7062b15cb3dSCy Schubertprogram will be
7072b15cb3dSCy Schubertretired.
7082b15cb3dSCy Schubert.Pp
7092b15cb3dSCy SchubertWhen kernel support is available to discipline the clock
7102b15cb3dSCy Schubertfrequency, which is the case for stock Solaris, Tru64, Linux and
7112b15cb3dSCy Schubert.Fx ,
7122b15cb3dSCy Schuberta useful feature is available to discipline the clock
7132b15cb3dSCy Schubertfrequency.
7142b15cb3dSCy SchubertFirst,
7152b15cb3dSCy Schubert.Nm
7162b15cb3dSCy Schubertis run in continuous mode with
7172b15cb3dSCy Schubertselected servers in order to measure and record the intrinsic clock
7182b15cb3dSCy Schubertfrequency offset in the frequency file.
7192b15cb3dSCy SchubertIt may take some hours for
7202b15cb3dSCy Schubertthe frequency and offset to settle down.
7212b15cb3dSCy SchubertThen the
7222b15cb3dSCy Schubert.Nm
7232b15cb3dSCy Schubertis
7242b15cb3dSCy Schubertstopped and run in one\-time mode as required.
7252b15cb3dSCy SchubertAt each startup, the
7262b15cb3dSCy Schubertfrequency is read from the file and initializes the kernel
7272b15cb3dSCy Schubertfrequency.
7282b15cb3dSCy Schubert.Ss "Poll Interval Control"
7292b15cb3dSCy SchubertThis version of NTP includes an intricate state machine to
7302b15cb3dSCy Schubertreduce the network load while maintaining a quality of
7312b15cb3dSCy Schubertsynchronization consistent with the observed jitter and wander.
7322b15cb3dSCy SchubertThere are a number of ways to tailor the operation in order enhance
7332b15cb3dSCy Schubertaccuracy by reducing the interval or to reduce network overhead by
7342b15cb3dSCy Schubertincreasing it.
7352b15cb3dSCy SchubertHowever, the user is advised to carefully consider
7362b15cb3dSCy Schubertthe consequences of changing the poll adjustment range from the
7372b15cb3dSCy Schubertdefault minimum of 64 s to the default maximum of 1,024 s.
7382b15cb3dSCy SchubertThe
7392b15cb3dSCy Schubertdefault minimum can be changed with the
7402b15cb3dSCy Schubert.Ic tinker
7412b15cb3dSCy Schubert.Cm minpoll
7422b15cb3dSCy Schubertcommand to a value not less than 16 s.
7432b15cb3dSCy SchubertThis value is used for all
7442b15cb3dSCy Schubertconfigured associations, unless overridden by the
7452b15cb3dSCy Schubert.Cm minpoll
7462b15cb3dSCy Schubertoption on the configuration command.
7472b15cb3dSCy SchubertNote that most device drivers
7482b15cb3dSCy Schubertwill not operate properly if the poll interval is less than 64 s
7492b15cb3dSCy Schubertand that the broadcast server and manycast client associations will
7502b15cb3dSCy Schubertalso use the default, unless overridden.
7512b15cb3dSCy Schubert.Pp
7522b15cb3dSCy SchubertIn some cases involving dial up or toll services, it may be
7532b15cb3dSCy Schubertuseful to increase the minimum interval to a few tens of minutes
7542b15cb3dSCy Schubertand maximum interval to a day or so.
7552b15cb3dSCy SchubertUnder normal operation
7562b15cb3dSCy Schubertconditions, once the clock discipline loop has stabilized the
7572b15cb3dSCy Schubertinterval will be increased in steps from the minimum to the
7582b15cb3dSCy Schubertmaximum.
7592b15cb3dSCy SchubertHowever, this assumes the intrinsic clock frequency error
7602b15cb3dSCy Schubertis small enough for the discipline loop correct it.
7612b15cb3dSCy SchubertThe capture
7622b15cb3dSCy Schubertrange of the loop is 500 PPM at an interval of 64s decreasing by a
7632b15cb3dSCy Schubertfactor of two for each doubling of interval.
7642b15cb3dSCy SchubertAt a minimum of 1,024
7652b15cb3dSCy Schuberts, for example, the capture range is only 31 PPM.
7662b15cb3dSCy SchubertIf the intrinsic
7672b15cb3dSCy Schuberterror is greater than this, the drift file
7682b15cb3dSCy Schubert.Pa ntp.drift
7692b15cb3dSCy Schubertwill
7702b15cb3dSCy Schuberthave to be specially tailored to reduce the residual error below
7712b15cb3dSCy Schubertthis limit.
7722b15cb3dSCy SchubertOnce this is done, the drift file is automatically
7732b15cb3dSCy Schubertupdated once per hour and is available to initialize the frequency
7742b15cb3dSCy Schuberton subsequent daemon restarts.
7752b15cb3dSCy Schubert.Ss "The huff\-n'\-puff Filter"
7762b15cb3dSCy SchubertIn scenarios where a considerable amount of data are to be
7772b15cb3dSCy Schubertdownloaded or uploaded over telephone modems, timekeeping quality
7782b15cb3dSCy Schubertcan be seriously degraded.
7792b15cb3dSCy SchubertThis occurs because the differential
7802b15cb3dSCy Schubertdelays on the two directions of transmission can be quite large.
7812b15cb3dSCy SchubertIn
7822b15cb3dSCy Schubertmany cases the apparent time errors are so large as to exceed the
7832b15cb3dSCy Schubertstep threshold and a step correction can occur during and after the
7842b15cb3dSCy Schubertdata transfer is in progress.
7852b15cb3dSCy Schubert.Pp
7862b15cb3dSCy SchubertThe huff\-n'\-puff filter is designed to correct the apparent time
7872b15cb3dSCy Schubertoffset in these cases.
7882b15cb3dSCy SchubertIt depends on knowledge of the propagation
7892b15cb3dSCy Schubertdelay when no other traffic is present.
7902b15cb3dSCy SchubertIn common scenarios this
7912b15cb3dSCy Schubertoccurs during other than work hours.
7922b15cb3dSCy SchubertThe filter maintains a shift
7932b15cb3dSCy Schubertregister that remembers the minimum delay over the most recent
7942b15cb3dSCy Schubertinterval measured usually in hours.
7952b15cb3dSCy SchubertUnder conditions of severe
7962b15cb3dSCy Schubertdelay, the filter corrects the apparent offset using the sign of
7972b15cb3dSCy Schubertthe offset and the difference between the apparent delay and
7982b15cb3dSCy Schubertminimum delay.
7992b15cb3dSCy SchubertThe name of the filter reflects the negative (huff)
8002b15cb3dSCy Schubertand positive (puff) correction, which depends on the sign of the
8012b15cb3dSCy Schubertoffset.
8022b15cb3dSCy Schubert.Pp
8032b15cb3dSCy SchubertThe filter is activated by the
8042b15cb3dSCy Schubert.Ic tinker
8052b15cb3dSCy Schubertcommand and
8062b15cb3dSCy Schubert.Cm huffpuff
8072b15cb3dSCy Schubertkeyword, as described in
8082b15cb3dSCy Schubert.Xr ntp.conf 5 .
8092b15cb3dSCy Schubert.Sh "ENVIRONMENT"
8102b15cb3dSCy SchubertSee \fBOPTION PRESETS\fP for configuration environment variables.
8112b15cb3dSCy Schubert.Sh FILES
8122b15cb3dSCy Schubert.Bl -tag -width /etc/ntp.drift -compact
8132b15cb3dSCy Schubert.It Pa /etc/ntp.conf
8142b15cb3dSCy Schubertthe default name of the configuration file
8152b15cb3dSCy Schubert.It Pa /etc/ntp.drift
8162b15cb3dSCy Schubertthe default name of the drift file
8172b15cb3dSCy Schubert.It Pa /etc/ntp.keys
8182b15cb3dSCy Schubertthe default name of the key file
8192b15cb3dSCy Schubert.El
8202b15cb3dSCy Schubert.Sh "EXIT STATUS"
8212b15cb3dSCy SchubertOne of the following exit values will be returned:
8222b15cb3dSCy Schubert.Bl -tag
8232b15cb3dSCy Schubert.It 0 " (EXIT_SUCCESS)"
8242b15cb3dSCy SchubertSuccessful program execution.
8252b15cb3dSCy Schubert.It 1 " (EXIT_FAILURE)"
8262b15cb3dSCy SchubertThe operation failed or the command syntax was not valid.
8272b15cb3dSCy Schubert.It 70 " (EX_SOFTWARE)"
8282b15cb3dSCy Schubertlibopts had an internal operational error.  Please report
8292b15cb3dSCy Schubertit to autogen\-users@lists.sourceforge.net.  Thank you.
8302b15cb3dSCy Schubert.El
8312b15cb3dSCy Schubert.Sh "SEE ALSO"
8322b15cb3dSCy Schubert.Xr ntp.conf 5 ,
8332b15cb3dSCy Schubert.Xr ntpdate 1ntpdatemdoc ,
8342b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc ,
8352b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc ,
8362b15cb3dSCy Schubert.Xr sntp 1sntpmdoc
8372b15cb3dSCy Schubert.Pp
8382b15cb3dSCy SchubertIn addition to the manual pages provided,
8392b15cb3dSCy Schubertcomprehensive documentation is available on the world wide web
8402b15cb3dSCy Schubertat
8412b15cb3dSCy Schubert.Li http://www.ntp.org/ .
8422b15cb3dSCy SchubertA snapshot of this documentation is available in HTML format in
8432b15cb3dSCy Schubert.Pa /usr/share/doc/ntp .
8442b15cb3dSCy Schubert.Rs
8452b15cb3dSCy Schubert.%A David L. Mills
8462b15cb3dSCy Schubert.%T Network Time Protocol (Version 1)
8472b15cb3dSCy Schubert.%O RFC1059
8482b15cb3dSCy Schubert.Re
8492b15cb3dSCy Schubert.Rs
8502b15cb3dSCy Schubert.%A David L. Mills
8512b15cb3dSCy Schubert.%T Network Time Protocol (Version 2)
8522b15cb3dSCy Schubert.%O RFC1119
8532b15cb3dSCy Schubert.Re
8542b15cb3dSCy Schubert.Rs
8552b15cb3dSCy Schubert.%A David L. Mills
8562b15cb3dSCy Schubert.%T Network Time Protocol (Version 3)
8572b15cb3dSCy Schubert.%O RFC1305
8582b15cb3dSCy Schubert.Re
8592b15cb3dSCy Schubert.Rs
8602b15cb3dSCy Schubert.%A David L. Mills
8612b15cb3dSCy Schubert.%A J. Martin, Ed.
8622b15cb3dSCy Schubert.%A J. Burbank
8632b15cb3dSCy Schubert.%A W. Kasch
8642b15cb3dSCy Schubert.%T Network Time Protocol Version 4: Protocol and Algorithms Specification
8652b15cb3dSCy Schubert.%O RFC5905
8662b15cb3dSCy Schubert.Re
8672b15cb3dSCy Schubert.Rs
8682b15cb3dSCy Schubert.%A David L. Mills
8692b15cb3dSCy Schubert.%A B. Haberman, Ed.
8702b15cb3dSCy Schubert.%T Network Time Protocol Version 4: Autokey Specification
8712b15cb3dSCy Schubert.%O RFC5906
8722b15cb3dSCy Schubert.Re
8732b15cb3dSCy Schubert.Rs
8742b15cb3dSCy Schubert.%A H. Gerstung
8752b15cb3dSCy Schubert.%A C. Elliott
8762b15cb3dSCy Schubert.%A B. Haberman, Ed.
8772b15cb3dSCy Schubert.%T Definitions of Managed Objects for Network Time Protocol Version 4: (NTPv4)
8782b15cb3dSCy Schubert.%O RFC5907
8792b15cb3dSCy Schubert.Re
8802b15cb3dSCy Schubert.Rs
8812b15cb3dSCy Schubert.%A R. Gayraud
8822b15cb3dSCy Schubert.%A B. Lourdelet
8832b15cb3dSCy Schubert.%T Network Time Protocol (NTP) Server Option for DHCPv6
8842b15cb3dSCy Schubert.%O RFC5908
8852b15cb3dSCy Schubert.Re
8862b15cb3dSCy Schubert.Sh "AUTHORS"
8872b15cb3dSCy SchubertThe University of Delaware and Network Time Foundation
8882b15cb3dSCy Schubert.Sh "COPYRIGHT"
889*f5f40dd6SCy SchubertCopyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
8902b15cb3dSCy SchubertThis program is released under the terms of the NTP license, <http://ntp.org/license>.
8912b15cb3dSCy Schubert.Sh BUGS
8922b15cb3dSCy SchubertThe
8932b15cb3dSCy Schubert.Nm
8942b15cb3dSCy Schubertutility has gotten rather fat.
8952b15cb3dSCy SchubertWhile not huge, it has gotten
8962b15cb3dSCy Schubertlarger than might be desirable for an elevated\-priority
8972b15cb3dSCy Schubert.Nm
8982b15cb3dSCy Schubertrunning on a workstation, particularly since many of
8992b15cb3dSCy Schubertthe fancy features which consume the space were designed more with
9002b15cb3dSCy Schuberta busy primary server, rather than a high stratum workstation in
9012b15cb3dSCy Schubertmind.
9022b15cb3dSCy Schubert.Pp
903a466cc55SCy SchubertPlease send bug reports to: https://bugs.ntp.org, bugs@ntp.org
9042b15cb3dSCy Schubert.Sh NOTES
9052b15cb3dSCy SchubertPortions of this document came from FreeBSD.
9062b15cb3dSCy Schubert.Pp
9072b15cb3dSCy SchubertThis manual page was \fIAutoGen\fP\-erated from the \fBntpd\fP
9082b15cb3dSCy Schubertoption definitions.
909