ntpdc.mdoc.in revision 298695
1140668Sgnn.Dd April 26 2016
2140668Sgnn.Dt NTPDC @NTPDC_MS@ User Commands
3140668Sgnn.Os
4140668Sgnn.\"  EDIT THIS FILE WITH CAUTION  (ntpdc-opts.mdoc)
5140668Sgnn.\"
6140668Sgnn.\"  It has been AutoGen-ed  April 26, 2016 at 08:29:08 PM by AutoGen 5.18.5
7140668Sgnn.\"  From the definitions    ntpdc-opts.def
8140668Sgnn.\"  and the template file   agmdoc-cmd.tpl
9140668Sgnn.Sh NAME
10140668Sgnn.Nm ntpdc
11140668Sgnn.Nd vendor-specific NTPD control program
12140668Sgnn.Sh SYNOPSIS
13140668Sgnn.Nm
14140668Sgnn.\" Mixture of short (flag) options and long options
15140668Sgnn.Op Fl flags
16140668Sgnn.Op Fl flag Op Ar value
17140668Sgnn.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
18140668Sgnn[ host ...]
19140668Sgnn.Pp
20140668Sgnn.Sh DESCRIPTION
21140668Sgnn.Nm
22140668Sgnnis deprecated.
23140668SgnnPlease use
24140668Sgnn.Xr ntpq @NTPQ_MS@ instead \- it can do everything
25140668Sgnn.Nm
26140668Sgnnused to do, and it does so using a much more sane interface.
27140668Sgnn.Pp
28140668Sgnn.Nm
29140668Sgnnis a utility program used to query
30140750Sru.Xr ntpd @NTPD_MS@
31140750Sruabout its
32140668Sgnncurrent state and to request changes in that state.
33140668SgnnIt uses NTP mode 7 control message formats described in the source code.
34140668SgnnThe program may
35140668Sgnnbe run either in interactive mode or controlled using command line
36140668Sgnnarguments.
37140668SgnnExtensive state and statistics information is available
38140668Sgnnthrough the
39140668Sgnn.Nm
40140668Sgnninterface.
41140668SgnnIn addition, nearly all the
42140668Sgnnconfiguration options which can be specified at startup using
43140668Sgnnntpd's configuration file may also be specified at run time using
44140668Sgnn.Nm .
45140668Sgnn.Sh "OPTIONS"
46140668Sgnn.Bl -tag
47140668Sgnn.It  Fl 4 , Fl \-ipv4 
48140668SgnnForce IPv4 DNS name resolution.
49140668SgnnThis option must not appear in combination with any of the following options:
50140668Sgnnipv6.
51140668Sgnn.sp
52140668SgnnForce DNS resolution of following host names on the command line
53140668Sgnnto the IPv4 namespace.
54140668Sgnn.It  Fl 6 , Fl \-ipv6 
55140668SgnnForce IPv6 DNS name resolution.
56140668SgnnThis option must not appear in combination with any of the following options:
57140668Sgnnipv4.
58140668Sgnn.sp
59140668SgnnForce DNS resolution of following host names on the command line
60140668Sgnnto the IPv6 namespace.
61152717Sru.It  Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd 
62140668Sgnnrun a command and exit.
63140668SgnnThis option may appear an unlimited number of times.
64140668Sgnn.sp
65140668SgnnThe following argument is interpreted as an interactive format command
66140668Sgnnand is added to the list of commands to be executed on the specified
67140750Sruhost(s).
68140668Sgnn.It  Fl d , Fl \-debug\-level 
69140727SgnnIncrease debug verbosity level.
70140727SgnnThis option may appear an unlimited number of times.
71140668Sgnn.sp
72140668Sgnn.It  Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number 
73140668SgnnSet the debug verbosity level.
74140668SgnnThis option may appear an unlimited number of times.
75140668SgnnThis option takes an integer number as its argument.
76140668Sgnn.sp
77140668Sgnn.It  Fl i , Fl \-interactive 
78140668SgnnForce ntpq to operate in interactive mode.
79140668SgnnThis option must not appear in combination with any of the following options:
80140668Sgnncommand, listpeers, peers, showpeers.
81140668Sgnn.sp
82140668SgnnForce ntpq to operate in interactive mode.  Prompts will be written
83140668Sgnnto the standard output and commands read from the standard input.
84140668Sgnn.It  Fl l , Fl \-listpeers 
85140668SgnnPrint a list of the peers.
86140750SruThis option must not appear in combination with any of the following options:
87140668Sgnncommand.
88140668Sgnn.sp
89140668SgnnPrint a list of the peers known to the server as well as a summary of
90140668Sgnntheir state. This is equivalent to the 'listpeers' interactive command.
91140668Sgnn.It  Fl n , Fl \-numeric 
92140750Srunumeric host addresses.
93140750Sru.sp
94140668SgnnOutput all host addresses in dotted\-quad numeric format rather than
95140668Sgnnconverting to the canonical host names. 
96140668Sgnn.It  Fl p , Fl \-peers 
97140668SgnnPrint a list of the peers.
98140668SgnnThis option must not appear in combination with any of the following options:
99140668Sgnncommand.
100140668Sgnn.sp
101140750SruPrint a list of the peers known to the server as well as a summary
102140668Sgnnof their state. This is equivalent to the 'peers' interactive command.
103140668Sgnn.It  Fl s , Fl \-showpeers 
104140668SgnnShow a list of the peers.
105140668SgnnThis option must not appear in combination with any of the following options:
106140668Sgnncommand.
107140668Sgnn.sp
108140668SgnnPrint a list of the peers known to the server as well as a summary
109140668Sgnnof their state. This is equivalent to the 'dmpeers' interactive command.
110140668Sgnn.It Fl \&? , Fl \-help
111140668SgnnDisplay usage information and exit.
112140668Sgnn.It Fl \&! , Fl \-more\-help
113140668SgnnPass the extended usage information through a pager.
114140750Sru.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
115140750SruSave the option state to \fIcfgfile\fP.  The default is the \fIlast\fP
116140668Sgnnconfiguration file listed in the \fBOPTION PRESETS\fP section, below.
117140668SgnnThe command will exit after updating the config file.
118140668Sgnn.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
119140668SgnnLoad options from \fIcfgfile\fP.
120140668SgnnThe \fIno\-load\-opts\fP form will disable the loading
121140668Sgnnof earlier config/rc/ini files.  \fI\-\-no\-load\-opts\fP is handled early,
122140668Sgnnout of order.
123140668Sgnn.It Fl \-version Op Brq Ar v|c|n
124140668SgnnOutput version of program and exit.  The default mode is `v', a simple
125140668Sgnnversion.  The `c' mode will print copyright information and `n' will
126140668Sgnnprint the full copyright notice.
127140668Sgnn.El
128140668Sgnn.Sh "OPTION PRESETS"
129140668SgnnAny option that is not marked as \fInot presettable\fP may be preset
130140668Sgnnby loading values from configuration ("RC" or ".INI") file(s) and values from
131140668Sgnnenvironment variables named:
132140668Sgnn.nf
133140668Sgnn  \fBNTPDC_<option\-name>\fP or \fBNTPDC\fP
134140668Sgnn.fi
135140668Sgnn.ad
136140668SgnnThe environmental presets take precedence (are processed later than)
137140668Sgnnthe configuration files.
138140668SgnnThe \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
139140668SgnnIf any of these are directories, then the file \fI.ntprc\fP
140140668Sgnnis searched for within those directories.
141140668Sgnn.Sh USAGE
142140668SgnnIf one or more request options are included on the command line
143140668Sgnnwhen
144140668Sgnn.Nm
145140668Sgnnis executed, each of the requests will be sent
146140668Sgnnto the NTP servers running on each of the hosts given as command
147140668Sgnnline arguments, or on localhost by default.
148140668SgnnIf no request options
149140668Sgnnare given,
150140668Sgnn.Nm
151140668Sgnnwill attempt to read commands from the
152140668Sgnnstandard input and execute these on the NTP server running on the
153140668Sgnnfirst host given on the command line, again defaulting to localhost
154140668Sgnnwhen no other host is specified.
155140668SgnnThe
156140668Sgnn.Nm
157140668Sgnnutility will prompt for
158140668Sgnncommands if the standard input is a terminal device.
159140668Sgnn.Pp
160140668SgnnThe
161140668Sgnn.Nm
162140750Sruutility uses NTP mode 7 packets to communicate with the
163140668SgnnNTP server, and hence can be used to query any compatible server on
164140668Sgnnthe network which permits it.
165140668SgnnNote that since NTP is a UDP protocol
166140668Sgnnthis communication will be somewhat unreliable, especially over
167140750Srularge distances in terms of network topology.
168140668SgnnThe
169140668Sgnn.Nm
170140668Sgnnutility makes
171140668Sgnnno attempt to retransmit requests, and will time requests out if
172140668Sgnnthe remote host is not heard from within a suitable timeout
173140668Sgnntime.
174140668Sgnn.Pp
175140668SgnnThe operation of
176140668Sgnn.Nm
177140668Sgnnare specific to the particular
178140668Sgnnimplementation of the
179140668Sgnn.Xr ntpd @NTPD_MS@
180140668Sgnndaemon and can be expected to
181140668Sgnnwork only with this and maybe some previous versions of the daemon.
182140668SgnnRequests from a remote
183140668Sgnn.Nm
184140668Sgnnutility which affect the
185140668Sgnnstate of the local server must be authenticated, which requires
186140668Sgnnboth the remote program and local server share a common key and key
187140668Sgnnidentifier.
188140668Sgnn.Pp
189140668SgnnNote that in contexts where a host name is expected, a
190140668Sgnn.Fl 4
191140668Sgnnqualifier preceding the host name forces DNS resolution to the IPv4 namespace,
192140668Sgnnwhile a
193140668Sgnn.Fl 6
194140668Sgnnqualifier forces DNS resolution to the IPv6 namespace.
195140668SgnnSpecifying a command line option other than
196140668Sgnn.Fl i
197140668Sgnnor
198140750Sru.Fl n
199140750Sruwill cause the specified query (queries) to be sent to
200140668Sgnnthe indicated host(s) immediately.
201140668SgnnOtherwise,
202140668Sgnn.Nm
203140668Sgnnwill
204140668Sgnnattempt to read interactive format commands from the standard
205140668Sgnninput.
206140668Sgnn.Ss "Interactive Commands"
207140668SgnnInteractive format commands consist of a keyword followed by zero
208140668Sgnnto four arguments.
209140668SgnnOnly enough characters of the full keyword to
210140668Sgnnuniquely identify the command need be typed.
211140668SgnnThe output of a
212140668Sgnncommand is normally sent to the standard output, but optionally the
213140668Sgnnoutput of individual commands may be sent to a file by appending a
214140668Sgnn.Ql \&> ,
215140668Sgnnfollowed by a file name, to the command line.
216140668Sgnn.Pp
217140668SgnnA number of interactive format commands are executed entirely
218140668Sgnnwithin the
219140668Sgnn.Nm
220140668Sgnnutility itself and do not result in NTP
221140668Sgnnmode 7 requests being sent to a server.
222140668SgnnThese are described
223140668Sgnnfollowing.
224140668Sgnn.Bl -tag -width indent
225140668Sgnn.It Ic \&? Ar command_keyword
226140668Sgnn.It Ic help Ar command_keyword
227140668SgnnA
228140668Sgnn.Sq Ic \&?
229140668Sgnnwill print a list of all the command
230140668Sgnnkeywords known to this incarnation of
231140668Sgnn.Nm .
232140668SgnnA
233140668Sgnn.Sq Ic \&?
234140668Sgnnfollowed by a command keyword will print function and usage
235140668Sgnninformation about the command.
236140668SgnnThis command is probably a better
237140668Sgnnsource of information about
238140668Sgnn.Xr ntpq @NTPQ_MS@
239140750Sruthan this manual
240140750Srupage.
241140668Sgnn.It Ic delay Ar milliseconds
242140750SruSpecify a time interval to be added to timestamps included in
243140668Sgnnrequests which require authentication.
244140750SruThis is used to enable
245140668Sgnn(unreliable) server reconfiguration over long delay network paths
246140668Sgnnor between machines whose clocks are unsynchronized.
247140668SgnnActually the
248140668Sgnnserver does not now require timestamps in authenticated requests,
249140668Sgnnso this command may be obsolete.
250140668Sgnn.It Ic host Ar hostname
251140668SgnnSet the host to which future queries will be sent.
252140668SgnnHostname may
253140668Sgnnbe either a host name or a numeric address.
254140668Sgnn.It Ic hostnames Op Cm yes | Cm no
255140668SgnnIf
256140668Sgnn.Cm yes
257140668Sgnnis specified, host names are printed in
258140750Sruinformation displays.
259140668SgnnIf
260140750Sru.Cm no
261140668Sgnnis specified, numeric
262140668Sgnnaddresses are printed instead.
263140668SgnnThe default is
264140750Sru.Cm yes ,
265140668Sgnnunless
266140668Sgnnmodified using the command line
267140668Sgnn.Fl n
268140668Sgnnswitch.
269140668Sgnn.It Ic keyid Ar keyid
270140668SgnnThis command allows the specification of a key number to be
271140668Sgnnused to authenticate configuration requests.
272140668SgnnThis must correspond
273140668Sgnnto a key number the server has been configured to use for this
274140668Sgnnpurpose.
275140668Sgnn.It Ic quit
276140668SgnnExit
277140668Sgnn.Nm .
278140668Sgnn.It Ic passwd
279140668SgnnThis command prompts you to type in a password (which will not
280140668Sgnnbe echoed) which will be used to authenticate configuration
281140668Sgnnrequests.
282140668SgnnThe password must correspond to the key configured for
283140668Sgnnuse by the NTP server for this purpose if such requests are to be
284140668Sgnnsuccessful.
285140668Sgnn.It Ic timeout Ar milliseconds
286140668SgnnSpecify a timeout period for responses to server queries.
287140668SgnnThe
288140668Sgnndefault is about 8000 milliseconds.
289140668SgnnNote that since
290140668Sgnn.Nm
291140668Sgnnretries each query once after a timeout, the total waiting time for
292140668Sgnna timeout will be twice the timeout value set.
293140668Sgnn.El
294140668Sgnn.Ss "Control Message Commands"
295140668SgnnQuery commands result in NTP mode 7 packets containing requests for
296140668Sgnninformation being sent to the server.
297140668SgnnThese are read\-only commands
298140668Sgnnin that they make no modification of the server configuration
299140668Sgnnstate.
300140668Sgnn.Bl -tag -width indent
301140668Sgnn.It Ic listpeers
302140750SruObtains and prints a brief list of the peers for which the
303140668Sgnnserver is maintaining state.
304140668SgnnThese should include all configured
305140668Sgnnpeer associations as well as those peers whose stratum is such that
306140668Sgnnthey are considered by the server to be possible future
307140668Sgnnsynchronization candidates.
308140668Sgnn.It Ic peers
309140668SgnnObtains a list of peers for which the server is maintaining
310140668Sgnnstate, along with a summary of that state.
311140668SgnnSummary information
312140668Sgnnincludes the address of the remote peer, the local interface
313140668Sgnnaddress (0.0.0.0 if a local address has yet to be determined), the
314140668Sgnnstratum of the remote peer (a stratum of 16 indicates the remote
315140668Sgnnpeer is unsynchronized), the polling interval, in seconds, the
316140668Sgnnreachability register, in octal, and the current estimated delay,
317140668Sgnnoffset and dispersion of the peer, all in seconds.
318140668Sgnn.Pp
319140668SgnnThe character in the left margin indicates the mode this peer
320140668Sgnnentry is operating in.
321140668SgnnA
322140668Sgnn.Ql \&+
323140668Sgnndenotes symmetric active, a
324140668Sgnn.Ql \&\-
325140668Sgnnindicates symmetric passive, a
326140668Sgnn.Ql \&=
327140668Sgnnmeans the
328140668Sgnnremote server is being polled in client mode, a
329140668Sgnn.Ql \&^
330140668Sgnnindicates that the server is broadcasting to this address, a
331140668Sgnn.Ql \&~
332140668Sgnndenotes that the remote peer is sending broadcasts and a
333140668Sgnn.Ql \&~
334140668Sgnndenotes that the remote peer is sending broadcasts and a
335140668Sgnn.Ql \&*
336140750Srumarks the peer the server is currently synchronizing
337140750Sruto.
338.Pp
339The contents of the host field may be one of four forms.
340It may
341be a host name, an IP address, a reference clock implementation
342name with its parameter or
343.Fn REFCLK "implementation_number" "parameter" .
344On
345.Ic hostnames
346.Cm no
347only IP\-addresses
348will be displayed.
349.It Ic dmpeers
350A slightly different peer summary list.
351Identical to the output
352of the
353.Ic peers
354command, except for the character in the
355leftmost column.
356Characters only appear beside peers which were
357included in the final stage of the clock selection algorithm.
358A
359.Ql \&.
360indicates that this peer was cast off in the falseticker
361detection, while a
362.Ql \&+
363indicates that the peer made it
364through.
365A
366.Ql \&*
367denotes the peer the server is currently
368synchronizing with.
369.It Ic showpeer Ar peer_address Oo Ar ... Oc
370Shows a detailed display of the current peer variables for one
371or more peers.
372Most of these values are described in the NTP
373Version 2 specification.
374.It Ic pstats Ar peer_address Oo Ar ... Oc
375Show per\-peer statistic counters associated with the specified
376peer(s).
377.It Ic clockstat Ar clock_peer_address Oo Ar ... Oc
378Obtain and print information concerning a peer clock.
379The
380values obtained provide information on the setting of fudge factors
381and other clock performance information.
382.It Ic kerninfo
383Obtain and print kernel phase\-lock loop operating parameters.
384This information is available only if the kernel has been specially
385modified for a precision timekeeping function.
386.It Ic loopinfo Op Cm oneline | Cm multiline
387Print the values of selected loop filter variables.
388The loop
389filter is the part of NTP which deals with adjusting the local
390system clock.
391The
392.Sq offset
393is the last offset given to the
394loop filter by the packet processing code.
395The
396.Sq frequency
397is the frequency error of the local clock in parts\-per\-million
398(ppm).
399The
400.Sq time_const
401controls the stiffness of the
402phase\-lock loop and thus the speed at which it can adapt to
403oscillator drift.
404The
405.Sq watchdog timer
406value is the number
407of seconds which have elapsed since the last sample offset was
408given to the loop filter.
409The
410.Cm oneline
411and
412.Cm multiline
413options specify the format in which this
414information is to be printed, with
415.Cm multiline
416as the
417default.
418.It Ic sysinfo
419Print a variety of system state variables, i.e., state related
420to the local server.
421All except the last four lines are described
422in the NTP Version 3 specification, RFC\-1305.
423.Pp
424The
425.Sq system flags
426show various system flags, some of
427which can be set and cleared by the
428.Ic enable
429and
430.Ic disable
431configuration commands, respectively.
432These are
433the
434.Cm auth ,
435.Cm bclient ,
436.Cm monitor ,
437.Cm pll ,
438.Cm pps
439and
440.Cm stats
441flags.
442See the
443.Xr ntpd @NTPD_MS@
444documentation for the meaning of these flags.
445There
446are two additional flags which are read only, the
447.Cm kernel_pll
448and
449.Cm kernel_pps .
450These flags indicate
451the synchronization status when the precision time kernel
452modifications are in use.
453The
454.Sq kernel_pll
455indicates that
456the local clock is being disciplined by the kernel, while the
457.Sq kernel_pps
458indicates the kernel discipline is provided by the PPS
459signal.
460.Pp
461The
462.Sq stability
463is the residual frequency error remaining
464after the system frequency correction is applied and is intended for
465maintenance and debugging.
466In most architectures, this value will
467initially decrease from as high as 500 ppm to a nominal value in
468the range .01 to 0.1 ppm.
469If it remains high for some time after
470starting the daemon, something may be wrong with the local clock,
471or the value of the kernel variable
472.Va kern.clockrate.tick
473may be
474incorrect.
475.Pp
476The
477.Sq broadcastdelay
478shows the default broadcast delay,
479as set by the
480.Ic broadcastdelay
481configuration command.
482.Pp
483The
484.Sq authdelay
485shows the default authentication delay,
486as set by the
487.Ic authdelay
488configuration command.
489.It Ic sysstats
490Print statistics counters maintained in the protocol
491module.
492.It Ic memstats
493Print statistics counters related to memory allocation
494code.
495.It Ic iostats
496Print statistics counters maintained in the input\-output
497module.
498.It Ic timerstats
499Print statistics counters maintained in the timer/event queue
500support code.
501.It Ic reslist
502Obtain and print the server's restriction list.
503This list is
504(usually) printed in sorted order and may help to understand how
505the restrictions are applied.
506.It Ic monlist Op Ar version
507Obtain and print traffic counts collected and maintained by the
508monitor facility.
509The version number should not normally need to be
510specified.
511.It Ic clkbug Ar clock_peer_address Oo Ar ... Oc
512Obtain debugging information for a reference clock driver.
513This
514information is provided only by some clock drivers and is mostly
515undecodable without a copy of the driver source in hand.
516.El
517.Ss "Runtime Configuration Requests"
518All requests which cause state changes in the server are
519authenticated by the server using a configured NTP key (the
520facility can also be disabled by the server by not configuring a
521key).
522The key number and the corresponding key must also be made
523known to
524.Nm .
525This can be done using the
526.Ic keyid
527and
528.Ic passwd
529commands, the latter of which will prompt at the terminal for a
530password to use as the encryption key.
531You will also be prompted
532automatically for both the key number and password the first time a
533command which would result in an authenticated request to the
534server is given.
535Authentication not only provides verification that
536the requester has permission to make such changes, but also gives
537an extra degree of protection again transmission errors.
538.Pp
539Authenticated requests always include a timestamp in the packet
540data, which is included in the computation of the authentication
541code.
542This timestamp is compared by the server to its receive time
543stamp.
544If they differ by more than a small amount the request is
545rejected.
546This is done for two reasons.
547First, it makes simple
548replay attacks on the server, by someone who might be able to
549overhear traffic on your LAN, much more difficult.
550Second, it makes
551it more difficult to request configuration changes to your server
552from topologically remote hosts.
553While the reconfiguration facility
554will work well with a server on the local host, and may work
555adequately between time\-synchronized hosts on the same LAN, it will
556work very poorly for more distant hosts.
557As such, if reasonable
558passwords are chosen, care is taken in the distribution and
559protection of keys and appropriate source address restrictions are
560applied, the run time reconfiguration facility should provide an
561adequate level of security.
562.Pp
563The following commands all make authenticated requests.
564.Bl -tag -width indent
565.It Xo Ic addpeer Ar peer_address
566.Op Ar keyid
567.Op Ar version
568.Op Cm prefer
569.Xc
570Add a configured peer association at the given address and
571operating in symmetric active mode.
572Note that an existing
573association with the same peer may be deleted when this command is
574executed, or may simply be converted to conform to the new
575configuration, as appropriate.
576If the optional
577.Ar keyid
578is a
579nonzero integer, all outgoing packets to the remote server will
580have an authentication field attached encrypted with this key.
581If
582the value is 0 (or not given) no authentication will be done.
583The
584.Ar version
585can be 1, 2 or 3 and defaults to 3.
586The
587.Cm prefer
588keyword indicates a preferred peer (and thus will
589be used primarily for clock synchronisation if possible).
590The
591preferred peer also determines the validity of the PPS signal \- if
592the preferred peer is suitable for synchronisation so is the PPS
593signal.
594.It Xo Ic addserver Ar peer_address
595.Op Ar keyid
596.Op Ar version
597.Op Cm prefer
598.Xc
599Identical to the addpeer command, except that the operating
600mode is client.
601.It Xo Ic broadcast Ar peer_address
602.Op Ar keyid
603.Op Ar version
604.Op Cm prefer
605.Xc
606Identical to the addpeer command, except that the operating
607mode is broadcast.
608In this case a valid key identifier and key are
609required.
610The
611.Ar peer_address
612parameter can be the broadcast
613address of the local network or a multicast group address assigned
614to NTP.
615If a multicast address, a multicast\-capable kernel is
616required.
617.It Ic unconfig Ar peer_address Oo Ar ... Oc
618This command causes the configured bit to be removed from the
619specified peer(s).
620In many cases this will cause the peer
621association to be deleted.
622When appropriate, however, the
623association may persist in an unconfigured mode if the remote peer
624is willing to continue on in this fashion.
625.It Xo Ic fudge Ar peer_address
626.Op Cm time1
627.Op Cm time2
628.Op Ar stratum
629.Op Ar refid
630.Xc
631This command provides a way to set certain data for a reference
632clock.
633See the source listing for further information.
634.It Xo Ic enable
635.Oo
636.Cm auth | Cm bclient |
637.Cm calibrate | Cm kernel |
638.Cm monitor | Cm ntp |
639.Cm pps | Cm stats
640.Oc
641.Xc
642.It Xo Ic disable
643.Oo
644.Cm auth | Cm bclient |
645.Cm calibrate | Cm kernel |
646.Cm monitor | Cm ntp |
647.Cm pps | Cm stats
648.Oc
649.Xc
650These commands operate in the same way as the
651.Ic enable
652and
653.Ic disable
654configuration file commands of
655.Xr ntpd @NTPD_MS@ .
656.Bl -tag -width indent
657.It Cm auth
658Enables the server to synchronize with unconfigured peers only
659if the peer has been correctly authenticated using either public key
660or private key cryptography.
661The default for this flag is enable.
662.It Cm bclient
663Enables the server to listen for a message from a broadcast or
664multicast server, as in the multicastclient command with
665default address.
666The default for this flag is disable.
667.It Cm calibrate
668Enables the calibrate feature for reference clocks.
669The default for this flag is disable.
670.It Cm kernel
671Enables the kernel time discipline, if available.
672The default for this flag is enable if support is available, otherwise disable.
673.It Cm monitor
674Enables the monitoring facility.
675See the documentation here about the
676.Cm monlist
677command or further information.
678The default for this flag is enable.
679.It Cm ntp
680Enables time and frequency discipline.
681In effect, this switch opens and closes the feedback loop,
682which is useful for testing.
683The default for this flag is enable.
684.It Cm pps
685Enables the pulse\-per\-second (PPS) signal when frequency
686and time is disciplined by the precision time kernel modifications.
687See the
688.Qq A Kernel Model for Precision Timekeeping
689(available as part of the HTML documentation
690provided in
691.Pa /usr/share/doc/ntp )
692page for further information.
693The default for this flag is disable.
694.It Cm stats
695Enables the statistics facility.
696See the
697.Sx Monitoring Options
698section of
699.Xr ntp.conf 5
700for further information.
701The default for this flag is disable.
702.El
703.It Xo Ic restrict Ar address Ar mask
704.Ar flag Oo Ar ... Oc
705.Xc
706This command operates in the same way as the
707.Ic restrict
708configuration file commands of
709.Xr ntpd @NTPD_MS@ .
710.It Xo Ic unrestrict Ar address Ar mask
711.Ar flag Oo Ar ... Oc
712.Xc
713Unrestrict the matching entry from the restrict list.
714.It Xo Ic delrestrict Ar address Ar mask
715.Op Cm ntpport
716.Xc
717Delete the matching entry from the restrict list.
718.It Ic readkeys
719Causes the current set of authentication keys to be purged and
720a new set to be obtained by rereading the keys file (which must
721have been specified in the
722.Xr ntpd @NTPD_MS@
723configuration file).
724This
725allows encryption keys to be changed without restarting the
726server.
727.It Ic trustedkey Ar keyid Oo Ar ... Oc
728.It Ic untrustedkey Ar keyid Oo Ar ... Oc
729These commands operate in the same way as the
730.Ic trustedkey
731and
732.Ic untrustedkey
733configuration file
734commands of
735.Xr ntpd @NTPD_MS@ .
736.It Ic authinfo
737Returns information concerning the authentication module,
738including known keys and counts of encryptions and decryptions
739which have been done.
740.It Ic traps
741Display the traps set in the server.
742See the source listing for
743further information.
744.It Xo Ic addtrap Ar address
745.Op Ar port
746.Op Ar interface
747.Xc
748Set a trap for asynchronous messages.
749See the source listing
750for further information.
751.It Xo Ic clrtrap Ar address
752.Op Ar port
753.Op Ar interface
754.Xc
755Clear a trap for asynchronous messages.
756See the source listing
757for further information.
758.It Ic reset
759Clear the statistics counters in various modules of the server.
760See the source listing for further information.
761.El
762.Sh "ENVIRONMENT"
763See \fBOPTION PRESETS\fP for configuration environment variables.
764.Sh "FILES"
765See \fBOPTION PRESETS\fP for configuration files.
766.Sh "EXIT STATUS"
767One of the following exit values will be returned:
768.Bl -tag
769.It 0 " (EXIT_SUCCESS)"
770Successful program execution.
771.It 1 " (EXIT_FAILURE)"
772The operation failed or the command syntax was not valid.
773.It 66 " (EX_NOINPUT)"
774A specified configuration file could not be loaded.
775.It 70 " (EX_SOFTWARE)"
776libopts had an internal operational error.  Please report
777it to autogen\-users@lists.sourceforge.net.  Thank you.
778.El
779.Sh "SEE ALSO"
780.Xr ntp.conf 5 ,
781.Xr ntpd @NTPD_MS@
782.Rs
783.%A David L. Mills
784.%T Network Time Protocol (Version 3)
785.%O RFC1305
786.Re
787.Sh AUTHORS
788The formatting directives in this document came from FreeBSD.
789.Sh "COPYRIGHT"
790Copyright (C) 1992\-2016 The University of Delaware and Network Time Foundation all rights reserved.
791This program is released under the terms of the NTP license, <http://ntp.org/license>.
792.Sh BUGS
793The
794.Nm
795utility is a crude hack.
796Much of the information it shows is
797deadly boring and could only be loved by its implementer.
798The
799program was designed so that new (and temporary) features were easy
800to hack in, at great expense to the program's ease of use.
801Despite
802this, the program is occasionally useful.
803.Pp
804Please report bugs to http://bugs.ntp.org .
805.Pp
806Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
807.Sh "NOTES"
808This manual page was \fIAutoGen\fP\-erated from the \fBntpdc\fP
809option definitions.
810