Home | History | Annotate | Line # | Download | only in ntpdc
      1 .de1 NOP
      2 .  it 1 an-trap
      3 .  if \\n[.$] \,\\$*\/
      4 ..
      5 .ie t \
      6 .ds B-Font [CB]
      7 .ds I-Font [CI]
      8 .ds R-Font [CR]
      9 .el \
     10 .ds B-Font B
     11 .ds I-Font I
     12 .ds R-Font R
     13 .TH ntpdc 1ntpdcman "25 May 2024" "4.2.8p18" "User Commands"
     14 .\"
     15 .\" EDIT THIS FILE WITH CAUTION (in-mem file)
     16 .\"
     17 .\" It has been AutoGen-ed May 25, 2024 at 12:04:19 AM by AutoGen 5.18.16
     18 .\" From the definitions ntpdc-opts.def
     19 .\" and the template file agman-cmd.tpl
     20 .SH NAME
     21 \f\*[B-Font]ntpdc\fP
     22 \- vendor-specific NTPD control program
     23 .SH SYNOPSIS
     24 \f\*[B-Font]ntpdc\fP
     25 .\" Mixture of short (flag) options and long options
     26 [\f\*[B-Font]\-flags\f[]]
     27 [\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
     28 [\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
     29 [ host ...]
     30 .sp \n(Ppu
     31 .ne 2
     32 
     33 .SH DESCRIPTION
     34 \f\*[B-Font]ntpdc\fP
     35 is deprecated.
     36 Please use
     37 \fCntpq\f[]\fR(1ntpqmdoc)\f[] instead \- it can do everything
     38 \f\*[B-Font]ntpdc\fP
     39 used to do, and it does so using a much more sane interface.
     40 .sp \n(Ppu
     41 .ne 2
     42 
     43 \f\*[B-Font]ntpdc\fP
     44 is a utility program used to query
     45 \fCntpd\f[]\fR(1ntpdmdoc)\f[]
     46 about its
     47 current state and to request changes in that state.
     48 It uses NTP mode 7 control message formats described in the source code.
     49 The program may
     50 be run either in interactive mode or controlled using command line
     51 arguments.
     52 Extensive state and statistics information is available
     53 through the
     54 \f\*[B-Font]ntpdc\fP
     55 interface.
     56 In addition, nearly all the
     57 configuration options which can be specified at startup using
     58 ntpd's configuration file may also be specified at run time using
     59 \f\*[B-Font]ntpdc\fP.
     60 .SH "OPTIONS"
     61 .TP
     62 .NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
     63 Force IPv4 DNS name resolution.
     64 This option must not appear in combination with any of the following options:
     65 ipv6.
     66 .sp
     67 Force DNS resolution of following host names on the command line
     68 to the IPv4 namespace.
     69 .TP
     70 .NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
     71 Force IPv6 DNS name resolution.
     72 This option must not appear in combination with any of the following options:
     73 ipv4.
     74 .sp
     75 Force DNS resolution of following host names on the command line
     76 to the IPv6 namespace.
     77 .TP
     78 .NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
     79 run a command and exit.
     80 This option may appear an unlimited number of times.
     81 .sp
     82 The following argument is interpreted as an interactive format command
     83 and is added to the list of commands to be executed on the specified
     84 host(s).
     85 .TP
     86 .NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
     87 Increase debug verbosity level.
     88 This option may appear an unlimited number of times.
     89 .sp
     90 .TP
     91 .NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
     92 Set the debug verbosity level.
     93 This option may appear an unlimited number of times.
     94 This option takes an integer number as its argument.
     95 .sp
     96 .TP
     97 .NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
     98 Force ntpq to operate in interactive mode.
     99 This option must not appear in combination with any of the following options:
    100 command, listpeers, peers, showpeers.
    101 .sp
    102 Force ntpq to operate in interactive mode.  Prompts will be written
    103 to the standard output and commands read from the standard input.
    104 .TP
    105 .NOP \f\*[B-Font]\-l\f[], \f\*[B-Font]\-\-listpeers\f[]
    106 Print a list of the peers.
    107 This option must not appear in combination with any of the following options:
    108 command.
    109 .sp
    110 Print a list of the peers known to the server as well as a summary of
    111 their state. This is equivalent to the 'listpeers' interactive command.
    112 .TP
    113 .NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
    114 numeric host addresses.
    115 .sp
    116 Output all host addresses in dotted-quad numeric format rather than
    117 converting to the canonical host names. 
    118 .TP
    119 .NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
    120 Print a list of the peers.
    121 This option must not appear in combination with any of the following options:
    122 command.
    123 .sp
    124 Print a list of the peers known to the server as well as a summary
    125 of their state. This is equivalent to the 'peers' interactive command.
    126 .TP
    127 .NOP \f\*[B-Font]\-s\f[], \f\*[B-Font]\-\-showpeers\f[]
    128 Show a list of the peers.
    129 This option must not appear in combination with any of the following options:
    130 command.
    131 .sp
    132 Print a list of the peers known to the server as well as a summary
    133 of their state. This is equivalent to the 'dmpeers' interactive command.
    134 .TP
    135 .NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unconnected\f[]
    136 Use unconnected UDP to communicate with ntpd (default on Windows).
    137 .sp
    138 Open an unconnected UDP association to ntpd (the default
    139 on Windows).
    140 .TP
    141 .NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
    142 Display usage information and exit.
    143 .TP
    144 .NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
    145 Pass the extended usage information through a pager.
    146 .TP
    147 .NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
    148 Save the option state to \fIcfgfile\fP.  The default is the \fIlast\fP
    149 configuration file listed in the \fBOPTION PRESETS\fP section, below.
    150 The command will exit after updating the config file.
    151 .TP
    152 .NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
    153 Load options from \fIcfgfile\fP.
    154 The \fIno-load-opts\fP form will disable the loading
    155 of earlier config/rc/ini files.  \fI\-\-no-load-opts\fP is handled early,
    156 out of order.
    157 .TP
    158 .NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
    159 Output version of program and exit.  The default mode is `v', a simple
    160 version.  The `c' mode will print copyright information and `n' will
    161 print the full copyright notice.
    162 .PP
    163 .SH "OPTION PRESETS"
    164 Any option that is not marked as \fInot presettable\fP may be preset
    165 by loading values from configuration ("RC" or ".INI") file(s) and values from
    166 environment variables named:
    167 .nf
    168   \fBNTPDC_<option-name>\fP or \fBNTPDC\fP
    169 .fi
    170 .ad
    171 The environmental presets take precedence (are processed later than)
    172 the configuration files.
    173 The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
    174 If any of these are directories, then the file \fI.ntprc\fP
    175 is searched for within those directories.
    176 .SH USAGE
    177 If one or more request options are included on the command line
    178 when
    179 \f\*[B-Font]ntpdc\fP
    180 is executed, each of the requests will be sent
    181 to the NTP servers running on each of the hosts given as command
    182 line arguments, or on localhost by default.
    183 If no request options
    184 are given,
    185 \f\*[B-Font]ntpdc\fP
    186 will attempt to read commands from the
    187 standard input and execute these on the NTP server running on the
    188 first host given on the command line, again defaulting to localhost
    189 when no other host is specified.
    190 The
    191 \f\*[B-Font]ntpdc\fP
    192 utility will prompt for
    193 commands if the standard input is a terminal device.
    194 .sp \n(Ppu
    195 .ne 2
    196 
    197 The
    198 \f\*[B-Font]ntpdc\fP
    199 utility uses NTP mode 7 packets to communicate with the
    200 NTP server, and hence can be used to query any compatible server on
    201 the network which permits it.
    202 Note that since NTP is a UDP protocol
    203 this communication will be somewhat unreliable, especially over
    204 large distances in terms of network topology.
    205 The
    206 \f\*[B-Font]ntpdc\fP
    207 utility makes
    208 no attempt to retransmit requests, and will time requests out if
    209 the remote host is not heard from within a suitable timeout
    210 time.
    211 .sp \n(Ppu
    212 .ne 2
    213 
    214 The operation of
    215 \f\*[B-Font]ntpdc\fP
    216 are specific to the particular
    217 implementation of the
    218 \fCntpd\f[]\fR(1ntpdmdoc)\f[]
    219 daemon and can be expected to
    220 work only with this and maybe some previous versions of the daemon.
    221 Requests from a remote
    222 \f\*[B-Font]ntpdc\fP
    223 utility which affect the
    224 state of the local server must be authenticated, which requires
    225 both the remote program and local server share a common key and key
    226 identifier.
    227 .sp \n(Ppu
    228 .ne 2
    229 
    230 Note that in contexts where a host name is expected, a
    231 \f\*[B-Font]\-4\f[]
    232 qualifier preceding the host name forces DNS resolution to the IPv4 namespace,
    233 while a
    234 \f\*[B-Font]\-6\f[]
    235 qualifier forces DNS resolution to the IPv6 namespace.
    236 Specifying a command line option other than
    237 \f\*[B-Font]\-i\f[]
    238 or
    239 \f\*[B-Font]\-n\f[]
    240 will cause the specified query (queries) to be sent to
    241 the indicated host(s) immediately.
    242 Otherwise,
    243 \f\*[B-Font]ntpdc\fP
    244 will
    245 attempt to read interactive format commands from the standard
    246 input.
    247 .SS "Interactive Commands"
    248 Interactive format commands consist of a keyword followed by zero
    249 to four arguments.
    250 Only enough characters of the full keyword to
    251 uniquely identify the command need be typed.
    252 The output of a
    253 command is normally sent to the standard output, but optionally the
    254 output of individual commands may be sent to a file by appending a
    255 \[oq]\&>\[cq],
    256 followed by a file name, to the command line.
    257 .sp \n(Ppu
    258 .ne 2
    259 
    260 A number of interactive format commands are executed entirely
    261 within the
    262 \f\*[B-Font]ntpdc\fP
    263 utility itself and do not result in NTP
    264 mode 7 requests being sent to a server.
    265 These are described
    266 following.
    267 .TP 7
    268 .NOP \f\*[B-Font]\&?\f[] \f\*[I-Font]command_keyword\f[]
    269 .TP 7
    270 .NOP \f\*[B-Font]help\f[] \f\*[I-Font]command_keyword\f[]
    271 A
    272 \[oq]\f\*[B-Font]\&?\f[]\[cq]
    273 will print a list of all the command
    274 keywords known to this incarnation of
    275 \f\*[B-Font]ntpdc\fP.
    276 A
    277 \[oq]\f\*[B-Font]\&?\f[]\[cq]
    278 followed by a command keyword will print function and usage
    279 information about the command.
    280 This command is probably a better
    281 source of information about
    282 \fCntpq\f[]\fR(1ntpqmdoc)\f[]
    283 than this manual
    284 page.
    285 .TP 7
    286 .NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
    287 Specify a time interval to be added to timestamps included in
    288 requests which require authentication.
    289 This is used to enable
    290 (unreliable) server reconfiguration over long delay network paths
    291 or between machines whose clocks are unsynchronized.
    292 Actually the
    293 server does not now require timestamps in authenticated requests,
    294 so this command may be obsolete.
    295 .TP 7
    296 .NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
    297 Set the host to which future queries will be sent.
    298 Hostname may
    299 be either a host name or a numeric address.
    300 .TP 7
    301 .NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
    302 If
    303 \f\*[B-Font]yes\f[]
    304 is specified, host names are printed in
    305 information displays.
    306 If
    307 \f\*[B-Font]no\f[]
    308 is specified, numeric
    309 addresses are printed instead.
    310 The default is
    311 \f\*[B-Font]yes\f[],
    312 unless
    313 modified using the command line
    314 \f\*[B-Font]\-n\f[]
    315 switch.
    316 .TP 7
    317 .NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
    318 This command allows the specification of a key number to be
    319 used to authenticate configuration requests.
    320 This must correspond
    321 to a key number the server has been configured to use for this
    322 purpose.
    323 .TP 7
    324 .NOP \f\*[B-Font]quit\f[]
    325 Exit
    326 \f\*[B-Font]ntpdc\fP.
    327 .TP 7
    328 .NOP \f\*[B-Font]passwd\f[]
    329 This command prompts you to type in a password (which will not
    330 be echoed) which will be used to authenticate configuration
    331 requests.
    332 The password must correspond to the key configured for
    333 use by the NTP server for this purpose if such requests are to be
    334 successful.
    335 .TP 7
    336 .NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
    337 Specify a timeout period for responses to server queries.
    338 The
    339 default is about 8000 milliseconds.
    340 Note that since
    341 \f\*[B-Font]ntpdc\fP
    342 retries each query once after a timeout, the total waiting time for
    343 a timeout will be twice the timeout value set.
    344 .PP
    345 .SS "Control Message Commands"
    346 Query commands result in NTP mode 7 packets containing requests for
    347 information being sent to the server.
    348 These are read-only commands
    349 in that they make no modification of the server configuration
    350 state.
    351 .TP 7
    352 .NOP \f\*[B-Font]listpeers\f[]
    353 Obtains and prints a brief list of the peers for which the
    354 server is maintaining state.
    355 These should include all configured
    356 peer associations as well as those peers whose stratum is such that
    357 they are considered by the server to be possible future
    358 synchronization candidates.
    359 .TP 7
    360 .NOP \f\*[B-Font]peers\f[]
    361 Obtains a list of peers for which the server is maintaining
    362 state, along with a summary of that state.
    363 Summary information
    364 includes the address of the remote peer, the local interface
    365 address (0.0.0.0 if a local address has yet to be determined), the
    366 stratum of the remote peer (a stratum of 16 indicates the remote
    367 peer is unsynchronized), the polling interval, in seconds, the
    368 reachability register, in octal, and the current estimated delay,
    369 offset and dispersion of the peer, all in seconds.
    370 .sp \n(Ppu
    371 .ne 2
    372 
    373 The character in the left margin indicates the mode this peer
    374 entry is operating in.
    375 A
    376 \[oq]\&+\[cq]
    377 denotes symmetric active, a
    378 \[oq]\&-\[cq]
    379 indicates symmetric passive, a
    380 \[oq]\&=\[cq]
    381 means the
    382 remote server is being polled in client mode, a
    383 \[oq]\&^\[cq]
    384 indicates that the server is broadcasting to this address, a
    385 \[oq]\&~\[cq]
    386 denotes that the remote peer is sending broadcasts and a
    387 \[oq]\&~\[cq]
    388 denotes that the remote peer is sending broadcasts and a
    389 \[oq]\&*\[cq]
    390 marks the peer the server is currently synchronizing
    391 to.
    392 .sp \n(Ppu
    393 .ne 2
    394 
    395 The contents of the host field may be one of four forms.
    396 It may
    397 be a host name, an IP address, a reference clock implementation
    398 name with its parameter or
    399 \fBREFCLK\f[]\fR()\f[]
    400 On
    401 \f\*[B-Font]hostnames\f[]
    402 \f\*[B-Font]no\f[]
    403 only IP-addresses
    404 will be displayed.
    405 .TP 7
    406 .NOP \f\*[B-Font]dmpeers\f[]
    407 A slightly different peer summary list.
    408 Identical to the output
    409 of the
    410 \f\*[B-Font]peers\f[]
    411 command, except for the character in the
    412 leftmost column.
    413 Characters only appear beside peers which were
    414 included in the final stage of the clock selection algorithm.
    415 A
    416 \[oq]\&.\[cq]
    417 indicates that this peer was cast off in the falseticker
    418 detection, while a
    419 \[oq]\&+\[cq]
    420 indicates that the peer made it
    421 through.
    422 A
    423 \[oq]\&*\[cq]
    424 denotes the peer the server is currently
    425 synchronizing with.
    426 .TP 7
    427 .NOP \f\*[B-Font]showpeer\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
    428 Shows a detailed display of the current peer variables for one
    429 or more peers.
    430 Most of these values are described in the NTP
    431 Version 2 specification.
    432 .TP 7
    433 .NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
    434 Show per-peer statistic counters associated with the specified
    435 peer(s).
    436 .TP 7
    437 .NOP \f\*[B-Font]clockstat\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]]
    438 Obtain and print information concerning a peer clock.
    439 The
    440 values obtained provide information on the setting of fudge factors
    441 and other clock performance information.
    442 .TP 7
    443 .NOP \f\*[B-Font]kerninfo\f[]
    444 Obtain and print kernel phase-lock loop operating parameters.
    445 This information is available only if the kernel has been specially
    446 modified for a precision timekeeping function.
    447 .TP 7
    448 .NOP \f\*[B-Font]loopinfo\f[] [\f\*[B-Font]oneline\f[] | \f\*[B-Font]multiline\f[]]
    449 Print the values of selected loop filter variables.
    450 The loop
    451 filter is the part of NTP which deals with adjusting the local
    452 system clock.
    453 The
    454 \[oq]offset\[cq]
    455 is the last offset given to the
    456 loop filter by the packet processing code.
    457 The
    458 \[oq]frequency\[cq]
    459 is the frequency error of the local clock in parts-per-million
    460 (ppm).
    461 The
    462 \[oq]time_const\[cq]
    463 controls the stiffness of the
    464 phase-lock loop and thus the speed at which it can adapt to
    465 oscillator drift.
    466 The
    467 \[oq]watchdog timer\[cq]
    468 value is the number
    469 of seconds which have elapsed since the last sample offset was
    470 given to the loop filter.
    471 The
    472 \f\*[B-Font]oneline\f[]
    473 and
    474 \f\*[B-Font]multiline\f[]
    475 options specify the format in which this
    476 information is to be printed, with
    477 \f\*[B-Font]multiline\f[]
    478 as the
    479 default.
    480 .TP 7
    481 .NOP \f\*[B-Font]sysinfo\f[]
    482 Print a variety of system state variables, i.e., state related
    483 to the local server.
    484 All except the last four lines are described
    485 in the NTP Version 3 specification, RFC-1305.
    486 .sp \n(Ppu
    487 .ne 2
    488 
    489 The
    490 \[oq]system flags\[cq]
    491 show various system flags, some of
    492 which can be set and cleared by the
    493 \f\*[B-Font]enable\f[]
    494 and
    495 \f\*[B-Font]disable\f[]
    496 configuration commands, respectively.
    497 These are
    498 the
    499 \f\*[B-Font]auth\f[],
    500 \f\*[B-Font]bclient\f[],
    501 \f\*[B-Font]monitor\f[],
    502 \f\*[B-Font]pll\f[],
    503 \f\*[B-Font]pps\f[]
    504 and
    505 \f\*[B-Font]stats\f[]
    506 flags.
    507 See the
    508 \fCntpd\f[]\fR(1ntpdmdoc)\f[]
    509 documentation for the meaning of these flags.
    510 There
    511 are two additional flags which are read only, the
    512 \f\*[B-Font]kernel_pll\f[]
    513 and
    514 \f\*[B-Font]kernel_pps\f[].
    515 These flags indicate
    516 the synchronization status when the precision time kernel
    517 modifications are in use.
    518 The
    519 \[oq]kernel_pll\[cq]
    520 indicates that
    521 the local clock is being disciplined by the kernel, while the
    522 \[oq]kernel_pps\[cq]
    523 indicates the kernel discipline is provided by the PPS
    524 signal.
    525 .sp \n(Ppu
    526 .ne 2
    527 
    528 The
    529 \[oq]stability\[cq]
    530 is the residual frequency error remaining
    531 after the system frequency correction is applied and is intended for
    532 maintenance and debugging.
    533 In most architectures, this value will
    534 initially decrease from as high as 500 ppm to a nominal value in
    535 the range .01 to 0.1 ppm.
    536 If it remains high for some time after
    537 starting the daemon, something may be wrong with the local clock,
    538 or the value of the kernel variable
    539 \fIkern.clockrate.tick\f[]
    540 may be
    541 incorrect.
    542 .sp \n(Ppu
    543 .ne 2
    544 
    545 The
    546 \[oq]broadcastdelay\[cq]
    547 shows the default broadcast delay,
    548 as set by the
    549 \f\*[B-Font]broadcastdelay\f[]
    550 configuration command.
    551 .sp \n(Ppu
    552 .ne 2
    553 
    554 The
    555 \[oq]authdelay\[cq]
    556 shows the default authentication delay,
    557 as set by the
    558 \f\*[B-Font]authdelay\f[]
    559 configuration command.
    560 .TP 7
    561 .NOP \f\*[B-Font]sysstats\f[]
    562 Print statistics counters maintained in the protocol
    563 module.
    564 .TP 7
    565 .NOP \f\*[B-Font]memstats\f[]
    566 Print statistics counters related to memory allocation
    567 code.
    568 .TP 7
    569 .NOP \f\*[B-Font]iostats\f[]
    570 Print statistics counters maintained in the input-output
    571 module.
    572 .TP 7
    573 .NOP \f\*[B-Font]timerstats\f[]
    574 Print statistics counters maintained in the timer/event queue
    575 support code.
    576 .TP 7
    577 .NOP \f\*[B-Font]reslist\f[]
    578 Obtain and print the server's restriction list.
    579 This list is
    580 (usually) printed in sorted order and may help to understand how
    581 the restrictions are applied.
    582 .TP 7
    583 .NOP \f\*[B-Font]monlist\f[] [\f\*[I-Font]version\f[]]
    584 Obtain and print traffic counts collected and maintained by the
    585 monitor facility.
    586 The version number should not normally need to be
    587 specified.
    588 .TP 7
    589 .NOP \f\*[B-Font]clkbug\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]]
    590 Obtain debugging information for a reference clock driver.
    591 This
    592 information is provided only by some clock drivers and is mostly
    593 undecodable without a copy of the driver source in hand.
    594 .PP
    595 .SS "Runtime Configuration Requests"
    596 All requests which cause state changes in the server are
    597 authenticated by the server using a configured NTP key (the
    598 facility can also be disabled by the server by not configuring a
    599 key).
    600 The key number and the corresponding key must also be made
    601 known to
    602 \f\*[B-Font]ntpdc\fP.
    603 This can be done using the
    604 \f\*[B-Font]keyid\f[]
    605 and
    606 \f\*[B-Font]passwd\f[]
    607 commands, the latter of which will prompt at the terminal for a
    608 password to use as the encryption key.
    609 You will also be prompted
    610 automatically for both the key number and password the first time a
    611 command which would result in an authenticated request to the
    612 server is given.
    613 Authentication not only provides verification that
    614 the requester has permission to make such changes, but also gives
    615 an extra degree of protection again transmission errors.
    616 .sp \n(Ppu
    617 .ne 2
    618 
    619 Authenticated requests always include a timestamp in the packet
    620 data, which is included in the computation of the authentication
    621 code.
    622 This timestamp is compared by the server to its receive time
    623 stamp.
    624 If they differ by more than a small amount the request is
    625 rejected.
    626 This is done for two reasons.
    627 First, it makes simple
    628 replay attacks on the server, by someone who might be able to
    629 overhear traffic on your LAN, much more difficult.
    630 Second, it makes
    631 it more difficult to request configuration changes to your server
    632 from topologically remote hosts.
    633 While the reconfiguration facility
    634 will work well with a server on the local host, and may work
    635 adequately between time-synchronized hosts on the same LAN, it will
    636 work very poorly for more distant hosts.
    637 As such, if reasonable
    638 passwords are chosen, care is taken in the distribution and
    639 protection of keys and appropriate source address restrictions are
    640 applied, the run time reconfiguration facility should provide an
    641 adequate level of security.
    642 .sp \n(Ppu
    643 .ne 2
    644 
    645 The following commands all make authenticated requests.
    646 .TP 7
    647 .NOP \f\*[B-Font]addpeer\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
    648 Add a configured peer association at the given address and
    649 operating in symmetric active mode.
    650 Note that an existing
    651 association with the same peer may be deleted when this command is
    652 executed, or may simply be converted to conform to the new
    653 configuration, as appropriate.
    654 If the optional
    655 \f\*[I-Font]keyid\f[]
    656 is a
    657 nonzero integer, all outgoing packets to the remote server will
    658 have an authentication field attached encrypted with this key.
    659 If
    660 the value is 0 (or not given) no authentication will be done.
    661 The
    662 \f\*[I-Font]version\f[]
    663 can be 1, 2 or 3 and defaults to 3.
    664 The
    665 \f\*[B-Font]prefer\f[]
    666 keyword indicates a preferred peer (and thus will
    667 be used primarily for clock synchronisation if possible).
    668 The
    669 preferred peer also determines the validity of the PPS signal \- if
    670 the preferred peer is suitable for synchronisation so is the PPS
    671 signal.
    672 .TP 7
    673 .NOP \f\*[B-Font]addserver\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
    674 Identical to the addpeer command, except that the operating
    675 mode is client.
    676 .TP 7
    677 .NOP \f\*[B-Font]broadcast\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]keyid\f[]] [\f\*[I-Font]version\f[]] [\f\*[B-Font]prefer\f[]]
    678 Identical to the addpeer command, except that the operating
    679 mode is broadcast.
    680 In this case a valid key identifier and key are
    681 required.
    682 The
    683 \f\*[I-Font]peer_address\f[]
    684 parameter can be the broadcast
    685 address of the local network or a multicast group address assigned
    686 to NTP.
    687 If a multicast address, a multicast-capable kernel is
    688 required.
    689 .TP 7
    690 .NOP \f\*[B-Font]unconfig\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]]
    691 This command causes the configured bit to be removed from the
    692 specified peer(s).
    693 In many cases this will cause the peer
    694 association to be deleted.
    695 When appropriate, however, the
    696 association may persist in an unconfigured mode if the remote peer
    697 is willing to continue on in this fashion.
    698 .TP 7
    699 .NOP \f\*[B-Font]fudge\f[] \f\*[I-Font]peer_address\f[] [\f\*[B-Font]time1\f[]] [\f\*[B-Font]time2\f[]] [\f\*[I-Font]stratum\f[]] [\f\*[I-Font]refid\f[]]
    700 This command provides a way to set certain data for a reference
    701 clock.
    702 See the source listing for further information.
    703 .TP 7
    704 .NOP \f\*[B-Font]enable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]pps\f[] | \f\*[B-Font]stats\f[]]
    705 .TP 7
    706 .NOP \f\*[B-Font]disable\f[] [\f\*[B-Font]auth\f[] | \f\*[B-Font]bclient\f[] | \f\*[B-Font]calibrate\f[] | \f\*[B-Font]kernel\f[] | \f\*[B-Font]monitor\f[] | \f\*[B-Font]ntp\f[] | \f\*[B-Font]pps\f[] | \f\*[B-Font]stats\f[]]
    707 These commands operate in the same way as the
    708 \f\*[B-Font]enable\f[]
    709 and
    710 \f\*[B-Font]disable\f[]
    711 configuration file commands of
    712 \fCntpd\f[]\fR(1ntpdmdoc)\f[].
    713 .RS
    714 .TP 7
    715 .NOP \f\*[B-Font]auth\f[]
    716 Enables the server to synchronize with unconfigured peers only
    717 if the peer has been correctly authenticated using either public key
    718 or private key cryptography.
    719 The default for this flag is enable.
    720 .TP 7
    721 .NOP \f\*[B-Font]bclient\f[]
    722 Enables the server to listen for a message from a broadcast or
    723 multicast server, as in the multicastclient command with
    724 default address.
    725 The default for this flag is disable.
    726 .TP 7
    727 .NOP \f\*[B-Font]calibrate\f[]
    728 Enables the calibrate feature for reference clocks.
    729 The default for this flag is disable.
    730 .TP 7
    731 .NOP \f\*[B-Font]kernel\f[]
    732 Enables the kernel time discipline, if available.
    733 The default for this flag is enable if support is available, otherwise disable.
    734 .TP 7
    735 .NOP \f\*[B-Font]monitor\f[]
    736 Enables the monitoring facility.
    737 See the documentation here about the
    738 \f\*[B-Font]monlist\f[]
    739 command or further information.
    740 The default for this flag is enable.
    741 .TP 7
    742 .NOP \f\*[B-Font]ntp\f[]
    743 Enables time and frequency discipline.
    744 In effect, this switch opens and closes the feedback loop,
    745 which is useful for testing.
    746 The default for this flag is enable.
    747 .TP 7
    748 .NOP \f\*[B-Font]pps\f[]
    749 Enables the pulse-per-second (PPS) signal when frequency
    750 and time is disciplined by the precision time kernel modifications.
    751 See the
    752 "A Kernel Model for Precision Timekeeping"
    753 (available as part of the HTML documentation
    754 provided in
    755 \fI/usr/share/doc/ntp\f[])
    756 page for further information.
    757 The default for this flag is disable.
    758 .TP 7
    759 .NOP \f\*[B-Font]stats\f[]
    760 Enables the statistics facility.
    761 See the
    762 \fIMonitoring\f[] \fIOptions\f[]
    763 section of
    764 \fCntp.conf\f[]\fR(5)\f[]
    765 for further information.
    766 The default for this flag is disable.
    767 .RE
    768 .TP 7
    769 .NOP \f\*[B-Font]restrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] \f\*[I-Font]flag\f[] [\f\*[I-Font]...\f[]]
    770 This command operates in the same way as the
    771 \f\*[B-Font]restrict\f[]
    772 configuration file commands of
    773 \fCntpd\f[]\fR(1ntpdmdoc)\f[].
    774 .TP 7
    775 .NOP \f\*[B-Font]unrestrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] \f\*[I-Font]flag\f[] [\f\*[I-Font]...\f[]]
    776 Unrestrict the matching entry from the restrict list.
    777 .TP 7
    778 .NOP \f\*[B-Font]delrestrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] [\f\*[B-Font]ntpport\f[]]
    779 Delete the matching entry from the restrict list.
    780 .TP 7
    781 .NOP \f\*[B-Font]readkeys\f[]
    782 Causes the current set of authentication keys to be purged and
    783 a new set to be obtained by rereading the keys file (which must
    784 have been specified in the
    785 \fCntpd\f[]\fR(1ntpdmdoc)\f[]
    786 configuration file).
    787 This
    788 allows encryption keys to be changed without restarting the
    789 server.
    790 .TP 7
    791 .NOP \f\*[B-Font]trustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]]
    792 .TP 7
    793 .NOP \f\*[B-Font]untrustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]]
    794 These commands operate in the same way as the
    795 \f\*[B-Font]trustedkey\f[]
    796 and
    797 \f\*[B-Font]untrustedkey\f[]
    798 configuration file
    799 commands of
    800 \fCntpd\f[]\fR(1ntpdmdoc)\f[].
    801 .TP 7
    802 .NOP \f\*[B-Font]authinfo\f[]
    803 Returns information concerning the authentication module,
    804 including known keys and counts of encryptions and decryptions
    805 which have been done.
    806 .TP 7
    807 .NOP \f\*[B-Font]traps\f[]
    808 Display the traps set in the server.
    809 See the source listing for
    810 further information.
    811 .TP 7
    812 .NOP \f\*[B-Font]addtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]]
    813 Set a trap for asynchronous messages.
    814 See the source listing
    815 for further information.
    816 .TP 7
    817 .NOP \f\*[B-Font]clrtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]]
    818 Clear a trap for asynchronous messages.
    819 See the source listing
    820 for further information.
    821 .TP 7
    822 .NOP \f\*[B-Font]reset\f[]
    823 Clear the statistics counters in various modules of the server.
    824 See the source listing for further information.
    825 .PP
    826 .SH "ENVIRONMENT"
    827 See \fBOPTION PRESETS\fP for configuration environment variables.
    828 .SH "FILES"
    829 See \fBOPTION PRESETS\fP for configuration files.
    830 .SH "EXIT STATUS"
    831 One of the following exit values will be returned:
    832 .TP
    833 .NOP 0 " (EXIT_SUCCESS)"
    834 Successful program execution.
    835 .TP
    836 .NOP 1 " (EXIT_FAILURE)"
    837 The operation failed or the command syntax was not valid.
    838 .TP
    839 .NOP 66 " (EX_NOINPUT)"
    840 A specified configuration file could not be loaded.
    841 .TP
    842 .NOP 70 " (EX_SOFTWARE)"
    843 libopts had an internal operational error.  Please report
    844 it to autogen-users (a] lists.sourceforge.net.  Thank you.
    845 .PP
    846 .SH "SEE ALSO"
    847 \fCntp.conf\f[]\fR(5)\f[],
    848 \fCntpd\f[]\fR(1ntpdmdoc)\f[]
    849 David L. Mills,
    850 \fINetwork Time Protocol (Version 3)\fR,
    851 RFC1305
    852 .PP
    853 
    854 .SH AUTHORS
    855 The formatting directives in this document came from FreeBSD.
    856 .SH "COPYRIGHT"
    857 Copyright (C) 1992-2024 The University of Delaware and Network Time Foundation all rights reserved.
    858 This program is released under the terms of the NTP license, <http://ntp.org/license>.
    859 .SH BUGS
    860 The
    861 \f\*[B-Font]ntpdc\fP
    862 utility is a crude hack.
    863 Much of the information it shows is
    864 deadly boring and could only be loved by its implementer.
    865 The
    866 program was designed so that new (and temporary) features were easy
    867 to hack in, at great expense to the program's ease of use.
    868 Despite
    869 this, the program is occasionally useful.
    870 .sp \n(Ppu
    871 .ne 2
    872 
    873 Please report bugs to http://bugs.ntp.org .
    874 .sp \n(Ppu
    875 .ne 2
    876 
    877 Please send bug reports to: https://bugs.ntp.org, bugs (a] ntp.org
    878 .SH "NOTES"
    879 This manual page was \fIAutoGen\fP-erated from the \fBntpdc\fP
    880 option definitions.
    881