1338530Sdelphij.Dd August 14 2018
2280849Scy.Dt NTPDC 8 User Commands
3280849Scy.Os
4280849Scy.\"  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.mdoc)
555857Ssheldonh.\"
655857Ssheldonh.\" $FreeBSD: stable/11/usr.sbin/ntp/doc/ntpdc.8 338530 2018-09-08 04:09:30Z delphij $
755857Ssheldonh.\"
8338530Sdelphij.\"  It has been AutoGen-ed  August 14, 2018 at 08:29:43 AM by AutoGen 5.18.5
9280849Scy.\"  From the definitions    ntpdc-opts.def
10280849Scy.\"  and the template file   agmdoc-cmd.tpl
1155857Ssheldonh.Sh NAME
1255857Ssheldonh.Nm ntpdc
13280849Scy.Nd vendor-specific NTPD control program
1455857Ssheldonh.Sh SYNOPSIS
1568965Sru.Nm
16280849Scy.\" Mixture of short (flag) options and long options
17280849Scy.Op Fl flags
18280849Scy.Op Fl flag Op Ar value
19280849Scy.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
20280849Scy[ host ...]
21280849Scy.Pp
2255857Ssheldonh.Sh DESCRIPTION
2355857Ssheldonh.Nm
24280849Scyis deprecated.
25280849ScyPlease use
26280849Scy.Xr ntpq 8 instead \- it can do everything
27280849Scy.Nm
28280849Scyused to do, and it does so using a much more sane interface.
29280849Scy.Pp
30280849Scy.Nm
31280849Scyis a utility program used to query
3255857Ssheldonh.Xr ntpd 8
33280849Scyabout its
3482501Ssheldonhcurrent state and to request changes in that state.
35280849ScyIt uses NTP mode 7 control message formats described in the source code.
3682501SsheldonhThe program may
3782501Ssheldonhbe run either in interactive mode or controlled using command line
3882501Ssheldonharguments.
3982501SsheldonhExtensive state and statistics information is available
4082501Ssheldonhthrough the
4155857Ssheldonh.Nm
4255857Ssheldonhinterface.
4382501SsheldonhIn addition, nearly all the
4482501Ssheldonhconfiguration options which can be specified at startup using
4582501Ssheldonhntpd's configuration file may also be specified at run time using
4668965Sru.Nm .
47280849Scy.Sh "OPTIONS"
48280849Scy.Bl -tag
49280849Scy.It  Fl 4 , Fl \-ipv4 
50280849ScyForce IPv4 DNS name resolution.
51280849ScyThis option must not appear in combination with any of the following options:
52280849Scyipv6.
53280849Scy.sp
54280849ScyForce DNS resolution of following host names on the command line
55280849Scyto the IPv4 namespace.
56280849Scy.It  Fl 6 , Fl \-ipv6 
57280849ScyForce IPv6 DNS name resolution.
58280849ScyThis option must not appear in combination with any of the following options:
59280849Scyipv4.
60280849Scy.sp
61280849ScyForce DNS resolution of following host names on the command line
62280849Scyto the IPv6 namespace.
63280849Scy.It  Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd 
64280849Scyrun a command and exit.
65280849ScyThis option may appear an unlimited number of times.
66280849Scy.sp
67280849ScyThe following argument is interpreted as an interactive format command
68280849Scyand is added to the list of commands to be executed on the specified
69280849Scyhost(s).
70280849Scy.It  Fl d , Fl \-debug\-level 
71280849ScyIncrease debug verbosity level.
72280849ScyThis option may appear an unlimited number of times.
73280849Scy.sp
74280849Scy.It  Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number 
75280849ScySet the debug verbosity level.
76280849ScyThis option may appear an unlimited number of times.
77280849ScyThis option takes an integer number as its argument.
78280849Scy.sp
79280849Scy.It  Fl i , Fl \-interactive 
80280849ScyForce ntpq to operate in interactive mode.
81280849ScyThis option must not appear in combination with any of the following options:
82280849Scycommand, listpeers, peers, showpeers.
83280849Scy.sp
84280849ScyForce ntpq to operate in interactive mode.  Prompts will be written
85280849Scyto the standard output and commands read from the standard input.
86280849Scy.It  Fl l , Fl \-listpeers 
87280849ScyPrint a list of the peers.
88280849ScyThis option must not appear in combination with any of the following options:
89280849Scycommand.
90280849Scy.sp
91280849ScyPrint a list of the peers known to the server as well as a summary of
92280849Scytheir state. This is equivalent to the 'listpeers' interactive command.
93280849Scy.It  Fl n , Fl \-numeric 
94280849Scynumeric host addresses.
95280849Scy.sp
96280849ScyOutput all host addresses in dotted\-quad numeric format rather than
97280849Scyconverting to the canonical host names. 
98280849Scy.It  Fl p , Fl \-peers 
99280849ScyPrint a list of the peers.
100280849ScyThis option must not appear in combination with any of the following options:
101280849Scycommand.
102280849Scy.sp
103280849ScyPrint a list of the peers known to the server as well as a summary
104280849Scyof their state. This is equivalent to the 'peers' interactive command.
105280849Scy.It  Fl s , Fl \-showpeers 
106280849ScyShow a list of the peers.
107280849ScyThis option must not appear in combination with any of the following options:
108280849Scycommand.
109280849Scy.sp
110280849ScyPrint a list of the peers known to the server as well as a summary
111280849Scyof their state. This is equivalent to the 'dmpeers' interactive command.
112280849Scy.It Fl \&? , Fl \-help
113280849ScyDisplay usage information and exit.
114280849Scy.It Fl \&! , Fl \-more\-help
115280849ScyPass the extended usage information through a pager.
116280849Scy.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
117280849ScySave the option state to \fIcfgfile\fP.  The default is the \fIlast\fP
118280849Scyconfiguration file listed in the \fBOPTION PRESETS\fP section, below.
119280849ScyThe command will exit after updating the config file.
120280849Scy.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
121280849ScyLoad options from \fIcfgfile\fP.
122280849ScyThe \fIno\-load\-opts\fP form will disable the loading
123280849Scyof earlier config/rc/ini files.  \fI\-\-no\-load\-opts\fP is handled early,
124280849Scyout of order.
125280849Scy.It Fl \-version Op Brq Ar v|c|n
126280849ScyOutput version of program and exit.  The default mode is `v', a simple
127280849Scyversion.  The `c' mode will print copyright information and `n' will
128280849Scyprint the full copyright notice.
12982501Ssheldonh.El
130280849Scy.Sh "OPTION PRESETS"
131280849ScyAny option that is not marked as \fInot presettable\fP may be preset
132280849Scyby loading values from configuration ("RC" or ".INI") file(s) and values from
133280849Scyenvironment variables named:
134280849Scy.nf
135280849Scy  \fBNTPDC_<option\-name>\fP or \fBNTPDC\fP
136280849Scy.fi
137280849Scy.ad
138280849ScyThe environmental presets take precedence (are processed later than)
139280849Scythe configuration files.
140280849ScyThe \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
141280849ScyIf any of these are directories, then the file \fI.ntprc\fP
142280849Scyis searched for within those directories.
143280849Scy.Sh USAGE
14482501SsheldonhIf one or more request options are included on the command line
14582501Ssheldonhwhen
14655857Ssheldonh.Nm
14782501Ssheldonhis executed, each of the requests will be sent
14882501Ssheldonhto the NTP servers running on each of the hosts given as command
14982501Ssheldonhline arguments, or on localhost by default.
15082501SsheldonhIf no request options
15182501Ssheldonhare given,
15282501Ssheldonh.Nm
15382501Ssheldonhwill attempt to read commands from the
15482501Ssheldonhstandard input and execute these on the NTP server running on the
15582501Ssheldonhfirst host given on the command line, again defaulting to localhost
15655857Ssheldonhwhen no other host is specified.
15799968ScharnierThe
15855857Ssheldonh.Nm
15999968Scharnierutility will prompt for
16082501Ssheldonhcommands if the standard input is a terminal device.
16155857Ssheldonh.Pp
16299968ScharnierThe
16355857Ssheldonh.Nm
16499968Scharnierutility uses NTP mode 7 packets to communicate with the
165108317SschweikhNTP server, and hence can be used to query any compatible server on
16682501Ssheldonhthe network which permits it.
16755857SsheldonhNote that since NTP is a UDP protocol
16882501Ssheldonhthis communication will be somewhat unreliable, especially over
16982501Ssheldonhlarge distances in terms of network topology.
17099968ScharnierThe
17155857Ssheldonh.Nm
17299968Scharnierutility makes
17382501Ssheldonhno attempt to retransmit requests, and will time requests out if
17482501Ssheldonhthe remote host is not heard from within a suitable timeout
17582501Ssheldonhtime.
17655857Ssheldonh.Pp
17755857SsheldonhThe operation of
17855857Ssheldonh.Nm
17982501Ssheldonhare specific to the particular
18082501Ssheldonhimplementation of the
18155857Ssheldonh.Xr ntpd 8
18282501Ssheldonhdaemon and can be expected to
18382501Ssheldonhwork only with this and maybe some previous versions of the daemon.
18455857SsheldonhRequests from a remote
18555857Ssheldonh.Nm
18699968Scharnierutility which affect the
18782501Ssheldonhstate of the local server must be authenticated, which requires
18882501Ssheldonhboth the remote program and local server share a common key and key
18982501Ssheldonhidentifier.
190158688Spav.Pp
191158688SpavNote that in contexts where a host name is expected, a
192158688Spav.Fl 4
193158688Spavqualifier preceding the host name forces DNS resolution to the IPv4 namespace,
194158688Spavwhile a
195158688Spav.Fl 6
196158688Spavqualifier forces DNS resolution to the IPv6 namespace.
19755857SsheldonhSpecifying a command line option other than
19855857Ssheldonh.Fl i
19955857Ssheldonhor
20055857Ssheldonh.Fl n
20182501Ssheldonhwill cause the specified query (queries) to be sent to
20282501Ssheldonhthe indicated host(s) immediately.
20355857SsheldonhOtherwise,
20455857Ssheldonh.Nm
20582501Ssheldonhwill
20682501Ssheldonhattempt to read interactive format commands from the standard
20755857Ssheldonhinput.
20882501Ssheldonh.Ss "Interactive Commands"
20982501SsheldonhInteractive format commands consist of a keyword followed by zero
21082501Ssheldonhto four arguments.
21182501SsheldonhOnly enough characters of the full keyword to
21282501Ssheldonhuniquely identify the command need be typed.
21382501SsheldonhThe output of a
21482501Ssheldonhcommand is normally sent to the standard output, but optionally the
21582501Ssheldonhoutput of individual commands may be sent to a file by appending a
21689625Sroberto.Ql \&> ,
21782501Ssheldonhfollowed by a file name, to the command line.
21855857Ssheldonh.Pp
21982501SsheldonhA number of interactive format commands are executed entirely
22082501Ssheldonhwithin the
22155857Ssheldonh.Nm
22299968Scharnierutility itself and do not result in NTP
22382501Ssheldonhmode 7 requests being sent to a server.
22482501SsheldonhThese are described
22582501Ssheldonhfollowing.
22655857Ssheldonh.Bl -tag -width indent
22782501Ssheldonh.It Ic \&? Ar command_keyword
22882501Ssheldonh.It Ic help Ar command_keyword
22955857SsheldonhA
230162806Sru.Sq Ic \&?
23182501Ssheldonhwill print a list of all the command
23282501Ssheldonhkeywords known to this incarnation of
23368965Sru.Nm .
23455857SsheldonhA
235162806Sru.Sq Ic \&?
23682501Ssheldonhfollowed by a command keyword will print function and usage
23782501Ssheldonhinformation about the command.
23855857SsheldonhThis command is probably a better
23955857Ssheldonhsource of information about
24082501Ssheldonh.Xr ntpq 8
24182501Ssheldonhthan this manual
24282501Ssheldonhpage.
24355857Ssheldonh.It Ic delay Ar milliseconds
24482501SsheldonhSpecify a time interval to be added to timestamps included in
24582501Ssheldonhrequests which require authentication.
24682501SsheldonhThis is used to enable
24782501Ssheldonh(unreliable) server reconfiguration over long delay network paths
24882501Ssheldonhor between machines whose clocks are unsynchronized.
24982501SsheldonhActually the
25082501Ssheldonhserver does not now require timestamps in authenticated requests,
25155857Ssheldonhso this command may be obsolete.
25255857Ssheldonh.It Ic host Ar hostname
25355857SsheldonhSet the host to which future queries will be sent.
25482501SsheldonhHostname may
25582501Ssheldonhbe either a host name or a numeric address.
25682501Ssheldonh.It Ic hostnames Op Cm yes | Cm no
25755857SsheldonhIf
25882501Ssheldonh.Cm yes
25982501Ssheldonhis specified, host names are printed in
26082501Ssheldonhinformation displays.
26155857SsheldonhIf
26282501Ssheldonh.Cm no
26382501Ssheldonhis specified, numeric
26482501Ssheldonhaddresses are printed instead.
26555857SsheldonhThe default is
26682501Ssheldonh.Cm yes ,
26782501Ssheldonhunless
26882501Ssheldonhmodified using the command line
26955857Ssheldonh.Fl n
27055857Ssheldonhswitch.
27155857Ssheldonh.It Ic keyid Ar keyid
27282501SsheldonhThis command allows the specification of a key number to be
27382501Ssheldonhused to authenticate configuration requests.
27482501SsheldonhThis must correspond
27582501Ssheldonhto a key number the server has been configured to use for this
27682501Ssheldonhpurpose.
27755857Ssheldonh.It Ic quit
27855857SsheldonhExit
27968965Sru.Nm .
28055857Ssheldonh.It Ic passwd
28182501SsheldonhThis command prompts you to type in a password (which will not
28282501Ssheldonhbe echoed) which will be used to authenticate configuration
28382501Ssheldonhrequests.
28482501SsheldonhThe password must correspond to the key configured for
28582501Ssheldonhuse by the NTP server for this purpose if such requests are to be
28682501Ssheldonhsuccessful.
28755857Ssheldonh.It Ic timeout Ar milliseconds
28855857SsheldonhSpecify a timeout period for responses to server queries.
28982501SsheldonhThe
29082501Ssheldonhdefault is about 8000 milliseconds.
29155857SsheldonhNote that since
29255857Ssheldonh.Nm
29382501Ssheldonhretries each query once after a timeout, the total waiting time for
29482501Ssheldonha timeout will be twice the timeout value set.
29555857Ssheldonh.El
29682501Ssheldonh.Ss "Control Message Commands"
29782501SsheldonhQuery commands result in NTP mode 7 packets containing requests for
29855857Ssheldonhinformation being sent to the server.
299280849ScyThese are read\-only commands
30082501Ssheldonhin that they make no modification of the server configuration
30155857Ssheldonhstate.
30255857Ssheldonh.Bl -tag -width indent
30355857Ssheldonh.It Ic listpeers
30482501SsheldonhObtains and prints a brief list of the peers for which the
30582501Ssheldonhserver is maintaining state.
30682501SsheldonhThese should include all configured
30782501Ssheldonhpeer associations as well as those peers whose stratum is such that
30882501Ssheldonhthey are considered by the server to be possible future
309148580Skeramidasynchronization candidates.
31055857Ssheldonh.It Ic peers
31182501SsheldonhObtains a list of peers for which the server is maintaining
31282501Ssheldonhstate, along with a summary of that state.
31382501SsheldonhSummary information
31482501Ssheldonhincludes the address of the remote peer, the local interface
31582501Ssheldonhaddress (0.0.0.0 if a local address has yet to be determined), the
31682501Ssheldonhstratum of the remote peer (a stratum of 16 indicates the remote
31782501Ssheldonhpeer is unsynchronized), the polling interval, in seconds, the
31882501Ssheldonhreachability register, in octal, and the current estimated delay,
31982501Ssheldonhoffset and dispersion of the peer, all in seconds.
32082501Ssheldonh.Pp
32182501SsheldonhThe character in the left margin indicates the mode this peer
32282501Ssheldonhentry is operating in.
32355857SsheldonhA
32482501Ssheldonh.Ql \&+
32582501Ssheldonhdenotes symmetric active, a
326280849Scy.Ql \&\-
32755857Ssheldonhindicates symmetric passive, a
32882501Ssheldonh.Ql \&=
32982501Ssheldonhmeans the
33082501Ssheldonhremote server is being polled in client mode, a
33182501Ssheldonh.Ql \&^
33255857Ssheldonhindicates that the server is broadcasting to this address, a
33382501Ssheldonh.Ql \&~
33455857Ssheldonhdenotes that the remote peer is sending broadcasts and a
335280849Scy.Ql \&~
336280849Scydenotes that the remote peer is sending broadcasts and a
33782501Ssheldonh.Ql \&*
338108317Sschweikhmarks the peer the server is currently synchronizing
33982501Ssheldonhto.
34055857Ssheldonh.Pp
34155857SsheldonhThe contents of the host field may be one of four forms.
34282501SsheldonhIt may
34382501Ssheldonhbe a host name, an IP address, a reference clock implementation
34482501Ssheldonhname with its parameter or
34582501Ssheldonh.Fn REFCLK "implementation_number" "parameter" .
34682501SsheldonhOn
34782501Ssheldonh.Ic hostnames
34882501Ssheldonh.Cm no
349280849Scyonly IP\-addresses
35082501Ssheldonhwill be displayed.
35155857Ssheldonh.It Ic dmpeers
35255857SsheldonhA slightly different peer summary list.
35382501SsheldonhIdentical to the output
35482501Ssheldonhof the
35582501Ssheldonh.Ic peers
35682501Ssheldonhcommand, except for the character in the
35782501Ssheldonhleftmost column.
35882501SsheldonhCharacters only appear beside peers which were
35982501Ssheldonhincluded in the final stage of the clock selection algorithm.
36055857SsheldonhA
361107311Sru.Ql \&.
36282501Ssheldonhindicates that this peer was cast off in the falseticker
36382501Ssheldonhdetection, while a
364107311Sru.Ql \&+
36582501Ssheldonhindicates that the peer made it
36682501Ssheldonhthrough.
36755857SsheldonhA
368107311Sru.Ql \&*
36982501Ssheldonhdenotes the peer the server is currently
37082501Ssheldonhsynchronizing with.
371158688Spav.It Ic showpeer Ar peer_address Oo Ar ... Oc
37282501SsheldonhShows a detailed display of the current peer variables for one
37382501Ssheldonhor more peers.
37482501SsheldonhMost of these values are described in the NTP
37582501SsheldonhVersion 2 specification.
376158688Spav.It Ic pstats Ar peer_address Oo Ar ... Oc
377280849ScyShow per\-peer statistic counters associated with the specified
37882501Ssheldonhpeer(s).
379280849Scy.It Ic clockstat Ar clock_peer_address Oo Ar ... Oc
38055857SsheldonhObtain and print information concerning a peer clock.
38182501SsheldonhThe
38282501Ssheldonhvalues obtained provide information on the setting of fudge factors
38382501Ssheldonhand other clock performance information.
38455857Ssheldonh.It Ic kerninfo
385280849ScyObtain and print kernel phase\-lock loop operating parameters.
38682501SsheldonhThis information is available only if the kernel has been specially
38782501Ssheldonhmodified for a precision timekeeping function.
38882501Ssheldonh.It Ic loopinfo Op Cm oneline | Cm multiline
38955857SsheldonhPrint the values of selected loop filter variables.
39082501SsheldonhThe loop
39182501Ssheldonhfilter is the part of NTP which deals with adjusting the local
39282501Ssheldonhsystem clock.
39355857SsheldonhThe
39482501Ssheldonh.Sq offset
39582501Ssheldonhis the last offset given to the
39682501Ssheldonhloop filter by the packet processing code.
39755857SsheldonhThe
39882501Ssheldonh.Sq frequency
399280849Scyis the frequency error of the local clock in parts\-per\-million
40082501Ssheldonh(ppm).
40155857SsheldonhThe
40282501Ssheldonh.Sq time_const
40382501Ssheldonhcontrols the stiffness of the
404280849Scyphase\-lock loop and thus the speed at which it can adapt to
40582501Ssheldonhoscillator drift.
40655857SsheldonhThe
40782501Ssheldonh.Sq watchdog timer
40882501Ssheldonhvalue is the number
40982501Ssheldonhof seconds which have elapsed since the last sample offset was
41082501Ssheldonhgiven to the loop filter.
41155857SsheldonhThe
41282501Ssheldonh.Cm oneline
41355857Ssheldonhand
41482501Ssheldonh.Cm multiline
41582501Ssheldonhoptions specify the format in which this
41682501Ssheldonhinformation is to be printed, with
41782501Ssheldonh.Cm multiline
41882501Ssheldonhas the
41982501Ssheldonhdefault.
42055857Ssheldonh.It Ic sysinfo
42182501SsheldonhPrint a variety of system state variables, i.e., state related
42282501Ssheldonhto the local server.
42382501SsheldonhAll except the last four lines are described
424280849Scyin the NTP Version 3 specification, RFC\-1305.
42582501Ssheldonh.Pp
42655857SsheldonhThe
42782501Ssheldonh.Sq system flags
42882501Ssheldonhshow various system flags, some of
42982501Ssheldonhwhich can be set and cleared by the
43055857Ssheldonh.Ic enable
43155857Ssheldonhand
43255857Ssheldonh.Ic disable
43382501Ssheldonhconfiguration commands, respectively.
43482501SsheldonhThese are
43582501Ssheldonhthe
436131531Sru.Cm auth ,
43782501Ssheldonh.Cm bclient ,
43882501Ssheldonh.Cm monitor ,
43982501Ssheldonh.Cm pll ,
44082501Ssheldonh.Cm pps
44182501Ssheldonhand
44282501Ssheldonh.Cm stats
44382501Ssheldonhflags.
44482501SsheldonhSee the
44582501Ssheldonh.Xr ntpd 8
44682501Ssheldonhdocumentation for the meaning of these flags.
44782501SsheldonhThere
44882501Ssheldonhare two additional flags which are read only, the
44982501Ssheldonh.Cm kernel_pll
45082501Ssheldonhand
45182501Ssheldonh.Cm kernel_pps .
45282501SsheldonhThese flags indicate
45382501Ssheldonhthe synchronization status when the precision time kernel
45482501Ssheldonhmodifications are in use.
45582501SsheldonhThe
45682501Ssheldonh.Sq kernel_pll
45782501Ssheldonhindicates that
45882501Ssheldonhthe local clock is being disciplined by the kernel, while the
45982501Ssheldonh.Sq kernel_pps
46082501Ssheldonhindicates the kernel discipline is provided by the PPS
46182501Ssheldonhsignal.
46255857Ssheldonh.Pp
46355857SsheldonhThe
46482501Ssheldonh.Sq stability
46582501Ssheldonhis the residual frequency error remaining
46689625Srobertoafter the system frequency correction is applied and is intended for
46782501Ssheldonhmaintenance and debugging.
46882501SsheldonhIn most architectures, this value will
46982501Ssheldonhinitially decrease from as high as 500 ppm to a nominal value in
47082501Ssheldonhthe range .01 to 0.1 ppm.
47155857SsheldonhIf it remains high for some time after
47282501Ssheldonhstarting the daemon, something may be wrong with the local clock,
47382501Ssheldonhor the value of the kernel variable
47482501Ssheldonh.Va kern.clockrate.tick
47582501Ssheldonhmay be
47682501Ssheldonhincorrect.
47755857Ssheldonh.Pp
47855857SsheldonhThe
47989625Sroberto.Sq broadcastdelay
48082501Ssheldonhshows the default broadcast delay,
48182501Ssheldonhas set by the
48282501Ssheldonh.Ic broadcastdelay
48382501Ssheldonhconfiguration command.
48482501Ssheldonh.Pp
48582501SsheldonhThe
48682501Ssheldonh.Sq authdelay
48782501Ssheldonhshows the default authentication delay,
48882501Ssheldonhas set by the
48982501Ssheldonh.Ic authdelay
49082501Ssheldonhconfiguration command.
49155857Ssheldonh.It Ic sysstats
49282501SsheldonhPrint statistics counters maintained in the protocol
49382501Ssheldonhmodule.
49455857Ssheldonh.It Ic memstats
49555857SsheldonhPrint statistics counters related to memory allocation
49655857Ssheldonhcode.
49755857Ssheldonh.It Ic iostats
498280849ScyPrint statistics counters maintained in the input\-output
49982501Ssheldonhmodule.
50055857Ssheldonh.It Ic timerstats
50182501SsheldonhPrint statistics counters maintained in the timer/event queue
50282501Ssheldonhsupport code.
50355857Ssheldonh.It Ic reslist
50455857SsheldonhObtain and print the server's restriction list.
50582501SsheldonhThis list is
50682501Ssheldonh(usually) printed in sorted order and may help to understand how
50782501Ssheldonhthe restrictions are applied.
50855857Ssheldonh.It Ic monlist Op Ar version
50982501SsheldonhObtain and print traffic counts collected and maintained by the
51082501Ssheldonhmonitor facility.
51182501SsheldonhThe version number should not normally need to be
51282501Ssheldonhspecified.
513158688Spav.It Ic clkbug Ar clock_peer_address Oo Ar ... Oc
51455857SsheldonhObtain debugging information for a reference clock driver.
51582501SsheldonhThis
51682501Ssheldonhinformation is provided only by some clock drivers and is mostly
51755857Ssheldonhundecodable without a copy of the driver source in hand.
51855857Ssheldonh.El
51982501Ssheldonh.Ss "Runtime Configuration Requests"
52082501SsheldonhAll requests which cause state changes in the server are
52182501Ssheldonhauthenticated by the server using a configured NTP key (the
52282501Ssheldonhfacility can also be disabled by the server by not configuring a
52382501Ssheldonhkey).
52482501SsheldonhThe key number and the corresponding key must also be made
52582501Ssheldonhknown to
52668965Sru.Nm .
52755857SsheldonhThis can be done using the
52855857Ssheldonh.Ic keyid
52955857Ssheldonhand
53055857Ssheldonh.Ic passwd
53182501Ssheldonhcommands, the latter of which will prompt at the terminal for a
53282501Ssheldonhpassword to use as the encryption key.
53382501SsheldonhYou will also be prompted
53482501Ssheldonhautomatically for both the key number and password the first time a
53582501Ssheldonhcommand which would result in an authenticated request to the
53682501Ssheldonhserver is given.
53782501SsheldonhAuthentication not only provides verification that
53882501Ssheldonhthe requester has permission to make such changes, but also gives
53982501Ssheldonhan extra degree of protection again transmission errors.
54055857Ssheldonh.Pp
54182501SsheldonhAuthenticated requests always include a timestamp in the packet
54282501Ssheldonhdata, which is included in the computation of the authentication
54382501Ssheldonhcode.
54482501SsheldonhThis timestamp is compared by the server to its receive time
54582501Ssheldonhstamp.
54682501SsheldonhIf they differ by more than a small amount the request is
54782501Ssheldonhrejected.
54855857SsheldonhThis is done for two reasons.
54982501SsheldonhFirst, it makes simple
55082501Ssheldonhreplay attacks on the server, by someone who might be able to
55182501Ssheldonhoverhear traffic on your LAN, much more difficult.
55282501SsheldonhSecond, it makes
55382501Ssheldonhit more difficult to request configuration changes to your server
55482501Ssheldonhfrom topologically remote hosts.
55582501SsheldonhWhile the reconfiguration facility
55682501Ssheldonhwill work well with a server on the local host, and may work
557280849Scyadequately between time\-synchronized hosts on the same LAN, it will
55882501Ssheldonhwork very poorly for more distant hosts.
55982501SsheldonhAs such, if reasonable
56082501Ssheldonhpasswords are chosen, care is taken in the distribution and
56155857Ssheldonhprotection of keys and appropriate source address restrictions are
56255857Ssheldonhapplied, the run time reconfiguration facility should provide an
56355857Ssheldonhadequate level of security.
56455857Ssheldonh.Pp
56555857SsheldonhThe following commands all make authenticated requests.
56655857Ssheldonh.Bl -tag -width indent
56782501Ssheldonh.It Xo Ic addpeer Ar peer_address
56855857Ssheldonh.Op Ar keyid
56955857Ssheldonh.Op Ar version
57082501Ssheldonh.Op Cm prefer
57155857Ssheldonh.Xc
57282501SsheldonhAdd a configured peer association at the given address and
57382501Ssheldonhoperating in symmetric active mode.
57482501SsheldonhNote that an existing
57582501Ssheldonhassociation with the same peer may be deleted when this command is
57682501Ssheldonhexecuted, or may simply be converted to conform to the new
57782501Ssheldonhconfiguration, as appropriate.
57882501SsheldonhIf the optional
57955857Ssheldonh.Ar keyid
58082501Ssheldonhis a
58182501Ssheldonhnonzero integer, all outgoing packets to the remote server will
58282501Ssheldonhhave an authentication field attached encrypted with this key.
58382501SsheldonhIf
58482501Ssheldonhthe value is 0 (or not given) no authentication will be done.
58555857SsheldonhThe
58655857Ssheldonh.Ar version
58755857Ssheldonhcan be 1, 2 or 3 and defaults to 3.
58855857SsheldonhThe
58982501Ssheldonh.Cm prefer
59082501Ssheldonhkeyword indicates a preferred peer (and thus will
59182501Ssheldonhbe used primarily for clock synchronisation if possible).
59282501SsheldonhThe
593280849Scypreferred peer also determines the validity of the PPS signal \- if
59482501Ssheldonhthe preferred peer is suitable for synchronisation so is the PPS
59582501Ssheldonhsignal.
59682501Ssheldonh.It Xo Ic addserver Ar peer_address
59755857Ssheldonh.Op Ar keyid
59855857Ssheldonh.Op Ar version
59982501Ssheldonh.Op Cm prefer
60055857Ssheldonh.Xc
60182501SsheldonhIdentical to the addpeer command, except that the operating
60282501Ssheldonhmode is client.
60382501Ssheldonh.It Xo Ic broadcast Ar peer_address
60455857Ssheldonh.Op Ar keyid
60555857Ssheldonh.Op Ar version
60682501Ssheldonh.Op Cm prefer
60755857Ssheldonh.Xc
60882501SsheldonhIdentical to the addpeer command, except that the operating
60982501Ssheldonhmode is broadcast.
61082501SsheldonhIn this case a valid key identifier and key are
61182501Ssheldonhrequired.
61255857SsheldonhThe
61355857Ssheldonh.Ar peer_address
61482501Ssheldonhparameter can be the broadcast
61582501Ssheldonhaddress of the local network or a multicast group address assigned
61682501Ssheldonhto NTP.
617280849ScyIf a multicast address, a multicast\-capable kernel is
61882501Ssheldonhrequired.
619158688Spav.It Ic unconfig Ar peer_address Oo Ar ... Oc
62082501SsheldonhThis command causes the configured bit to be removed from the
62182501Ssheldonhspecified peer(s).
62282501SsheldonhIn many cases this will cause the peer
62382501Ssheldonhassociation to be deleted.
62482501SsheldonhWhen appropriate, however, the
62582501Ssheldonhassociation may persist in an unconfigured mode if the remote peer
62682501Ssheldonhis willing to continue on in this fashion.
62782501Ssheldonh.It Xo Ic fudge Ar peer_address
62882501Ssheldonh.Op Cm time1
62982501Ssheldonh.Op Cm time2
63055857Ssheldonh.Op Ar stratum
63155857Ssheldonh.Op Ar refid
63255857Ssheldonh.Xc
63382501SsheldonhThis command provides a way to set certain data for a reference
63482501Ssheldonhclock.
63555857SsheldonhSee the source listing for further information.
636158688Spav.It Xo Ic enable
637158688Spav.Oo
638158688Spav.Cm auth | Cm bclient |
639158688Spav.Cm calibrate | Cm kernel |
640158688Spav.Cm monitor | Cm ntp |
641158688Spav.Cm pps | Cm stats
642158688Spav.Oc
643158688Spav.Xc
644158688Spav.It Xo Ic disable
645158688Spav.Oo
646158688Spav.Cm auth | Cm bclient |
647158688Spav.Cm calibrate | Cm kernel |
648158688Spav.Cm monitor | Cm ntp |
649158688Spav.Cm pps | Cm stats
650158688Spav.Oc
651158688Spav.Xc
65255857SsheldonhThese commands operate in the same way as the
65382501Ssheldonh.Ic enable
65460589Ssheldonhand
65582501Ssheldonh.Ic disable
65655857Ssheldonhconfiguration file commands of
657131531Sru.Xr ntpd 8 .
65855857Ssheldonh.Bl -tag -width indent
65982501Ssheldonh.It Cm auth
66082501SsheldonhEnables the server to synchronize with unconfigured peers only
661158688Spavif the peer has been correctly authenticated using either public key
662162806Sruor private key cryptography.
663162806SruThe default for this flag is enable.
66482501Ssheldonh.It Cm bclient
66582501SsheldonhEnables the server to listen for a message from a broadcast or
666158688Spavmulticast server, as in the multicastclient command with
667162806Srudefault address.
668162806SruThe default for this flag is disable.
669158688Spav.It Cm calibrate
670158688SpavEnables the calibrate feature for reference clocks.
67155857SsheldonhThe default for this flag is disable.
672158688Spav.It Cm kernel
673158688SpavEnables the kernel time discipline, if available.
674158688SpavThe default for this flag is enable if support is available, otherwise disable.
67582501Ssheldonh.It Cm monitor
676162806SruEnables the monitoring facility.
677280849ScySee the documentation here about the
678280849Scy.Cm monlist
679280849Scycommand or further information.
680158688SpavThe default for this flag is enable.
681158688Spav.It Cm ntp
682158688SpavEnables time and frequency discipline.
683158688SpavIn effect, this switch opens and closes the feedback loop,
684162806Sruwhich is useful for testing.
685162806SruThe default for this flag is enable.
686158688Spav.It Cm pps
687280849ScyEnables the pulse\-per\-second (PPS) signal when frequency
688158688Spavand time is disciplined by the precision time kernel modifications.
68982501SsheldonhSee the
690158688Spav.Qq A Kernel Model for Precision Timekeeping
69158350Ssheldonh(available as part of the HTML documentation
69258350Ssheldonhprovided in
69358350Ssheldonh.Pa /usr/share/doc/ntp )
694162806Srupage for further information.
695162806SruThe default for this flag is disable.
69682501Ssheldonh.It Cm stats
69755857SsheldonhEnables the statistics facility.
69855857SsheldonhSee the
69982501Ssheldonh.Sx Monitoring Options
700158688Spavsection of
70155895Ssheldonh.Xr ntp.conf 5
702158688Spavfor further information.
703158688SpavThe default for this flag is disable.
70455857Ssheldonh.El
70582501Ssheldonh.It Xo Ic restrict Ar address Ar mask
706158688Spav.Ar flag Oo Ar ... Oc
70755857Ssheldonh.Xc
70882501SsheldonhThis command operates in the same way as the
70982501Ssheldonh.Ic restrict
71082501Ssheldonhconfiguration file commands of
711131531Sru.Xr ntpd 8 .
71282501Ssheldonh.It Xo Ic unrestrict Ar address Ar mask
713158688Spav.Ar flag Oo Ar ... Oc
71455857Ssheldonh.Xc
71555857SsheldonhUnrestrict the matching entry from the restrict list.
71682501Ssheldonh.It Xo Ic delrestrict Ar address Ar mask
71782501Ssheldonh.Op Cm ntpport
71855857Ssheldonh.Xc
71955857SsheldonhDelete the matching entry from the restrict list.
72055857Ssheldonh.It Ic readkeys
72182501SsheldonhCauses the current set of authentication keys to be purged and
72282501Ssheldonha new set to be obtained by rereading the keys file (which must
72382501Ssheldonhhave been specified in the
72455857Ssheldonh.Xr ntpd 8
72555857Ssheldonhconfiguration file).
72682501SsheldonhThis
72782501Ssheldonhallows encryption keys to be changed without restarting the
72882501Ssheldonhserver.
729158688Spav.It Ic trustedkey Ar keyid Oo Ar ... Oc
730158688Spav.It Ic untrustedkey Ar keyid Oo Ar ... Oc
73155857SsheldonhThese commands operate in the same way as the
73282501Ssheldonh.Ic trustedkey
73355857Ssheldonhand
73482501Ssheldonh.Ic untrustedkey
73582501Ssheldonhconfiguration file
73682501Ssheldonhcommands of
737131531Sru.Xr ntpd 8 .
73855857Ssheldonh.It Ic authinfo
73982501SsheldonhReturns information concerning the authentication module,
74082501Ssheldonhincluding known keys and counts of encryptions and decryptions
74182501Ssheldonhwhich have been done.
74255857Ssheldonh.It Ic traps
74355857SsheldonhDisplay the traps set in the server.
74482501SsheldonhSee the source listing for
74582501Ssheldonhfurther information.
74682501Ssheldonh.It Xo Ic addtrap Ar address
74755857Ssheldonh.Op Ar port
74855857Ssheldonh.Op Ar interface
74955857Ssheldonh.Xc
75055857SsheldonhSet a trap for asynchronous messages.
75182501SsheldonhSee the source listing
75282501Ssheldonhfor further information.
75382501Ssheldonh.It Xo Ic clrtrap Ar address
75455857Ssheldonh.Op Ar port
75555857Ssheldonh.Op Ar interface
75655857Ssheldonh.Xc
75755857SsheldonhClear a trap for asynchronous messages.
75882501SsheldonhSee the source listing
75982501Ssheldonhfor further information.
76082501Ssheldonh.It Ic reset
76155857SsheldonhClear the statistics counters in various modules of the server.
76255857SsheldonhSee the source listing for further information.
76355857Ssheldonh.El
764280849Scy.Sh "ENVIRONMENT"
765280849ScySee \fBOPTION PRESETS\fP for configuration environment variables.
766280849Scy.Sh "FILES"
767280849ScySee \fBOPTION PRESETS\fP for configuration files.
768280849Scy.Sh "EXIT STATUS"
769280849ScyOne of the following exit values will be returned:
770280849Scy.Bl -tag
771280849Scy.It 0 " (EXIT_SUCCESS)"
772280849ScySuccessful program execution.
773280849Scy.It 1 " (EXIT_FAILURE)"
774280849ScyThe operation failed or the command syntax was not valid.
775280849Scy.It 66 " (EX_NOINPUT)"
776280849ScyA specified configuration file could not be loaded.
777280849Scy.It 70 " (EX_SOFTWARE)"
778280849Scylibopts had an internal operational error.  Please report
779280849Scyit to autogen\-users@lists.sourceforge.net.  Thank you.
780280849Scy.El
781280849Scy.Sh "SEE ALSO"
78255895Ssheldonh.Xr ntp.conf 5 ,
78355857Ssheldonh.Xr ntpd 8
78455857Ssheldonh.Rs
78555857Ssheldonh.%A David L. Mills
78655857Ssheldonh.%T Network Time Protocol (Version 3)
78755857Ssheldonh.%O RFC1305
78855857Ssheldonh.Re
789280849Scy.Sh AUTHORS
790280849ScyThe formatting directives in this document came from FreeBSD.
791280849Scy.Sh "COPYRIGHT"
792316068SdelphijCopyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
793280849ScyThis program is released under the terms of the NTP license, <http://ntp.org/license>.
79455857Ssheldonh.Sh BUGS
79599968ScharnierThe
79655857Ssheldonh.Nm
79799968Scharnierutility is a crude hack.
79882501SsheldonhMuch of the information it shows is
79982501Ssheldonhdeadly boring and could only be loved by its implementer.
80082501SsheldonhThe
80182501Ssheldonhprogram was designed so that new (and temporary) features were easy
80282501Ssheldonhto hack in, at great expense to the program's ease of use.
80382501SsheldonhDespite
80482501Ssheldonhthis, the program is occasionally useful.
805280849Scy.Pp
806280849ScyPlease report bugs to http://bugs.ntp.org .
807280849Scy.Pp
808280849ScyPlease send bug reports to: http://bugs.ntp.org, bugs@ntp.org
809280849Scy.Sh "NOTES"
810280849ScyThis manual page was \fIAutoGen\fP\-erated from the \fBntpdc\fP
811280849Scyoption definitions.
812