4 @cindex NTP daemon program
7 # EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
9 # It has been AutoGen-ed March 21, 2017 at 10:44:20 AM by AutoGen 5.18.5
10 # From the definitions ntpd-opts.def
11 # and the template file agtexi-cmd.tpl
18 utility is an operating system daemon which sets
19 and maintains the system time of day in synchronism with Internet
20 standard time servers.
21 It is a complete implementation of the
22 Network Time Protocol (NTP) version 4, as defined by RFC-5905,
23 but also retains compatibility with
24 version 3, as defined by RFC-1305, and versions 1
25 and 2, as defined by RFC-1059 and RFC-1119, respectively.
29 utility does most computations in 64-bit floating point
30 arithmetic and does relatively clumsy 64-bit fixed point operations
31 only when necessary to preserve the ultimate precision, about 232
33 While the ultimate precision is not achievable with
34 ordinary workstations and networks of today, it may be required
35 with future gigahertz CPU clocks and gigabit LANs.
41 configuration file at startup time in order to determine the
42 synchronization sources and operating modes.
43 It is also possible to
44 specify a working, although limited, configuration entirely on the
45 command line, obviating the need for a configuration file.
47 be particularly useful when the local host is to be configured as a
48 broadcast/multicast client, with all peers being determined by
49 listening to broadcasts at run time.
51 If NetInfo support is built into
55 will attempt to read its configuration from the
56 NetInfo if the default
58 file cannot be read and no file is
65 variables can be displayed and
66 configuration options altered while the
70 @code{ntpq(1ntpqmdoc)}
72 @code{ntpdc(1ntpdcmdoc)}
77 starts it looks at the value of
85 This section was generated by @strong{AutoGen},
86 using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpd} program.
87 This software is released under the NTP license, <http://ntp.org/license>.
90 * ntpd usage:: ntpd help/usage (@option{--help})
91 * ntpd ipv4:: ipv4 option (-4)
92 * ntpd ipv6:: ipv6 option (-6)
93 * ntpd authreq:: authreq option (-a)
94 * ntpd authnoreq:: authnoreq option (-A)
95 * ntpd configfile:: configfile option (-c)
96 * ntpd driftfile:: driftfile option (-f)
97 * ntpd panicgate:: panicgate option (-g)
98 * ntpd force-step-once:: force-step-once option (-G)
99 * ntpd jaildir:: jaildir option (-i)
100 * ntpd interface:: interface option (-I)
101 * ntpd keyfile:: keyfile option (-k)
102 * ntpd logfile:: logfile option (-l)
103 * ntpd novirtualips:: novirtualips option (-L)
104 * ntpd modifymmtimer:: modifymmtimer option (-M)
105 * ntpd nice:: nice option (-N)
106 * ntpd pidfile:: pidfile option (-p)
107 * ntpd priority:: priority option (-P)
108 * ntpd quit:: quit option (-q)
109 * ntpd propagationdelay:: propagationdelay option (-r)
110 * ntpd saveconfigquit:: saveconfigquit option
111 * ntpd statsdir:: statsdir option (-s)
112 * ntpd trustedkey:: trustedkey option (-t)
113 * ntpd user:: user option (-u)
114 * ntpd updateinterval:: updateinterval option (-U)
115 * ntpd wait-sync:: wait-sync option (-w)
116 * ntpd slew:: slew option (-x)
117 * ntpd usepcc:: usepcc option
118 * ntpd pccfreq:: pccfreq option
119 * ntpd mdns:: mdns option (-m)
120 * ntpd config:: presetting/configuring ntpd
121 * ntpd exit status:: exit status
124 * ntpd See Also:: See Also
130 @subsection ntpd help/usage (@option{--help})
133 This is the automatically generated usage text for ntpd.
135 The text printed is the same whether selected with the @code{help} option
136 (@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
137 the usage text by passing it through a pager program.
138 @code{more-help} is disabled on platforms without a working
139 @code{fork(2)} function. The @code{PAGER} environment variable is
140 used to select the program, defaulting to @file{more}. Both will exit
141 with a status code of 0.
145 ntpd - NTP daemon program - Ver. 4.2.8p10-beta
146 Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
147 [ <server1> ... <serverN> ]
148 Flg Arg Option-Name Description
149 -4 no ipv4 Force IPv4 DNS name resolution
150 - prohibits the option 'ipv6'
151 -6 no ipv6 Force IPv6 DNS name resolution
152 - prohibits the option 'ipv4'
153 -a no authreq Require crypto authentication
154 - prohibits the option 'authnoreq'
155 -A no authnoreq Do not require crypto authentication
156 - prohibits the option 'authreq'
157 -b no bcastsync Allow us to sync to broadcast servers
158 -c Str configfile configuration file name
159 -d no debug-level Increase debug verbosity level
160 - may appear multiple times
161 -D Num set-debug-level Set the debug verbosity level
162 - may appear multiple times
163 -f Str driftfile frequency drift file name
164 -g no panicgate Allow the first adjustment to be Big
165 - may appear multiple times
166 -G no force-step-once Step any initial offset correction.
167 -i Str jaildir Jail directory
168 -I Str interface Listen on an interface name or address
169 - may appear multiple times
170 -k Str keyfile path to symmetric keys
171 -l Str logfile path to the log file
172 -L no novirtualips Do not listen to virtual interfaces
173 -n no nofork Do not fork
174 - prohibits the option 'wait-sync'
175 -N no nice Run at high priority
176 -p Str pidfile path to the PID file
177 -P Num priority Process priority
178 -q no quit Set the time and quit
179 - prohibits these options:
182 -r Str propagationdelay Broadcast/propagation delay
183 Str saveconfigquit Save parsed configuration and quit
184 - prohibits these options:
187 -s Str statsdir Statistics file location
188 -t Str trustedkey Trusted key number
189 - may appear multiple times
190 -u Str user Run as userid (or userid:groupid)
191 -U Num updateinterval interval in seconds between scans for new or dropped interfaces
192 Str var make ARG an ntp variable (RW)
193 - may appear multiple times
194 Str dvar make ARG an ntp variable (RW|DEF)
195 - may appear multiple times
196 -w Num wait-sync Seconds to wait for first clock sync
197 - prohibits these options:
201 -x no slew Slew up to 600 seconds
202 opt version output version information and exit
203 -? no help display extended usage information and exit
204 -! no more-help extended usage information passed thru pager
206 Options are specified by doubled hyphens and their name or by a single
207 hyphen and the flag character.
210 The following option preset mechanisms are supported:
211 - examining environment variables named NTPD_*
213 Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
218 @subsection ipv4 option (-4)
221 This is the ``force ipv4 dns name resolution'' option.
224 This option has some usage constraints. It:
227 must not appear in combination with any of the following options:
231 Force DNS resolution of following host names on the command line
232 to the IPv4 namespace.
234 @subsection ipv6 option (-6)
237 This is the ``force ipv6 dns name resolution'' option.
240 This option has some usage constraints. It:
243 must not appear in combination with any of the following options:
247 Force DNS resolution of following host names on the command line
248 to the IPv6 namespace.
250 @subsection authreq option (-a)
253 This is the ``require crypto authentication'' option.
256 This option has some usage constraints. It:
259 must not appear in combination with any of the following options:
263 Require cryptographic authentication for broadcast client,
264 multicast client and symmetric passive associations.
267 @subsection authnoreq option (-A)
268 @cindex ntpd-authnoreq
270 This is the ``do not require crypto authentication'' option.
273 This option has some usage constraints. It:
276 must not appear in combination with any of the following options:
280 Do not require cryptographic authentication for broadcast client,
281 multicast client and symmetric passive associations.
282 This is almost never a good idea.
283 @node ntpd configfile
284 @subsection configfile option (-c)
285 @cindex ntpd-configfile
287 This is the ``configuration file name'' option.
288 This option takes a string argument.
289 The name and path of the configuration file,
293 @subsection driftfile option (-f)
294 @cindex ntpd-driftfile
296 This is the ``frequency drift file name'' option.
297 This option takes a string argument.
298 The name and path of the frequency file,
299 @file{/etc/ntp.drift}
301 This is the same operation as the
302 @code{driftfile} @kbd{driftfile}
303 configuration specification in the
307 @subsection panicgate option (-g)
308 @cindex ntpd-panicgate
310 This is the ``allow the first adjustment to be big'' option.
313 This option has some usage constraints. It:
316 may appear an unlimited number of times.
321 exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
323 will exit with a message to the system log. This option can be used with the
330 configuration file directive for other options.
331 @node ntpd force-step-once
332 @subsection force-step-once option (-G)
333 @cindex ntpd-force-step-once
335 This is the ``step any initial offset correction.'' option.
338 steps the time if the time offset exceeds the step threshold,
339 which is 128 ms by default, and otherwise slews the time.
340 This option forces the initial offset correction to be stepped,
341 so the highest time accuracy can be achieved quickly.
342 However, this may also cause the time to be stepped back
343 so this option must not be used if
344 applications requiring monotonic time are running.
345 See the @code{tinker} configuration file directive for other options.
347 @subsection jaildir option (-i)
350 This is the ``jail directory'' option.
351 This option takes a string argument.
354 This option has some usage constraints. It:
357 must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
360 Chroot the server to the directory
363 This option also implies that the server attempts to drop root privileges at startup.
364 You may need to also specify a
367 This option is only available if the OS supports adjusting the clock
368 without full root privileges.
369 This option is supported under NetBSD (configure with
370 @code{--enable-clockctl}) or Linux (configure with
371 @code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
373 @subsection interface option (-I)
374 @cindex ntpd-interface
376 This is the ``listen on an interface name or address'' option.
377 This option takes a string argument @file{iface}.
380 This option has some usage constraints. It:
383 may appear an unlimited number of times.
386 Open the network address given, or all the addresses associated with the
387 given interface name. This option may appear multiple times. This option
388 also implies not opening other addresses, except wildcard and localhost.
389 This option is deprecated. Please consider using the configuration file
390 @code{interface} command, which is more versatile.
392 @subsection keyfile option (-k)
395 This is the ``path to symmetric keys'' option.
396 This option takes a string argument.
397 Specify the name and path of the symmetric key file.
400 This is the same operation as the
401 @code{keys} @kbd{keyfile}
402 configuration file directive.
404 @subsection logfile option (-l)
407 This is the ``path to the log file'' option.
408 This option takes a string argument.
409 Specify the name and path of the log file.
410 The default is the system log file.
411 This is the same operation as the
412 @code{logfile} @kbd{logfile}
413 configuration file directive.
414 @node ntpd novirtualips
415 @subsection novirtualips option (-L)
416 @cindex ntpd-novirtualips
418 This is the ``do not listen to virtual interfaces'' option.
419 Do not listen to virtual interfaces, defined as those with
420 names containing a colon. This option is deprecated. Please
421 consider using the configuration file @code{interface} command, which
423 @node ntpd modifymmtimer
424 @subsection modifymmtimer option (-M)
425 @cindex ntpd-modifymmtimer
427 This is the ``modify multimedia timer (windows only)'' option.
430 This option has some usage constraints. It:
433 must be compiled in by defining @code{SYS_WINNT} during the compilation.
436 Set the Windows Multimedia Timer to highest resolution. This
437 ensures the resolution does not change while ntpd is running,
438 avoiding timekeeping glitches associated with changes.
440 @subsection nice option (-N)
443 This is the ``run at high priority'' option.
444 To the extent permitted by the operating system, run
446 at the highest priority.
448 @subsection pidfile option (-p)
451 This is the ``path to the pid file'' option.
452 This option takes a string argument.
453 Specify the name and path of the file used to record
456 This is the same operation as the
457 @code{pidfile} @kbd{pidfile}
458 configuration file directive.
460 @subsection priority option (-P)
461 @cindex ntpd-priority
463 This is the ``process priority'' option.
464 This option takes a number argument.
465 To the extent permitted by the operating system, run
468 @code{sched_setscheduler(SCHED_FIFO)}
471 @subsection quit option (-q)
474 This is the ``set the time and quit'' option.
477 This option has some usage constraints. It:
480 must not appear in combination with any of the following options:
481 saveconfigquit, wait-sync.
485 will not daemonize and will exit after the clock is first
486 synchronized. This behavior mimics that of the
488 program, which will soon be replaced with a shell script.
493 options can be used with this option.
494 Note: The kernel time discipline is disabled with this option.
495 @node ntpd propagationdelay
496 @subsection propagationdelay option (-r)
497 @cindex ntpd-propagationdelay
499 This is the ``broadcast/propagation delay'' option.
500 This option takes a string argument.
501 Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
502 @node ntpd saveconfigquit
503 @subsection saveconfigquit option
504 @cindex ntpd-saveconfigquit
506 This is the ``save parsed configuration and quit'' option.
507 This option takes a string argument.
510 This option has some usage constraints. It:
513 must be compiled in by defining @code{SAVECONFIG} during the compilation.
515 must not appear in combination with any of the following options:
519 Cause @code{ntpd} to parse its startup configuration file and save an
520 equivalent to the given filename and exit. This option was
521 designed for automated testing.
523 @subsection statsdir option (-s)
524 @cindex ntpd-statsdir
526 This is the ``statistics file location'' option.
527 This option takes a string argument.
528 Specify the directory path for files created by the statistics facility.
529 This is the same operation as the
530 @code{statsdir} @kbd{statsdir}
531 configuration file directive.
532 @node ntpd trustedkey
533 @subsection trustedkey option (-t)
534 @cindex ntpd-trustedkey
536 This is the ``trusted key number'' option.
537 This option takes a string argument @file{tkey}.
540 This option has some usage constraints. It:
543 may appear an unlimited number of times.
546 Add the specified key number to the trusted key list.
548 @subsection user option (-u)
551 This is the ``run as userid (or userid:groupid)'' option.
552 This option takes a string argument.
555 This option has some usage constraints. It:
558 must be compiled in by defining @code{HAVE_DROPROOT} during the compilation.
561 Specify a user, and optionally a group, to switch to.
562 This option is only available if the OS supports adjusting the clock
563 without full root privileges.
564 This option is supported under NetBSD (configure with
565 @code{--enable-clockctl}) or Linux (configure with
566 @code{--enable-linuxcaps}) or Solaris (configure with @code{--enable-solarisprivs}).
567 @node ntpd updateinterval
568 @subsection updateinterval option (-U)
569 @cindex ntpd-updateinterval
571 This is the ``interval in seconds between scans for new or dropped interfaces'' option.
572 This option takes a number argument.
573 Give the time in seconds between two scans for new or dropped interfaces.
574 For systems with routing socket support the scans will be performed shortly after the interface change
575 has been detected by the system.
576 Use 0 to disable scanning. 60 seconds is the minimum time between scans.
578 @subsection wait-sync option (-w)
579 @cindex ntpd-wait-sync
581 This is the ``seconds to wait for first clock sync'' option.
582 This option takes a number argument.
585 This option has some usage constraints. It:
588 must be compiled in by defining @code{HAVE_WORKING_FORK} during the compilation.
590 must not appear in combination with any of the following options:
591 nofork, quit, saveconfigquit.
594 If greater than zero, alters @code{ntpd}'s behavior when forking to
595 daemonize. Instead of exiting with status 0 immediately after
596 the fork, the parent waits up to the specified number of
597 seconds for the child to first synchronize the clock. The exit
598 status is zero (success) if the clock was synchronized,
599 otherwise it is @code{ETIMEDOUT}.
600 This provides the option for a script starting @code{ntpd} to easily
601 wait for the first set of the clock before proceeding.
603 @subsection slew option (-x)
606 This is the ``slew up to 600 seconds'' option.
607 Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
608 This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
609 Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.
610 Thus, an adjustment as much as 600 s will take almost 14 days to complete.
611 This option can be used with the
618 configuration file directive for other options.
619 Note: The kernel time discipline is disabled with this option.
621 @subsection usepcc option
624 This is the ``use cpu cycle counter (windows only)'' option.
627 This option has some usage constraints. It:
630 must be compiled in by defining @code{SYS_WINNT} during the compilation.
633 Attempt to substitute the CPU counter for @code{QueryPerformanceCounter}.
634 The CPU counter and @code{QueryPerformanceCounter} are compared, and if
635 they have the same frequency, the CPU counter (RDTSC on x86) is
636 used directly, saving the overhead of a system call.
638 @subsection pccfreq option
641 This is the ``force cpu cycle counter use (windows only)'' option.
642 This option takes a string argument.
645 This option has some usage constraints. It:
648 must be compiled in by defining @code{SYS_WINNT} during the compilation.
651 Force substitution the CPU counter for @code{QueryPerformanceCounter}.
652 The CPU counter (RDTSC on x86) is used unconditionally with the
653 given frequency (in Hz).
655 @subsection mdns option (-m)
658 This is the ``register with mdns as a ntp server'' option.
661 This option has some usage constraints. It:
664 must be compiled in by defining @code{HAVE_DNSREGISTRATION} during the compilation.
667 Registers as an NTP server with the local mDNS server which allows
668 the server to be discovered via mDNS client lookup.
672 @subsection presetting/configuring ntpd
674 Any option that is not marked as @i{not presettable} may be preset by
675 loading values from environment variables named @code{NTPD} and @code{NTPD_<OPTION_NAME>}. @code{<OPTION_NAME>} must be one of
676 the options listed above in upper case and segmented with underscores.
677 The @code{NTPD} variable will be tokenized and parsed like
678 the command line. The remaining variables are tested for existence and their
679 values are treated like option arguments.
682 The command line options relating to configuration and/or usage help are:
684 @subsubheading version (-)
686 Print the program version to standard out, optionally with licensing
687 information, then exit 0. The optional argument specifies how much licensing
688 detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
689 Only the first letter of the argument is examined:
693 Only print the version. This is the default.
695 Name the copyright usage licensing terms.
697 Print the full copyright usage licensing terms.
700 @node ntpd exit status
701 @subsection ntpd exit status
703 One of the following exit values will be returned:
705 @item 0 (EXIT_SUCCESS)
706 Successful program execution.
707 @item 1 (EXIT_FAILURE)
708 The operation failed or the command syntax was not valid.
711 @subsection ntpd Usage
713 @subsection ntpd Files
715 @subsection ntpd See Also
717 @subsection ntpd Bugs
719 @subsection ntpd Notes