-.\" It has been AutoGen-ed August 14, 2018 at 08:29:20 AM by AutoGen 5.18.5
-.\" From the definitions ntpd-opts.def
-.\" and the template file agmdoc-cmd.tpl
-.Sh NAME
-.Nm ntpd
-.Nd set clock via Network Time Protocol daemon
-.Sh SYNOPSIS
-.Nm
-.\" Mixture of short (flag) options and long options
-.Op Fl flags
-.Op Fl flag Op Ar value
-.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
-[ <server1> ... <serverN> ]
-.Pp
-.Sh DESCRIPTION
-The
-.Nm
-utility is an operating system daemon which sets
-and maintains the system time of day in synchronism with Internet
-standard time servers.
-It is a complete implementation of the
-Network Time Protocol (NTP) version 4, as defined by RFC\-5905,
-but also retains compatibility with
-version 3, as defined by RFC\-1305, and versions 1
-and 2, as defined by RFC\-1059 and RFC\-1119, respectively.
-.Pp
-The
-.Nm
-utility does most computations in 64\-bit floating point
-arithmetic and does relatively clumsy 64\-bit fixed point operations
-only when necessary to preserve the ultimate precision, about 232
-picoseconds.
-While the ultimate precision is not achievable with
-ordinary workstations and networks of today, it may be required
-with future gigahertz CPU clocks and gigabit LANs.
-.Pp
-Ordinarily,
-.Nm
-reads the
-.Xr ntp.conf 5
-configuration file at startup time in order to determine the
-synchronization sources and operating modes.
-It is also possible to
-specify a working, although limited, configuration entirely on the
-command line, obviating the need for a configuration file.
-This may
-be particularly useful when the local host is to be configured as a
-broadcast/multicast client, with all peers being determined by
-listening to broadcasts at run time.
-.Pp
-If NetInfo support is built into
-.Nm ,
-then
-.Nm
-will attempt to read its configuration from the
-NetInfo if the default
-.Xr ntp.conf 5
-file cannot be read and no file is
-specified by the
-.Fl c
-option.
-.Pp
-Various internal
-.Nm
-variables can be displayed and
-configuration options altered while the
-.Nm
-is running
-using the
-.Xr ntpq 8
-and
-.Xr ntpdc 8
-utility programs.
-.Pp
-When
-.Nm
-starts it looks at the value of
-.Xr umask 2 ,
-and if zero
-.Nm
-will set the
-.Xr umask 2
-to 022.
-.Sh "OPTIONS"
-.Bl -tag
-.It Fl 4 , Fl \-ipv4
-Force IPv4 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv6.
-.sp
-Force DNS resolution of following host names on the command line
-to the IPv4 namespace.
-.It Fl 6 , Fl \-ipv6
-Force IPv6 DNS name resolution.
-This option must not appear in combination with any of the following options:
-ipv4.
-.sp
-Force DNS resolution of following host names on the command line
-to the IPv6 namespace.
-.It Fl a , Fl \-authreq
-Require crypto authentication.
-This option must not appear in combination with any of the following options:
-authnoreq.
-.sp
-Require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is the default.
-.It Fl A , Fl \-authnoreq
-Do not require crypto authentication.
-This option must not appear in combination with any of the following options:
-authreq.
-.sp
-Do not require cryptographic authentication for broadcast client,
-multicast client and symmetric passive associations.
-This is almost never a good idea.
-.It Fl b , Fl \-bcastsync
-Allow us to sync to broadcast servers.
-.sp
-.It Fl c Ar string , Fl \-configfile Ns = Ns Ar string
-configuration file name.
-.sp
-The name and path of the configuration file,
-\fI/etc/ntp.conf\fP
-by default.
-.It Fl d , Fl \-debug\-level
-Increase debug verbosity level.
-This option may appear an unlimited number of times.
-.sp
-.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
-Set the debug verbosity level.
-This option may appear an unlimited number of times.
-This option takes an integer number as its argument.
-.sp
-.It Fl f Ar string , Fl \-driftfile Ns = Ns Ar string
-frequency drift file name.
-.sp
-The name and path of the frequency file,
-\fI/etc/ntp.drift\fP
-by default.
-This is the same operation as the
-\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
-\fI/etc/ntp.conf\fP
-file.
-.It Fl g , Fl \-panicgate
-Allow the first adjustment to be Big.
-This option may appear an unlimited number of times.
-.sp
-Normally,
-\fBntpd\fP
-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,
-\fBntpd\fP
-will exit with a message to the system log. This option can be used with the
-\fB\-q\fP
-and
-\fB\-x\fP
-options.
-See the
-\fBtinker\fP
-configuration file directive for other options.
-.It Fl G , Fl \-force\-step\-once
-Step any initial offset correction..
-.sp
-Normally,
-\fBntpd\fP
-steps the time if the time offset exceeds the step threshold,
-which is 128 ms by default, and otherwise slews the time.
-This option forces the initial offset correction to be stepped,
-so the highest time accuracy can be achieved quickly.
-However, this may also cause the time to be stepped back
-so this option must not be used if
-applications requiring monotonic time are running.
-See the \fBtinker\fP configuration file directive for other options.
-.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
-Jail directory.
-.sp
-Chroot the server to the directory
-\fIjaildir\fP
-.
-This option also implies that the server attempts to drop root privileges at startup.
-You may need to also specify a
-\fB\-u\fP
-option.
-This option is only available if the OS supports adjusting the clock
-without full root privileges.
-This option is supported under NetBSD (configure with
-\fB\-\-enable\-clockctl\fP) or Linux (configure with
-\fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
-.It Fl I Ar iface , Fl \-interface Ns = Ns Ar iface
-Listen on an interface name or address.
-This option may appear an unlimited number of times.
-.sp
-Open the network address given, or all the addresses associated with the
-given interface name. This option may appear multiple times. This option
-also implies not opening other addresses, except wildcard and localhost.
-This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
-.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
-path to symmetric keys.
-.sp
-Specify the name and path of the symmetric key file.
-\fI/etc/ntp.keys\fP
-is the default.
-This is the same operation as the
-\fBkeys\fP \fIkeyfile\fP
-configuration file directive.
-.It Fl l Ar string , Fl \-logfile Ns = Ns Ar string
-path to the log file.
-.sp
-Specify the name and path of the log file.
-The default is the system log file.
-This is the same operation as the
-\fBlogfile\fP \fIlogfile\fP
-configuration file directive.
-.It Fl L , Fl \-novirtualips
-Do not listen to virtual interfaces.
-.sp
-Do not listen to virtual interfaces, defined as those with
-names containing a colon. This option is deprecated. Please
-consider using the configuration file \fBinterface\fP command, which
-is more versatile.
-.It Fl M , Fl \-modifymmtimer
-Modify Multimedia Timer (Windows only).
-.sp
-Set the Windows Multimedia Timer to highest resolution. This
-ensures the resolution does not change while ntpd is running,
-avoiding timekeeping glitches associated with changes.
-.It Fl n , Fl \-nofork
-Do not fork.
-This option must not appear in combination with any of the following options:
-wait\-sync.
-.sp
-.It Fl N , Fl \-nice
-Run at high priority.
-.sp
-To the extent permitted by the operating system, run
-\fBntpd\fP
-at the highest priority.
-.It Fl p Ar string , Fl \-pidfile Ns = Ns Ar string
-path to the PID file.
-.sp
-Specify the name and path of the file used to record
-\fBntpd\fP's
-process ID.
-This is the same operation as the
-\fBpidfile\fP \fIpidfile\fP
-configuration file directive.
-.It Fl P Ar number , Fl \-priority Ns = Ns Ar number
-Process priority.
-This option takes an integer number as its argument.
-.sp
-To the extent permitted by the operating system, run
-\fBntpd\fP
-at the specified
-\fBsched_setscheduler(SCHED_FIFO)\fP
-priority.
-.It Fl q , Fl \-quit
-Set the time and quit.
-This option must not appear in combination with any of the following options:
-saveconfigquit, wait\-sync.
-.sp
-\fBntpd\fP
-will not daemonize and will exit after the clock is first
-synchronized. This behavior mimics that of the
-\fBntpdate\fP
-program, which will soon be replaced with a shell script.
-The
-\fB\-g\fP
-and
-\fB\-x\fP
-options can be used with this option.
-Note: The kernel time discipline is disabled with this option.
-.It Fl r Ar string , Fl \-propagationdelay Ns = Ns Ar string
-Broadcast/propagation delay.
-.sp
-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.
-.It Fl \-saveconfigquit Ns = Ns Ar string
-Save parsed configuration and quit.
-This option must not appear in combination with any of the following options:
-quit, wait\-sync.
-.sp
-Cause \fBntpd\fP to parse its startup configuration file and save an
-equivalent to the given filename and exit. This option was
-designed for automated testing.
-.It Fl s Ar string , Fl \-statsdir Ns = Ns Ar string
-Statistics file location.
-.sp
-Specify the directory path for files created by the statistics facility.
-This is the same operation as the
-\fBstatsdir\fP \fIstatsdir\fP
-configuration file directive.
-.It Fl t Ar tkey , Fl \-trustedkey Ns = Ns Ar tkey
-Trusted key number.
-This option may appear an unlimited number of times.
-.sp
-Add the specified key number to the trusted key list.
-.It Fl u Ar string , Fl \-user Ns = Ns Ar string
-Run as userid (or userid:groupid).
-.sp
-Specify a user, and optionally a group, to switch to.
-This option is only available if the OS supports adjusting the clock
-without full root privileges.
-This option is supported under NetBSD (configure with
-\fB\-\-enable\-clockctl\fP) or Linux (configure with
-\fB\-\-enable\-linuxcaps\fP) or Solaris (configure with \fB\-\-enable\-solarisprivs\fP).
-.It Fl U Ar number , Fl \-updateinterval Ns = Ns Ar number
-interval in seconds between scans for new or dropped interfaces.
-This option takes an integer number as its argument.
-.sp
-Give the time in seconds between two scans for new or dropped interfaces.
-For systems with routing socket support the scans will be performed shortly after the interface change
-has been detected by the system.
-Use 0 to disable scanning. 60 seconds is the minimum time between scans.
-.It Fl \-var Ns = Ns Ar nvar
-make ARG an ntp variable (RW).
-This option may appear an unlimited number of times.
-.sp
-.It Fl \-dvar Ns = Ns Ar ndvar
-make ARG an ntp variable (RW|DEF).
-This option may appear an unlimited number of times.
-.sp
-.It Fl w Ar number , Fl \-wait\-sync Ns = Ns Ar number
-Seconds to wait for first clock sync.
-This option must not appear in combination with any of the following options:
-nofork, quit, saveconfigquit.
-This option takes an integer number as its argument.
-.sp
-If greater than zero, alters \fBntpd\fP's behavior when forking to
-daemonize. Instead of exiting with status 0 immediately after
-the fork, the parent waits up to the specified number of
-seconds for the child to first synchronize the clock. The exit
-status is zero (success) if the clock was synchronized,
-otherwise it is \fBETIMEDOUT\fP.
-This provides the option for a script starting \fBntpd\fP to easily
-wait for the first set of the clock before proceeding.
-.It Fl x , Fl \-slew
-Slew up to 600 seconds.
-.sp
-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.
-This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
-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.
-Thus, an adjustment as much as 600 s will take almost 14 days to complete.
-This option can be used with the
-\fB\-g\fP
-and
-\fB\-q\fP
-options.
-See the
-\fBtinker\fP
-configuration file directive for other options.
-Note: The kernel time discipline is disabled with this option.
-.It Fl \-usepcc
-Use CPU cycle counter (Windows only).
-.sp
-Attempt to substitute the CPU counter for \fBQueryPerformanceCounter\fP.
-The CPU counter and \fBQueryPerformanceCounter\fP are compared, and if
-they have the same frequency, the CPU counter (RDTSC on x86) is
-used directly, saving the overhead of a system call.
-.It Fl \-pccfreq Ns = Ns Ar string
-Force CPU cycle counter use (Windows only).
-.sp
-Force substitution the CPU counter for \fBQueryPerformanceCounter\fP.
-The CPU counter (RDTSC on x86) is used unconditionally with the
-given frequency (in Hz).
-.It Fl m , Fl \-mdns
-Register with mDNS as a NTP server.
-.sp
-Registers as an NTP server with the local mDNS server which allows
-the server to be discovered via mDNS client lookup.
-.It Fl \&? , Fl \-help
-Display usage information and exit.
-.It Fl \&! , Fl \-more\-help
-Pass the extended usage information through a pager.
-.It Fl \-version Op Brq Ar v|c|n
-Output version of program and exit. The default mode is `v', a simple
-version. The `c' mode will print copyright information and `n' will
-print the full copyright notice.
-.El
-.Sh "OPTION PRESETS"
-Any option that is not marked as \fInot presettable\fP may be preset
-by loading values from environment variables named:
-.nf
- \fBNTPD_<option\-name>\fP or \fBNTPD\fP
-.fi
-.ad
-.Sh USAGE
-.Ss "How NTP Operates"
-The
-.Nm
-utility operates by exchanging messages with
-one or more configured servers over a range of designated poll intervals.
-When
-started, whether for the first or subsequent times, the program
-requires several exchanges from the majority of these servers so
-the signal processing and mitigation algorithms can accumulate and
-groom the data and set the clock.
-In order to protect the network
-from bursts, the initial poll interval for each server is delayed
-an interval randomized over a few seconds.
-At the default initial poll
-interval of 64s, several minutes can elapse before the clock is
-set.
-This initial delay to set the clock
-can be safely and dramatically reduced using the
-.Cm iburst
-keyword with the
-.Ic server
-configuration
-command, as described in
-.Xr ntp.conf 5 .
-.Pp
-Most operating systems and hardware of today incorporate a
-time\-of\-year (TOY) chip to maintain the time during periods when
-the power is off.
-When the machine is booted, the chip is used to
-initialize the operating system time.
-After the machine has
-synchronized to a NTP server, the operating system corrects the
-chip from time to time.
-In the default case, if
-.Nm
-detects that the time on the host
-is more than 1000s from the server time,
-.Nm
-assumes something must be terribly wrong and the only
-reliable action is for the operator to intervene and set the clock
-by hand.
-(Reasons for this include there is no TOY chip,
-or its battery is dead, or that the TOY chip is just of poor quality.)
-This causes
-.Nm
-to exit with a panic message to
-the system log.
-The
-.Fl g
-option overrides this check and the
-clock will be set to the server time regardless of the chip time
-(up to 68 years in the past or future \(em
-this is a limitation of the NTPv4 protocol).
-However, and to protect against broken hardware, such as when the
-CMOS battery fails or the clock counter becomes defective, once the
-clock has been set an error greater than 1000s will cause
-.Nm
-to exit anyway.
-.Pp
-Under ordinary conditions,
-.Nm
-adjusts the clock in
-small steps so that the timescale is effectively continuous and
-without discontinuities.
-Under conditions of extreme network
-congestion, the roundtrip delay jitter can exceed three seconds and
-the synchronization distance, which is equal to one\-half the
-roundtrip delay plus error budget terms, can become very large.