12b15cb3dSCy Schubert@node ntpd Invocation 22b15cb3dSCy Schubert@section Invoking ntpd 32b15cb3dSCy Schubert@pindex ntpd 42b15cb3dSCy Schubert@cindex NTP daemon program 52b15cb3dSCy Schubert@ignore 62b15cb3dSCy Schubert# 72b15cb3dSCy Schubert# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi) 82b15cb3dSCy Schubert# 9*f5f40dd6SCy Schubert# It has been AutoGen-ed May 25, 2024 at 12:04:00 AM by AutoGen 5.18.16 102b15cb3dSCy Schubert# From the definitions ntpd-opts.def 112b15cb3dSCy Schubert# and the template file agtexi-cmd.tpl 122b15cb3dSCy Schubert@end ignore 132b15cb3dSCy Schubert 142b15cb3dSCy Schubert 152b15cb3dSCy Schubert 162b15cb3dSCy SchubertThe 172b15cb3dSCy Schubert@code{ntpd} 182b15cb3dSCy Schubertutility is an operating system daemon which sets 192b15cb3dSCy Schubertand maintains the system time of day in synchronism with Internet 202b15cb3dSCy Schubertstandard time servers. 212b15cb3dSCy SchubertIt is a complete implementation of the 222b15cb3dSCy SchubertNetwork Time Protocol (NTP) version 4, as defined by RFC-5905, 232b15cb3dSCy Schubertbut also retains compatibility with 242b15cb3dSCy Schubertversion 3, as defined by RFC-1305, and versions 1 252b15cb3dSCy Schubertand 2, as defined by RFC-1059 and RFC-1119, respectively. 262b15cb3dSCy Schubert 272b15cb3dSCy SchubertThe 282b15cb3dSCy Schubert@code{ntpd} 292b15cb3dSCy Schubertutility does most computations in 64-bit floating point 302b15cb3dSCy Schubertarithmetic and does relatively clumsy 64-bit fixed point operations 312b15cb3dSCy Schubertonly when necessary to preserve the ultimate precision, about 232 322b15cb3dSCy Schubertpicoseconds. 332b15cb3dSCy SchubertWhile the ultimate precision is not achievable with 342b15cb3dSCy Schubertordinary workstations and networks of today, it may be required 352b15cb3dSCy Schubertwith future gigahertz CPU clocks and gigabit LANs. 362b15cb3dSCy Schubert 372b15cb3dSCy SchubertOrdinarily, 382b15cb3dSCy Schubert@code{ntpd} 392b15cb3dSCy Schubertreads the 402b15cb3dSCy Schubert@code{ntp.conf(5)} 412b15cb3dSCy Schubertconfiguration file at startup time in order to determine the 422b15cb3dSCy Schubertsynchronization sources and operating modes. 432b15cb3dSCy SchubertIt is also possible to 442b15cb3dSCy Schubertspecify a working, although limited, configuration entirely on the 452b15cb3dSCy Schubertcommand line, obviating the need for a configuration file. 462b15cb3dSCy SchubertThis may 472b15cb3dSCy Schubertbe particularly useful when the local host is to be configured as a 482b15cb3dSCy Schubertbroadcast/multicast client, with all peers being determined by 492b15cb3dSCy Schubertlistening to broadcasts at run time. 502b15cb3dSCy Schubert 512b15cb3dSCy SchubertIf NetInfo support is built into 522b15cb3dSCy Schubert@code{ntpd} 532b15cb3dSCy Schubertthen 542b15cb3dSCy Schubert@code{ntpd} 552b15cb3dSCy Schubertwill attempt to read its configuration from the 562b15cb3dSCy SchubertNetInfo if the default 572b15cb3dSCy Schubert@code{ntp.conf(5)} 582b15cb3dSCy Schubertfile cannot be read and no file is 592b15cb3dSCy Schubertspecified by the 602b15cb3dSCy Schubert@code{-c} 612b15cb3dSCy Schubertoption. 622b15cb3dSCy Schubert 632b15cb3dSCy SchubertVarious internal 642b15cb3dSCy Schubert@code{ntpd} 652b15cb3dSCy Schubertvariables can be displayed and 662b15cb3dSCy Schubertconfiguration options altered while the 672b15cb3dSCy Schubert@code{ntpd} 682b15cb3dSCy Schubertis running 692b15cb3dSCy Schubertusing the 702b15cb3dSCy Schubert@code{ntpq(1ntpqmdoc)} 712b15cb3dSCy Schubertand 722b15cb3dSCy Schubert@code{ntpdc(1ntpdcmdoc)} 732b15cb3dSCy Schubertutility programs. 742b15cb3dSCy Schubert 752b15cb3dSCy SchubertWhen 762b15cb3dSCy Schubert@code{ntpd} 772b15cb3dSCy Schubertstarts it looks at the value of 782b15cb3dSCy Schubert@code{umask(2)}, 792b15cb3dSCy Schubertand if zero 802b15cb3dSCy Schubert@code{ntpd} 812b15cb3dSCy Schubertwill set the 822b15cb3dSCy Schubert@code{umask(2)} 832b15cb3dSCy Schubertto 022. 842b15cb3dSCy Schubert 852b15cb3dSCy SchubertThis section was generated by @strong{AutoGen}, 862b15cb3dSCy Schubertusing the @code{agtexi-cmd} template and the option descriptions for the @code{ntpd} program. 872b15cb3dSCy SchubertThis software is released under the NTP license, <http://ntp.org/license>. 882b15cb3dSCy Schubert 892b15cb3dSCy Schubert@menu 902b15cb3dSCy Schubert* ntpd usage:: ntpd help/usage (@option{--help}) 912b15cb3dSCy Schubert* ntpd ipv4:: ipv4 option (-4) 922b15cb3dSCy Schubert* ntpd ipv6:: ipv6 option (-6) 932b15cb3dSCy Schubert* ntpd authreq:: authreq option (-a) 942b15cb3dSCy Schubert* ntpd authnoreq:: authnoreq option (-A) 952b15cb3dSCy Schubert* ntpd configfile:: configfile option (-c) 962b15cb3dSCy Schubert* ntpd driftfile:: driftfile option (-f) 972b15cb3dSCy Schubert* ntpd panicgate:: panicgate option (-g) 98a25439b6SCy Schubert* ntpd force-step-once:: force-step-once option (-G) 992b15cb3dSCy Schubert* ntpd jaildir:: jaildir option (-i) 1002b15cb3dSCy Schubert* ntpd interface:: interface option (-I) 1012b15cb3dSCy Schubert* ntpd keyfile:: keyfile option (-k) 1022b15cb3dSCy Schubert* ntpd logfile:: logfile option (-l) 1032b15cb3dSCy Schubert* ntpd novirtualips:: novirtualips option (-L) 1042b15cb3dSCy Schubert* ntpd modifymmtimer:: modifymmtimer option (-M) 1052b15cb3dSCy Schubert* ntpd nice:: nice option (-N) 1062b15cb3dSCy Schubert* ntpd pidfile:: pidfile option (-p) 1072b15cb3dSCy Schubert* ntpd priority:: priority option (-P) 1082b15cb3dSCy Schubert* ntpd quit:: quit option (-q) 1092b15cb3dSCy Schubert* ntpd propagationdelay:: propagationdelay option (-r) 1102b15cb3dSCy Schubert* ntpd saveconfigquit:: saveconfigquit option 1112b15cb3dSCy Schubert* ntpd statsdir:: statsdir option (-s) 1122b15cb3dSCy Schubert* ntpd trustedkey:: trustedkey option (-t) 1132b15cb3dSCy Schubert* ntpd user:: user option (-u) 1142b15cb3dSCy Schubert* ntpd updateinterval:: updateinterval option (-U) 1152b15cb3dSCy Schubert* ntpd wait-sync:: wait-sync option (-w) 1162b15cb3dSCy Schubert* ntpd slew:: slew option (-x) 1172b15cb3dSCy Schubert* ntpd usepcc:: usepcc option 1182b15cb3dSCy Schubert* ntpd pccfreq:: pccfreq option 1192b15cb3dSCy Schubert* ntpd mdns:: mdns option (-m) 1202b15cb3dSCy Schubert* ntpd config:: presetting/configuring ntpd 1212b15cb3dSCy Schubert* ntpd exit status:: exit status 1222b15cb3dSCy Schubert* ntpd Usage:: Usage 1232b15cb3dSCy Schubert* ntpd Files:: Files 1242b15cb3dSCy Schubert* ntpd See Also:: See Also 1252b15cb3dSCy Schubert* ntpd Bugs:: Bugs 1262b15cb3dSCy Schubert* ntpd Notes:: Notes 1272b15cb3dSCy Schubert@end menu 1282b15cb3dSCy Schubert 1292b15cb3dSCy Schubert@node ntpd usage 1302b15cb3dSCy Schubert@subsection ntpd help/usage (@option{--help}) 1312b15cb3dSCy Schubert@cindex ntpd help 1322b15cb3dSCy Schubert 1332b15cb3dSCy SchubertThis is the automatically generated usage text for ntpd. 1342b15cb3dSCy Schubert 1352b15cb3dSCy SchubertThe text printed is the same whether selected with the @code{help} option 1362b15cb3dSCy Schubert(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print 1372b15cb3dSCy Schubertthe usage text by passing it through a pager program. 1382b15cb3dSCy Schubert@code{more-help} is disabled on platforms without a working 1392b15cb3dSCy Schubert@code{fork(2)} function. The @code{PAGER} environment variable is 1402b15cb3dSCy Schubertused to select the program, defaulting to @file{more}. Both will exit 1412b15cb3dSCy Schubertwith a status code of 0. 1422b15cb3dSCy Schubert 1432b15cb3dSCy Schubert@exampleindent 0 1442b15cb3dSCy Schubert@example 145*f5f40dd6SCy Schubertntpd - NTP daemon program - Ver. 4.2.8p18 1462b15cb3dSCy SchubertUsage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \ 1472b15cb3dSCy Schubert [ <server1> ... <serverN> ] 1482b15cb3dSCy Schubert Flg Arg Option-Name Description 1492b15cb3dSCy Schubert -4 no ipv4 Force IPv4 DNS name resolution 1502b15cb3dSCy Schubert - prohibits the option 'ipv6' 1512b15cb3dSCy Schubert -6 no ipv6 Force IPv6 DNS name resolution 1522b15cb3dSCy Schubert - prohibits the option 'ipv4' 1532b15cb3dSCy Schubert -a no authreq Require crypto authentication 1542b15cb3dSCy Schubert - prohibits the option 'authnoreq' 1552b15cb3dSCy Schubert -A no authnoreq Do not require crypto authentication 1562b15cb3dSCy Schubert - prohibits the option 'authreq' 1572b15cb3dSCy Schubert -b no bcastsync Allow us to sync to broadcast servers 1582b15cb3dSCy Schubert -c Str configfile configuration file name 1592b15cb3dSCy Schubert -d no debug-level Increase debug verbosity level 1602b15cb3dSCy Schubert - may appear multiple times 1612b15cb3dSCy Schubert -D Num set-debug-level Set the debug verbosity level 1622b15cb3dSCy Schubert - may appear multiple times 1632b15cb3dSCy Schubert -f Str driftfile frequency drift file name 1642b15cb3dSCy Schubert -g no panicgate Allow the first adjustment to be Big 1652b15cb3dSCy Schubert - may appear multiple times 166a25439b6SCy Schubert -G no force-step-once Step any initial offset correction. 167052d159aSCy Schubert -i --- jaildir built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs 1682b15cb3dSCy Schubert -I Str interface Listen on an interface name or address 1692b15cb3dSCy Schubert - may appear multiple times 1702b15cb3dSCy Schubert -k Str keyfile path to symmetric keys 1712b15cb3dSCy Schubert -l Str logfile path to the log file 1722b15cb3dSCy Schubert -L no novirtualips Do not listen to virtual interfaces 1732b15cb3dSCy Schubert -n no nofork Do not fork 1742b15cb3dSCy Schubert - prohibits the option 'wait-sync' 1752b15cb3dSCy Schubert -N no nice Run at high priority 1762b15cb3dSCy Schubert -p Str pidfile path to the PID file 1772b15cb3dSCy Schubert -P Num priority Process priority 1782b15cb3dSCy Schubert -q no quit Set the time and quit 1792b15cb3dSCy Schubert - prohibits these options: 1802b15cb3dSCy Schubert saveconfigquit 1812b15cb3dSCy Schubert wait-sync 1822b15cb3dSCy Schubert -r Str propagationdelay Broadcast/propagation delay 1832b15cb3dSCy Schubert Str saveconfigquit Save parsed configuration and quit 1842b15cb3dSCy Schubert - prohibits these options: 1852b15cb3dSCy Schubert quit 1862b15cb3dSCy Schubert wait-sync 1872b15cb3dSCy Schubert -s Str statsdir Statistics file location 1882b15cb3dSCy Schubert -t Str trustedkey Trusted key number 1892b15cb3dSCy Schubert - may appear multiple times 190052d159aSCy Schubert -u --- user built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs 1912b15cb3dSCy Schubert -U Num updateinterval interval in seconds between scans for new or dropped interfaces 1922b15cb3dSCy Schubert Str var make ARG an ntp variable (RW) 1932b15cb3dSCy Schubert - may appear multiple times 1942b15cb3dSCy Schubert Str dvar make ARG an ntp variable (RW|DEF) 1952b15cb3dSCy Schubert - may appear multiple times 1962b15cb3dSCy Schubert -w Num wait-sync Seconds to wait for first clock sync 1972b15cb3dSCy Schubert - prohibits these options: 1982b15cb3dSCy Schubert nofork 1992b15cb3dSCy Schubert quit 2002b15cb3dSCy Schubert saveconfigquit 2012b15cb3dSCy Schubert -x no slew Slew up to 600 seconds 2022b15cb3dSCy Schubert opt version output version information and exit 2032b15cb3dSCy Schubert -? no help display extended usage information and exit 2042b15cb3dSCy Schubert -! no more-help extended usage information passed thru pager 2052b15cb3dSCy Schubert 2062b15cb3dSCy SchubertOptions are specified by doubled hyphens and their name or by a single 2072b15cb3dSCy Schuberthyphen and the flag character. 2082b15cb3dSCy Schubert 2092b15cb3dSCy Schubert 2102b15cb3dSCy SchubertThe following option preset mechanisms are supported: 2112b15cb3dSCy Schubert - examining environment variables named NTPD_* 2122b15cb3dSCy Schubert 213a466cc55SCy SchubertPlease send bug reports to: <https://bugs.ntp.org, bugs@@ntp.org> 2142b15cb3dSCy Schubert@end example 2152b15cb3dSCy Schubert@exampleindent 4 2162b15cb3dSCy Schubert 2172b15cb3dSCy Schubert@node ntpd ipv4 2182b15cb3dSCy Schubert@subsection ipv4 option (-4) 2192b15cb3dSCy Schubert@cindex ntpd-ipv4 2202b15cb3dSCy Schubert 2212b15cb3dSCy SchubertThis is the ``force ipv4 dns name resolution'' option. 2222b15cb3dSCy Schubert 2232b15cb3dSCy Schubert@noindent 2242b15cb3dSCy SchubertThis option has some usage constraints. It: 2252b15cb3dSCy Schubert@itemize @bullet 2262b15cb3dSCy Schubert@item 2272b15cb3dSCy Schubertmust not appear in combination with any of the following options: 2282b15cb3dSCy Schubertipv6. 2292b15cb3dSCy Schubert@end itemize 2302b15cb3dSCy Schubert 2312b15cb3dSCy SchubertForce DNS resolution of following host names on the command line 2322b15cb3dSCy Schubertto the IPv4 namespace. 2332b15cb3dSCy Schubert@node ntpd ipv6 2342b15cb3dSCy Schubert@subsection ipv6 option (-6) 2352b15cb3dSCy Schubert@cindex ntpd-ipv6 2362b15cb3dSCy Schubert 2372b15cb3dSCy SchubertThis is the ``force ipv6 dns name resolution'' option. 2382b15cb3dSCy Schubert 2392b15cb3dSCy Schubert@noindent 2402b15cb3dSCy SchubertThis option has some usage constraints. It: 2412b15cb3dSCy Schubert@itemize @bullet 2422b15cb3dSCy Schubert@item 2432b15cb3dSCy Schubertmust not appear in combination with any of the following options: 2442b15cb3dSCy Schubertipv4. 2452b15cb3dSCy Schubert@end itemize 2462b15cb3dSCy Schubert 2472b15cb3dSCy SchubertForce DNS resolution of following host names on the command line 2482b15cb3dSCy Schubertto the IPv6 namespace. 2492b15cb3dSCy Schubert@node ntpd authreq 2502b15cb3dSCy Schubert@subsection authreq option (-a) 2512b15cb3dSCy Schubert@cindex ntpd-authreq 2522b15cb3dSCy Schubert 2532b15cb3dSCy SchubertThis is the ``require crypto authentication'' option. 2542b15cb3dSCy Schubert 2552b15cb3dSCy Schubert@noindent 2562b15cb3dSCy SchubertThis option has some usage constraints. It: 2572b15cb3dSCy Schubert@itemize @bullet 2582b15cb3dSCy Schubert@item 2592b15cb3dSCy Schubertmust not appear in combination with any of the following options: 2602b15cb3dSCy Schubertauthnoreq. 2612b15cb3dSCy Schubert@end itemize 2622b15cb3dSCy Schubert 2632b15cb3dSCy SchubertRequire cryptographic authentication for broadcast client, 2642b15cb3dSCy Schubertmulticast client and symmetric passive associations. 2652b15cb3dSCy SchubertThis is the default. 2662b15cb3dSCy Schubert@node ntpd authnoreq 2672b15cb3dSCy Schubert@subsection authnoreq option (-A) 2682b15cb3dSCy Schubert@cindex ntpd-authnoreq 2692b15cb3dSCy Schubert 2702b15cb3dSCy SchubertThis is the ``do not require crypto authentication'' option. 2712b15cb3dSCy Schubert 2722b15cb3dSCy Schubert@noindent 2732b15cb3dSCy SchubertThis option has some usage constraints. It: 2742b15cb3dSCy Schubert@itemize @bullet 2752b15cb3dSCy Schubert@item 2762b15cb3dSCy Schubertmust not appear in combination with any of the following options: 2772b15cb3dSCy Schubertauthreq. 2782b15cb3dSCy Schubert@end itemize 2792b15cb3dSCy Schubert 2802b15cb3dSCy SchubertDo not require cryptographic authentication for broadcast client, 2812b15cb3dSCy Schubertmulticast client and symmetric passive associations. 2822b15cb3dSCy SchubertThis is almost never a good idea. 2832b15cb3dSCy Schubert@node ntpd configfile 2842b15cb3dSCy Schubert@subsection configfile option (-c) 2852b15cb3dSCy Schubert@cindex ntpd-configfile 2862b15cb3dSCy Schubert 2872b15cb3dSCy SchubertThis is the ``configuration file name'' option. 2882b15cb3dSCy SchubertThis option takes a string argument. 2892b15cb3dSCy SchubertThe name and path of the configuration file, 2902b15cb3dSCy Schubert@file{/etc/ntp.conf} 2912b15cb3dSCy Schubertby default. 2922b15cb3dSCy Schubert@node ntpd driftfile 2932b15cb3dSCy Schubert@subsection driftfile option (-f) 2942b15cb3dSCy Schubert@cindex ntpd-driftfile 2952b15cb3dSCy Schubert 2962b15cb3dSCy SchubertThis is the ``frequency drift file name'' option. 2972b15cb3dSCy SchubertThis option takes a string argument. 2982b15cb3dSCy SchubertThe name and path of the frequency file, 2992b15cb3dSCy Schubert@file{/etc/ntp.drift} 3002b15cb3dSCy Schubertby default. 3012b15cb3dSCy SchubertThis is the same operation as the 3022b15cb3dSCy Schubert@code{driftfile} @kbd{driftfile} 3032b15cb3dSCy Schubertconfiguration specification in the 3042b15cb3dSCy Schubert@file{/etc/ntp.conf} 3052b15cb3dSCy Schubertfile. 3062b15cb3dSCy Schubert@node ntpd panicgate 3072b15cb3dSCy Schubert@subsection panicgate option (-g) 3082b15cb3dSCy Schubert@cindex ntpd-panicgate 3092b15cb3dSCy Schubert 3102b15cb3dSCy SchubertThis is the ``allow the first adjustment to be big'' option. 3112b15cb3dSCy Schubert 3122b15cb3dSCy Schubert@noindent 3132b15cb3dSCy SchubertThis option has some usage constraints. It: 3142b15cb3dSCy Schubert@itemize @bullet 3152b15cb3dSCy Schubert@item 3162b15cb3dSCy Schubertmay appear an unlimited number of times. 3172b15cb3dSCy Schubert@end itemize 3182b15cb3dSCy Schubert 3192b15cb3dSCy SchubertNormally, 3202b15cb3dSCy Schubert@code{ntpd} 3212b15cb3dSCy 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, 3222b15cb3dSCy Schubert@code{ntpd} 3232b15cb3dSCy Schubertwill exit with a message to the system log. This option can be used with the 3242b15cb3dSCy Schubert@code{-q} 3252b15cb3dSCy Schubertand 3262b15cb3dSCy Schubert@code{-x} 3272b15cb3dSCy Schubertoptions. 3282b15cb3dSCy SchubertSee the 3292b15cb3dSCy Schubert@code{tinker} 3302b15cb3dSCy Schubertconfiguration file directive for other options. 331a25439b6SCy Schubert@node ntpd force-step-once 332a25439b6SCy Schubert@subsection force-step-once option (-G) 333a25439b6SCy Schubert@cindex ntpd-force-step-once 334a25439b6SCy Schubert 335a25439b6SCy SchubertThis is the ``step any initial offset correction.'' option. 336a25439b6SCy SchubertNormally, 337a25439b6SCy Schubert@code{ntpd} 338a25439b6SCy Schubertsteps the time if the time offset exceeds the step threshold, 339a25439b6SCy Schubertwhich is 128 ms by default, and otherwise slews the time. 340a25439b6SCy SchubertThis option forces the initial offset correction to be stepped, 341a25439b6SCy Schubertso the highest time accuracy can be achieved quickly. 342a25439b6SCy SchubertHowever, this may also cause the time to be stepped back 343a25439b6SCy Schubertso this option must not be used if 344a25439b6SCy Schubertapplications requiring monotonic time are running. 345a25439b6SCy SchubertSee the @code{tinker} configuration file directive for other options. 3462b15cb3dSCy Schubert@node ntpd jaildir 3472b15cb3dSCy Schubert@subsection jaildir option (-i) 3482b15cb3dSCy Schubert@cindex ntpd-jaildir 3492b15cb3dSCy Schubert 3502b15cb3dSCy SchubertThis is the ``jail directory'' option. 3512b15cb3dSCy SchubertThis option takes a string argument. 3522b15cb3dSCy Schubert 3532b15cb3dSCy Schubert@noindent 3542b15cb3dSCy SchubertThis option has some usage constraints. It: 3552b15cb3dSCy Schubert@itemize @bullet 3562b15cb3dSCy Schubert@item 3572b15cb3dSCy Schubertmust be compiled in by defining @code{HAVE_DROPROOT} during the compilation. 3582b15cb3dSCy Schubert@end itemize 3592b15cb3dSCy Schubert 3602b15cb3dSCy SchubertChroot the server to the directory 3612b15cb3dSCy Schubert@kbd{jaildir} 3622b15cb3dSCy Schubert. 3632b15cb3dSCy SchubertThis option also implies that the server attempts to drop root privileges at startup. 3642b15cb3dSCy SchubertYou may need to also specify a 3652b15cb3dSCy Schubert@code{-u} 3662b15cb3dSCy Schubertoption. 3672b15cb3dSCy SchubertThis option is only available if the OS supports adjusting the clock 3682b15cb3dSCy Schubertwithout full root privileges. 3692b15cb3dSCy SchubertThis option is supported under NetBSD (configure with 3702b15cb3dSCy Schubert@code{--enable-clockctl}) or Linux (configure with 3712b15cb3dSCy Schubert@code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}). 3722b15cb3dSCy Schubert@node ntpd interface 3732b15cb3dSCy Schubert@subsection interface option (-I) 3742b15cb3dSCy Schubert@cindex ntpd-interface 3752b15cb3dSCy Schubert 3762b15cb3dSCy SchubertThis is the ``listen on an interface name or address'' option. 3772b15cb3dSCy SchubertThis option takes a string argument @file{iface}. 3782b15cb3dSCy Schubert 3792b15cb3dSCy Schubert@noindent 3802b15cb3dSCy SchubertThis option has some usage constraints. It: 3812b15cb3dSCy Schubert@itemize @bullet 3822b15cb3dSCy Schubert@item 3832b15cb3dSCy Schubertmay appear an unlimited number of times. 3842b15cb3dSCy Schubert@end itemize 3852b15cb3dSCy Schubert 3862b15cb3dSCy SchubertOpen the network address given, or all the addresses associated with the 3872b15cb3dSCy Schubertgiven interface name. This option may appear multiple times. This option 3882b15cb3dSCy Schubertalso implies not opening other addresses, except wildcard and localhost. 3892b15cb3dSCy SchubertThis option is deprecated. Please consider using the configuration file 3902b15cb3dSCy Schubert@code{interface} command, which is more versatile. 3912b15cb3dSCy Schubert@node ntpd keyfile 3922b15cb3dSCy Schubert@subsection keyfile option (-k) 3932b15cb3dSCy Schubert@cindex ntpd-keyfile 3942b15cb3dSCy Schubert 3952b15cb3dSCy SchubertThis is the ``path to symmetric keys'' option. 3962b15cb3dSCy SchubertThis option takes a string argument. 3972b15cb3dSCy SchubertSpecify the name and path of the symmetric key file. 3982b15cb3dSCy Schubert@file{/etc/ntp.keys} 3992b15cb3dSCy Schubertis the default. 4002b15cb3dSCy SchubertThis is the same operation as the 4012b15cb3dSCy Schubert@code{keys} @kbd{keyfile} 4022b15cb3dSCy Schubertconfiguration file directive. 4032b15cb3dSCy Schubert@node ntpd logfile 4042b15cb3dSCy Schubert@subsection logfile option (-l) 4052b15cb3dSCy Schubert@cindex ntpd-logfile 4062b15cb3dSCy Schubert 4072b15cb3dSCy SchubertThis is the ``path to the log file'' option. 4082b15cb3dSCy SchubertThis option takes a string argument. 4092b15cb3dSCy SchubertSpecify the name and path of the log file. 4102b15cb3dSCy SchubertThe default is the system log file. 4112b15cb3dSCy SchubertThis is the same operation as the 4122b15cb3dSCy Schubert@code{logfile} @kbd{logfile} 4132b15cb3dSCy Schubertconfiguration file directive. 4142b15cb3dSCy Schubert@node ntpd novirtualips 4152b15cb3dSCy Schubert@subsection novirtualips option (-L) 4162b15cb3dSCy Schubert@cindex ntpd-novirtualips 4172b15cb3dSCy Schubert 4182b15cb3dSCy SchubertThis is the ``do not listen to virtual interfaces'' option. 4192b15cb3dSCy SchubertDo not listen to virtual interfaces, defined as those with 4202b15cb3dSCy Schubertnames containing a colon. This option is deprecated. Please 4212b15cb3dSCy Schubertconsider using the configuration file @code{interface} command, which 4222b15cb3dSCy Schubertis more versatile. 4232b15cb3dSCy Schubert@node ntpd modifymmtimer 4242b15cb3dSCy Schubert@subsection modifymmtimer option (-M) 4252b15cb3dSCy Schubert@cindex ntpd-modifymmtimer 4262b15cb3dSCy Schubert 4272b15cb3dSCy SchubertThis is the ``modify multimedia timer (windows only)'' option. 4282b15cb3dSCy Schubert 4292b15cb3dSCy Schubert@noindent 4302b15cb3dSCy SchubertThis option has some usage constraints. It: 4312b15cb3dSCy Schubert@itemize @bullet 4322b15cb3dSCy Schubert@item 4332b15cb3dSCy Schubertmust be compiled in by defining @code{SYS_WINNT} during the compilation. 4342b15cb3dSCy Schubert@end itemize 4352b15cb3dSCy Schubert 4362b15cb3dSCy SchubertSet the Windows Multimedia Timer to highest resolution. This 4372b15cb3dSCy Schubertensures the resolution does not change while ntpd is running, 4382b15cb3dSCy Schubertavoiding timekeeping glitches associated with changes. 4392b15cb3dSCy Schubert@node ntpd nice 4402b15cb3dSCy Schubert@subsection nice option (-N) 4412b15cb3dSCy Schubert@cindex ntpd-nice 4422b15cb3dSCy Schubert 4432b15cb3dSCy SchubertThis is the ``run at high priority'' option. 4442b15cb3dSCy SchubertTo the extent permitted by the operating system, run 4452b15cb3dSCy Schubert@code{ntpd} 4462b15cb3dSCy Schubertat the highest priority. 4472b15cb3dSCy Schubert@node ntpd pidfile 4482b15cb3dSCy Schubert@subsection pidfile option (-p) 4492b15cb3dSCy Schubert@cindex ntpd-pidfile 4502b15cb3dSCy Schubert 4512b15cb3dSCy SchubertThis is the ``path to the pid file'' option. 4522b15cb3dSCy SchubertThis option takes a string argument. 4532b15cb3dSCy SchubertSpecify the name and path of the file used to record 4542b15cb3dSCy Schubert@code{ntpd}'s 4552b15cb3dSCy Schubertprocess ID. 4562b15cb3dSCy SchubertThis is the same operation as the 4572b15cb3dSCy Schubert@code{pidfile} @kbd{pidfile} 4582b15cb3dSCy Schubertconfiguration file directive. 4592b15cb3dSCy Schubert@node ntpd priority 4602b15cb3dSCy Schubert@subsection priority option (-P) 4612b15cb3dSCy Schubert@cindex ntpd-priority 4622b15cb3dSCy Schubert 4632b15cb3dSCy SchubertThis is the ``process priority'' option. 4642b15cb3dSCy SchubertThis option takes a number argument. 4652b15cb3dSCy SchubertTo the extent permitted by the operating system, run 4662b15cb3dSCy Schubert@code{ntpd} 4672b15cb3dSCy Schubertat the specified 4682b15cb3dSCy Schubert@code{sched_setscheduler(SCHED_FIFO)} 4692b15cb3dSCy Schubertpriority. 4702b15cb3dSCy Schubert@node ntpd quit 4712b15cb3dSCy Schubert@subsection quit option (-q) 4722b15cb3dSCy Schubert@cindex ntpd-quit 4732b15cb3dSCy Schubert 4742b15cb3dSCy SchubertThis is the ``set the time and quit'' option. 4752b15cb3dSCy Schubert 4762b15cb3dSCy Schubert@noindent 4772b15cb3dSCy SchubertThis option has some usage constraints. It: 4782b15cb3dSCy Schubert@itemize @bullet 4792b15cb3dSCy Schubert@item 4802b15cb3dSCy Schubertmust not appear in combination with any of the following options: 4812b15cb3dSCy Schubertsaveconfigquit, wait-sync. 4822b15cb3dSCy Schubert@end itemize 4832b15cb3dSCy Schubert 4842b15cb3dSCy Schubert@code{ntpd} 4852b15cb3dSCy Schubertwill not daemonize and will exit after the clock is first 4862b15cb3dSCy Schubertsynchronized. This behavior mimics that of the 4872b15cb3dSCy Schubert@code{ntpdate} 4882b15cb3dSCy Schubertprogram, which will soon be replaced with a shell script. 4892b15cb3dSCy SchubertThe 4902b15cb3dSCy Schubert@code{-g} 4912b15cb3dSCy Schubertand 4922b15cb3dSCy Schubert@code{-x} 4932b15cb3dSCy Schubertoptions can be used with this option. 4942b15cb3dSCy SchubertNote: The kernel time discipline is disabled with this option. 4952b15cb3dSCy Schubert@node ntpd propagationdelay 4962b15cb3dSCy Schubert@subsection propagationdelay option (-r) 4972b15cb3dSCy Schubert@cindex ntpd-propagationdelay 4982b15cb3dSCy Schubert 4992b15cb3dSCy SchubertThis is the ``broadcast/propagation delay'' option. 5002b15cb3dSCy SchubertThis option takes a string argument. 5012b15cb3dSCy 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. 5022b15cb3dSCy Schubert@node ntpd saveconfigquit 5032b15cb3dSCy Schubert@subsection saveconfigquit option 5042b15cb3dSCy Schubert@cindex ntpd-saveconfigquit 5052b15cb3dSCy Schubert 5062b15cb3dSCy SchubertThis is the ``save parsed configuration and quit'' option. 5072b15cb3dSCy SchubertThis option takes a string argument. 5082b15cb3dSCy Schubert 5092b15cb3dSCy Schubert@noindent 5102b15cb3dSCy SchubertThis option has some usage constraints. It: 5112b15cb3dSCy Schubert@itemize @bullet 5122b15cb3dSCy Schubert@item 5132b15cb3dSCy Schubertmust be compiled in by defining @code{SAVECONFIG} during the compilation. 5142b15cb3dSCy Schubert@item 5152b15cb3dSCy Schubertmust not appear in combination with any of the following options: 5162b15cb3dSCy Schubertquit, wait-sync. 5172b15cb3dSCy Schubert@end itemize 5182b15cb3dSCy Schubert 5192b15cb3dSCy SchubertCause @code{ntpd} to parse its startup configuration file and save an 5202b15cb3dSCy Schubertequivalent to the given filename and exit. This option was 5212b15cb3dSCy Schubertdesigned for automated testing. 5222b15cb3dSCy Schubert@node ntpd statsdir 5232b15cb3dSCy Schubert@subsection statsdir option (-s) 5242b15cb3dSCy Schubert@cindex ntpd-statsdir 5252b15cb3dSCy Schubert 5262b15cb3dSCy SchubertThis is the ``statistics file location'' option. 5272b15cb3dSCy SchubertThis option takes a string argument. 5282b15cb3dSCy SchubertSpecify the directory path for files created by the statistics facility. 5292b15cb3dSCy SchubertThis is the same operation as the 5302b15cb3dSCy Schubert@code{statsdir} @kbd{statsdir} 5312b15cb3dSCy Schubertconfiguration file directive. 5322b15cb3dSCy Schubert@node ntpd trustedkey 5332b15cb3dSCy Schubert@subsection trustedkey option (-t) 5342b15cb3dSCy Schubert@cindex ntpd-trustedkey 5352b15cb3dSCy Schubert 5362b15cb3dSCy SchubertThis is the ``trusted key number'' option. 5372b15cb3dSCy SchubertThis option takes a string argument @file{tkey}. 5382b15cb3dSCy Schubert 5392b15cb3dSCy Schubert@noindent 5402b15cb3dSCy SchubertThis option has some usage constraints. It: 5412b15cb3dSCy Schubert@itemize @bullet 5422b15cb3dSCy Schubert@item 5432b15cb3dSCy Schubertmay appear an unlimited number of times. 5442b15cb3dSCy Schubert@end itemize 5452b15cb3dSCy Schubert 5462b15cb3dSCy SchubertAdd the specified key number to the trusted key list. 5472b15cb3dSCy Schubert@node ntpd user 5482b15cb3dSCy Schubert@subsection user option (-u) 5492b15cb3dSCy Schubert@cindex ntpd-user 5502b15cb3dSCy Schubert 5512b15cb3dSCy SchubertThis is the ``run as userid (or userid:groupid)'' option. 5522b15cb3dSCy SchubertThis option takes a string argument. 5532b15cb3dSCy Schubert 5542b15cb3dSCy Schubert@noindent 5552b15cb3dSCy SchubertThis option has some usage constraints. It: 5562b15cb3dSCy Schubert@itemize @bullet 5572b15cb3dSCy Schubert@item 5582b15cb3dSCy Schubertmust be compiled in by defining @code{HAVE_DROPROOT} during the compilation. 5592b15cb3dSCy Schubert@end itemize 5602b15cb3dSCy Schubert 5612b15cb3dSCy SchubertSpecify a user, and optionally a group, to switch to. 5622b15cb3dSCy SchubertThis option is only available if the OS supports adjusting the clock 5632b15cb3dSCy Schubertwithout full root privileges. 5642b15cb3dSCy SchubertThis option is supported under NetBSD (configure with 5652b15cb3dSCy Schubert@code{--enable-clockctl}) or Linux (configure with 5662b15cb3dSCy Schubert@code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}). 5672b15cb3dSCy Schubert@node ntpd updateinterval 5682b15cb3dSCy Schubert@subsection updateinterval option (-U) 5692b15cb3dSCy Schubert@cindex ntpd-updateinterval 5702b15cb3dSCy Schubert 5712b15cb3dSCy SchubertThis is the ``interval in seconds between scans for new or dropped interfaces'' option. 5722b15cb3dSCy SchubertThis option takes a number argument. 5732b15cb3dSCy SchubertGive the time in seconds between two scans for new or dropped interfaces. 5742b15cb3dSCy SchubertFor systems with routing socket support the scans will be performed shortly after the interface change 5752b15cb3dSCy Schuberthas been detected by the system. 5762b15cb3dSCy SchubertUse 0 to disable scanning. 60 seconds is the minimum time between scans. 5772b15cb3dSCy Schubert@node ntpd wait-sync 5782b15cb3dSCy Schubert@subsection wait-sync option (-w) 5792b15cb3dSCy Schubert@cindex ntpd-wait-sync 5802b15cb3dSCy Schubert 5812b15cb3dSCy SchubertThis is the ``seconds to wait for first clock sync'' option. 5822b15cb3dSCy SchubertThis option takes a number argument. 5832b15cb3dSCy Schubert 5842b15cb3dSCy Schubert@noindent 5852b15cb3dSCy SchubertThis option has some usage constraints. It: 5862b15cb3dSCy Schubert@itemize @bullet 5872b15cb3dSCy Schubert@item 5882b15cb3dSCy Schubertmust be compiled in by defining @code{HAVE_WORKING_FORK} during the compilation. 5892b15cb3dSCy Schubert@item 5902b15cb3dSCy Schubertmust not appear in combination with any of the following options: 5912b15cb3dSCy Schubertnofork, quit, saveconfigquit. 5922b15cb3dSCy Schubert@end itemize 5932b15cb3dSCy Schubert 5942b15cb3dSCy SchubertIf greater than zero, alters @code{ntpd}'s behavior when forking to 5952b15cb3dSCy Schubertdaemonize. Instead of exiting with status 0 immediately after 5962b15cb3dSCy Schubertthe fork, the parent waits up to the specified number of 5972b15cb3dSCy Schubertseconds for the child to first synchronize the clock. The exit 5982b15cb3dSCy Schubertstatus is zero (success) if the clock was synchronized, 5992b15cb3dSCy Schubertotherwise it is @code{ETIMEDOUT}. 6002b15cb3dSCy SchubertThis provides the option for a script starting @code{ntpd} to easily 6012b15cb3dSCy Schubertwait for the first set of the clock before proceeding. 6022b15cb3dSCy Schubert@node ntpd slew 6032b15cb3dSCy Schubert@subsection slew option (-x) 6042b15cb3dSCy Schubert@cindex ntpd-slew 6052b15cb3dSCy Schubert 6062b15cb3dSCy SchubertThis is the ``slew up to 600 seconds'' option. 6072b15cb3dSCy 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. 6082b15cb3dSCy SchubertThis option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. 6092b15cb3dSCy 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. 6102b15cb3dSCy SchubertThus, an adjustment as much as 600 s will take almost 14 days to complete. 6112b15cb3dSCy SchubertThis option can be used with the 6122b15cb3dSCy Schubert@code{-g} 6132b15cb3dSCy Schubertand 6142b15cb3dSCy Schubert@code{-q} 6152b15cb3dSCy Schubertoptions. 6162b15cb3dSCy SchubertSee the 6172b15cb3dSCy Schubert@code{tinker} 6182b15cb3dSCy Schubertconfiguration file directive for other options. 6192b15cb3dSCy SchubertNote: The kernel time discipline is disabled with this option. 6202b15cb3dSCy Schubert@node ntpd usepcc 6212b15cb3dSCy Schubert@subsection usepcc option 6222b15cb3dSCy Schubert@cindex ntpd-usepcc 6232b15cb3dSCy Schubert 6242b15cb3dSCy SchubertThis is the ``use cpu cycle counter (windows only)'' option. 6252b15cb3dSCy Schubert 6262b15cb3dSCy Schubert@noindent 6272b15cb3dSCy SchubertThis option has some usage constraints. It: 6282b15cb3dSCy Schubert@itemize @bullet 6292b15cb3dSCy Schubert@item 6302b15cb3dSCy Schubertmust be compiled in by defining @code{SYS_WINNT} during the compilation. 6312b15cb3dSCy Schubert@end itemize 6322b15cb3dSCy Schubert 6332b15cb3dSCy SchubertAttempt to substitute the CPU counter for @code{QueryPerformanceCounter}. 6342b15cb3dSCy SchubertThe CPU counter and @code{QueryPerformanceCounter} are compared, and if 6352b15cb3dSCy Schubertthey have the same frequency, the CPU counter (RDTSC on x86) is 6362b15cb3dSCy Schubertused directly, saving the overhead of a system call. 6372b15cb3dSCy Schubert@node ntpd pccfreq 6382b15cb3dSCy Schubert@subsection pccfreq option 6392b15cb3dSCy Schubert@cindex ntpd-pccfreq 6402b15cb3dSCy Schubert 6412b15cb3dSCy SchubertThis is the ``force cpu cycle counter use (windows only)'' option. 6422b15cb3dSCy SchubertThis option takes a string argument. 6432b15cb3dSCy Schubert 6442b15cb3dSCy Schubert@noindent 6452b15cb3dSCy SchubertThis option has some usage constraints. It: 6462b15cb3dSCy Schubert@itemize @bullet 6472b15cb3dSCy Schubert@item 6482b15cb3dSCy Schubertmust be compiled in by defining @code{SYS_WINNT} during the compilation. 6492b15cb3dSCy Schubert@end itemize 6502b15cb3dSCy Schubert 6512b15cb3dSCy SchubertForce substitution the CPU counter for @code{QueryPerformanceCounter}. 6522b15cb3dSCy SchubertThe CPU counter (RDTSC on x86) is used unconditionally with the 6532b15cb3dSCy Schubertgiven frequency (in Hz). 6542b15cb3dSCy Schubert@node ntpd mdns 6552b15cb3dSCy Schubert@subsection mdns option (-m) 6562b15cb3dSCy Schubert@cindex ntpd-mdns 6572b15cb3dSCy Schubert 6582b15cb3dSCy SchubertThis is the ``register with mdns as a ntp server'' option. 6592b15cb3dSCy Schubert 6602b15cb3dSCy Schubert@noindent 6612b15cb3dSCy SchubertThis option has some usage constraints. It: 6622b15cb3dSCy Schubert@itemize @bullet 6632b15cb3dSCy Schubert@item 6642b15cb3dSCy Schubertmust be compiled in by defining @code{HAVE_DNSREGISTRATION} during the compilation. 6652b15cb3dSCy Schubert@end itemize 6662b15cb3dSCy Schubert 6672b15cb3dSCy SchubertRegisters as an NTP server with the local mDNS server which allows 6682b15cb3dSCy Schubertthe server to be discovered via mDNS client lookup. 6692b15cb3dSCy Schubert 6702b15cb3dSCy Schubert 6712b15cb3dSCy Schubert@node ntpd config 6722b15cb3dSCy Schubert@subsection presetting/configuring ntpd 6732b15cb3dSCy Schubert 6742b15cb3dSCy SchubertAny option that is not marked as @i{not presettable} may be preset by 6752b15cb3dSCy Schubertloading values from environment variables named @code{NTPD} and @code{NTPD_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of 6762b15cb3dSCy Schubertthe options listed above in upper case and segmented with underscores. 6772b15cb3dSCy SchubertThe @code{NTPD} variable will be tokenized and parsed like 6782b15cb3dSCy Schubertthe command line. The remaining variables are tested for existence and their 6792b15cb3dSCy Schubertvalues are treated like option arguments. 6802b15cb3dSCy Schubert 6812b15cb3dSCy Schubert 6822b15cb3dSCy SchubertThe command line options relating to configuration and/or usage help are: 6832b15cb3dSCy Schubert 6842b15cb3dSCy Schubert@subsubheading version (-) 6852b15cb3dSCy Schubert 6862b15cb3dSCy SchubertPrint the program version to standard out, optionally with licensing 6872b15cb3dSCy Schubertinformation, then exit 0. The optional argument specifies how much licensing 688a466cc55SCy Schubertdetail to provide. The default is to print just the version. The licensing information may be selected with an option argument. 6892b15cb3dSCy SchubertOnly the first letter of the argument is examined: 6902b15cb3dSCy Schubert 6912b15cb3dSCy Schubert@table @samp 6922b15cb3dSCy Schubert@item version 6932b15cb3dSCy SchubertOnly print the version. This is the default. 6942b15cb3dSCy Schubert@item copyright 6952b15cb3dSCy SchubertName the copyright usage licensing terms. 6962b15cb3dSCy Schubert@item verbose 6972b15cb3dSCy SchubertPrint the full copyright usage licensing terms. 6982b15cb3dSCy Schubert@end table 6992b15cb3dSCy Schubert 7002b15cb3dSCy Schubert@node ntpd exit status 7012b15cb3dSCy Schubert@subsection ntpd exit status 7022b15cb3dSCy Schubert 7032b15cb3dSCy SchubertOne of the following exit values will be returned: 7042b15cb3dSCy Schubert@table @samp 7052b15cb3dSCy Schubert@item 0 (EXIT_SUCCESS) 7062b15cb3dSCy SchubertSuccessful program execution. 7072b15cb3dSCy Schubert@item 1 (EXIT_FAILURE) 7082b15cb3dSCy SchubertThe operation failed or the command syntax was not valid. 7092b15cb3dSCy Schubert@end table 7102b15cb3dSCy Schubert@node ntpd Usage 7112b15cb3dSCy Schubert@subsection ntpd Usage 7122b15cb3dSCy Schubert@node ntpd Files 7132b15cb3dSCy Schubert@subsection ntpd Files 7142b15cb3dSCy Schubert@node ntpd See Also 7152b15cb3dSCy Schubert@subsection ntpd See Also 7162b15cb3dSCy Schubert@node ntpd Bugs 7172b15cb3dSCy Schubert@subsection ntpd Bugs 7182b15cb3dSCy Schubert@node ntpd Notes 7192b15cb3dSCy Schubert@subsection ntpd Notes 720