From: Harlan Stenn Date: Sun, 26 Jun 2022 10:46:50 +0000 (-0500) Subject: Check in autogen files for the -u flag to ntpdc/ntpq X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef5a8e5a876f590cdd32cdac474e3748c7e9ed9b;p=thirdparty%2Fntp.git Check in autogen files for the -u flag to ntpdc/ntpq bk: 62b8391aZkqNbim19zJ4wWtZRzaV8g --- diff --git a/ntpdc/invoke-ntpdc.texi b/ntpdc/invoke-ntpdc.texi index f37dfe572..aaa64e06d 100644 --- a/ntpdc/invoke-ntpdc.texi +++ b/ntpdc/invoke-ntpdc.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi) # -# It has been AutoGen-ed June 23, 2020 at 02:20:45 AM by AutoGen 5.18.5 +# It has been AutoGen-ed June 26, 2022 at 05:34:08 AM by AutoGen 5.18.5 # From the definitions ntpdc-opts.def # and the template file agtexi-cmd.tpl @end ignore diff --git a/ntpdc/ntpdc-opts.c b/ntpdc/ntpdc-opts.c index b5eda1138..0363e6c37 100644 --- a/ntpdc/ntpdc-opts.c +++ b/ntpdc/ntpdc-opts.c @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpdc-opts.c) * - * It has been AutoGen-ed June 23, 2020 at 02:20:41 AM by AutoGen 5.18.5 + * It has been AutoGen-ed June 26, 2022 at 05:34:04 AM by AutoGen 5.18.5 * From the definitions ntpdc-opts.def * and the template file options * diff --git a/ntpdc/ntpdc-opts.h b/ntpdc/ntpdc-opts.h index 9c7659e47..6f10f8a02 100644 --- a/ntpdc/ntpdc-opts.h +++ b/ntpdc/ntpdc-opts.h @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpdc-opts.h) * - * It has been AutoGen-ed June 23, 2020 at 02:20:41 AM by AutoGen 5.18.5 + * It has been AutoGen-ed June 26, 2022 at 05:34:04 AM by AutoGen 5.18.5 * From the definitions ntpdc-opts.def * and the template file options * diff --git a/ntpdc/ntpdc.1ntpdcman b/ntpdc/ntpdc.1ntpdcman index 7ac601fa4..c6a72cfeb 100644 --- a/ntpdc/ntpdc.1ntpdcman +++ b/ntpdc/ntpdc.1ntpdcman @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpdc 1ntpdcman "23 Jun 2020" "4.2.8p15" "User Commands" +.TH ntpdc 1ntpdcman "26 Jun 2022" "4.2.8p15" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 23, 2020 at 02:20:47 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 26, 2022 at 05:34:10 AM by AutoGen 5.18.5 .\" From the definitions ntpdc-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -31,32 +31,7 @@ .ne 2 .SH DESCRIPTION -\f\*[B-Font]ntpdc\fP -is deprecated. -Please use -\fCntpq\f[]\fR(1ntpqmdoc)\f[] instead \- it can do everything -\f\*[B-Font]ntpdc\fP -used to do, and it does so using a much more sane interface. -.sp \n(Ppu -.ne 2 - -\f\*[B-Font]ntpdc\fP -is a utility program used to query -\fCntpd\f[]\fR(1ntpdmdoc)\f[] -about its -current state and to request changes in that state. -It uses NTP mode 7 control message formats described in the source code. -The program may -be run either in interactive mode or controlled using command line -arguments. -Extensive state and statistics information is available -through the -\f\*[B-Font]ntpdc\fP -interface. -In addition, nearly all the -configuration options which can be specified at startup using -ntpd's configuration file may also be specified at run time using -\f\*[B-Font]ntpdc\fP. +#! /bin/cat .SH "OPTIONS" .TP .NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[] @@ -168,655 +143,7 @@ The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". If any of these are directories, then the file \fI.ntprc\fP is searched for within those directories. .SH USAGE -If one or more request options are included on the command line -when -\f\*[B-Font]ntpdc\fP -is executed, each of the requests will be sent -to the NTP servers running on each of the hosts given as command -line arguments, or on localhost by default. -If no request options -are given, -\f\*[B-Font]ntpdc\fP -will attempt to read commands from the -standard input and execute these on the NTP server running on the -first host given on the command line, again defaulting to localhost -when no other host is specified. -The -\f\*[B-Font]ntpdc\fP -utility will prompt for -commands if the standard input is a terminal device. -.sp \n(Ppu -.ne 2 - -The -\f\*[B-Font]ntpdc\fP -utility uses NTP mode 7 packets to communicate with the -NTP server, and hence can be used to query any compatible server on -the network which permits it. -Note that since NTP is a UDP protocol -this communication will be somewhat unreliable, especially over -large distances in terms of network topology. -The -\f\*[B-Font]ntpdc\fP -utility makes -no attempt to retransmit requests, and will time requests out if -the remote host is not heard from within a suitable timeout -time. -.sp \n(Ppu -.ne 2 - -The operation of -\f\*[B-Font]ntpdc\fP -are specific to the particular -implementation of the -\fCntpd\f[]\fR(1ntpdmdoc)\f[] -daemon and can be expected to -work only with this and maybe some previous versions of the daemon. -Requests from a remote -\f\*[B-Font]ntpdc\fP -utility which affect the -state of the local server must be authenticated, which requires -both the remote program and local server share a common key and key -identifier. -.sp \n(Ppu -.ne 2 - -Note that in contexts where a host name is expected, a -\f\*[B-Font]\-4\f[] -qualifier preceding the host name forces DNS resolution to the IPv4 namespace, -while a -\f\*[B-Font]\-6\f[] -qualifier forces DNS resolution to the IPv6 namespace. -Specifying a command line option other than -\f\*[B-Font]\-i\f[] -or -\f\*[B-Font]\-n\f[] -will cause the specified query (queries) to be sent to -the indicated host(s) immediately. -Otherwise, -\f\*[B-Font]ntpdc\fP -will -attempt to read interactive format commands from the standard -input. -.SS "Interactive Commands" -Interactive format commands consist of a keyword followed by zero -to four arguments. -Only enough characters of the full keyword to -uniquely identify the command need be typed. -The output of a -command is normally sent to the standard output, but optionally the -output of individual commands may be sent to a file by appending a -\[oq]\&>\[cq], -followed by a file name, to the command line. -.sp \n(Ppu -.ne 2 - -A number of interactive format commands are executed entirely -within the -\f\*[B-Font]ntpdc\fP -utility itself and do not result in NTP -mode 7 requests being sent to a server. -These are described -following. -.TP 7 -.NOP \f\*[B-Font]\&?\f[] \f\*[I-Font]command_keyword\f[] -.TP 7 -.NOP \f\*[B-Font]help\f[] \f\*[I-Font]command_keyword\f[] -A -\[oq]\f\*[B-Font]\&?\f[]\[cq] -will print a list of all the command -keywords known to this incarnation of -\f\*[B-Font]ntpdc\fP. -A -\[oq]\f\*[B-Font]\&?\f[]\[cq] -followed by a command keyword will print function and usage -information about the command. -This command is probably a better -source of information about -\fCntpq\f[]\fR(1ntpqmdoc)\f[] -than this manual -page. -.TP 7 -.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[] -Specify a time interval to be added to timestamps included in -requests which require authentication. -This is used to enable -(unreliable) server reconfiguration over long delay network paths -or between machines whose clocks are unsynchronized. -Actually the -server does not now require timestamps in authenticated requests, -so this command may be obsolete. -.TP 7 -.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[] -Set the host to which future queries will be sent. -Hostname may -be either a host name or a numeric address. -.TP 7 -.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]] -If -\f\*[B-Font]yes\f[] -is specified, host names are printed in -information displays. -If -\f\*[B-Font]no\f[] -is specified, numeric -addresses are printed instead. -The default is -\f\*[B-Font]yes\f[], -unless -modified using the command line -\f\*[B-Font]\-n\f[] -switch. -.TP 7 -.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[] -This command allows the specification of a key number to be -used to authenticate configuration requests. -This must correspond -to a key number the server has been configured to use for this -purpose. -.TP 7 -.NOP \f\*[B-Font]quit\f[] -Exit -\f\*[B-Font]ntpdc\fP. -.TP 7 -.NOP \f\*[B-Font]passwd\f[] -This command prompts you to type in a password (which will not -be echoed) which will be used to authenticate configuration -requests. -The password must correspond to the key configured for -use by the NTP server for this purpose if such requests are to be -successful. -.TP 7 -.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[] -Specify a timeout period for responses to server queries. -The -default is about 8000 milliseconds. -Note that since -\f\*[B-Font]ntpdc\fP -retries each query once after a timeout, the total waiting time for -a timeout will be twice the timeout value set. -.PP -.SS "Control Message Commands" -Query commands result in NTP mode 7 packets containing requests for -information being sent to the server. -These are read-only commands -in that they make no modification of the server configuration -state. -.TP 7 -.NOP \f\*[B-Font]listpeers\f[] -Obtains and prints a brief list of the peers for which the -server is maintaining state. -These should include all configured -peer associations as well as those peers whose stratum is such that -they are considered by the server to be possible future -synchronization candidates. -.TP 7 -.NOP \f\*[B-Font]peers\f[] -Obtains a list of peers for which the server is maintaining -state, along with a summary of that state. -Summary information -includes the address of the remote peer, the local interface -address (0.0.0.0 if a local address has yet to be determined), the -stratum of the remote peer (a stratum of 16 indicates the remote -peer is unsynchronized), the polling interval, in seconds, the -reachability register, in octal, and the current estimated delay, -offset and dispersion of the peer, all in seconds. -.sp \n(Ppu -.ne 2 - -The character in the left margin indicates the mode this peer -entry is operating in. -A -\[oq]\&+\[cq] -denotes symmetric active, a -\[oq]\&-\[cq] -indicates symmetric passive, a -\[oq]\&=\[cq] -means the -remote server is being polled in client mode, a -\[oq]\&^\[cq] -indicates that the server is broadcasting to this address, a -\[oq]\&~\[cq] -denotes that the remote peer is sending broadcasts and a -\[oq]\&~\[cq] -denotes that the remote peer is sending broadcasts and a -\[oq]\&*\[cq] -marks the peer the server is currently synchronizing -to. -.sp \n(Ppu -.ne 2 - -The contents of the host field may be one of four forms. -It may -be a host name, an IP address, a reference clock implementation -name with its parameter or -\fBREFCLK\f[]\fR()\f[] -On -\f\*[B-Font]hostnames\f[] -\f\*[B-Font]no\f[] -only IP-addresses -will be displayed. -.TP 7 -.NOP \f\*[B-Font]dmpeers\f[] -A slightly different peer summary list. -Identical to the output -of the -\f\*[B-Font]peers\f[] -command, except for the character in the -leftmost column. -Characters only appear beside peers which were -included in the final stage of the clock selection algorithm. -A -\[oq]\&.\[cq] -indicates that this peer was cast off in the falseticker -detection, while a -\[oq]\&+\[cq] -indicates that the peer made it -through. -A -\[oq]\&*\[cq] -denotes the peer the server is currently -synchronizing with. -.TP 7 -.NOP \f\*[B-Font]showpeer\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]] -Shows a detailed display of the current peer variables for one -or more peers. -Most of these values are described in the NTP -Version 2 specification. -.TP 7 -.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]] -Show per-peer statistic counters associated with the specified -peer(s). -.TP 7 -.NOP \f\*[B-Font]clockstat\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]] -Obtain and print information concerning a peer clock. -The -values obtained provide information on the setting of fudge factors -and other clock performance information. -.TP 7 -.NOP \f\*[B-Font]kerninfo\f[] -Obtain and print kernel phase-lock loop operating parameters. -This information is available only if the kernel has been specially -modified for a precision timekeeping function. -.TP 7 -.NOP \f\*[B-Font]loopinfo\f[] [\f\*[B-Font]oneline\f[] | \f\*[B-Font]multiline\f[]] -Print the values of selected loop filter variables. -The loop -filter is the part of NTP which deals with adjusting the local -system clock. -The -\[oq]offset\[cq] -is the last offset given to the -loop filter by the packet processing code. -The -\[oq]frequency\[cq] -is the frequency error of the local clock in parts-per-million -(ppm). -The -\[oq]time_const\[cq] -controls the stiffness of the -phase-lock loop and thus the speed at which it can adapt to -oscillator drift. -The -\[oq]watchdog timer\[cq] -value is the number -of seconds which have elapsed since the last sample offset was -given to the loop filter. -The -\f\*[B-Font]oneline\f[] -and -\f\*[B-Font]multiline\f[] -options specify the format in which this -information is to be printed, with -\f\*[B-Font]multiline\f[] -as the -default. -.TP 7 -.NOP \f\*[B-Font]sysinfo\f[] -Print a variety of system state variables, i.e., state related -to the local server. -All except the last four lines are described -in the NTP Version 3 specification, RFC-1305. -.sp \n(Ppu -.ne 2 - -The -\[oq]system flags\[cq] -show various system flags, some of -which can be set and cleared by the -\f\*[B-Font]enable\f[] -and -\f\*[B-Font]disable\f[] -configuration commands, respectively. -These are -the -\f\*[B-Font]auth\f[], -\f\*[B-Font]bclient\f[], -\f\*[B-Font]monitor\f[], -\f\*[B-Font]pll\f[], -\f\*[B-Font]pps\f[] -and -\f\*[B-Font]stats\f[] -flags. -See the -\fCntpd\f[]\fR(1ntpdmdoc)\f[] -documentation for the meaning of these flags. -There -are two additional flags which are read only, the -\f\*[B-Font]kernel_pll\f[] -and -\f\*[B-Font]kernel_pps\f[]. -These flags indicate -the synchronization status when the precision time kernel -modifications are in use. -The -\[oq]kernel_pll\[cq] -indicates that -the local clock is being disciplined by the kernel, while the -\[oq]kernel_pps\[cq] -indicates the kernel discipline is provided by the PPS -signal. -.sp \n(Ppu -.ne 2 - -The -\[oq]stability\[cq] -is the residual frequency error remaining -after the system frequency correction is applied and is intended for -maintenance and debugging. -In most architectures, this value will -initially decrease from as high as 500 ppm to a nominal value in -the range .01 to 0.1 ppm. -If it remains high for some time after -starting the daemon, something may be wrong with the local clock, -or the value of the kernel variable -\fIkern.clockrate.tick\f[] -may be -incorrect. -.sp \n(Ppu -.ne 2 - -The -\[oq]broadcastdelay\[cq] -shows the default broadcast delay, -as set by the -\f\*[B-Font]broadcastdelay\f[] -configuration command. -.sp \n(Ppu -.ne 2 - -The -\[oq]authdelay\[cq] -shows the default authentication delay, -as set by the -\f\*[B-Font]authdelay\f[] -configuration command. -.TP 7 -.NOP \f\*[B-Font]sysstats\f[] -Print statistics counters maintained in the protocol -module. -.TP 7 -.NOP \f\*[B-Font]memstats\f[] -Print statistics counters related to memory allocation -code. -.TP 7 -.NOP \f\*[B-Font]iostats\f[] -Print statistics counters maintained in the input-output -module. -.TP 7 -.NOP \f\*[B-Font]timerstats\f[] -Print statistics counters maintained in the timer/event queue -support code. -.TP 7 -.NOP \f\*[B-Font]reslist\f[] -Obtain and print the server's restriction list. -This list is -(usually) printed in sorted order and may help to understand how -the restrictions are applied. -.TP 7 -.NOP \f\*[B-Font]monlist\f[] [\f\*[I-Font]version\f[]] -Obtain and print traffic counts collected and maintained by the -monitor facility. -The version number should not normally need to be -specified. -.TP 7 -.NOP \f\*[B-Font]clkbug\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]] -Obtain debugging information for a reference clock driver. -This -information is provided only by some clock drivers and is mostly -undecodable without a copy of the driver source in hand. -.PP -.SS "Runtime Configuration Requests" -All requests which cause state changes in the server are -authenticated by the server using a configured NTP key (the -facility can also be disabled by the server by not configuring a -key). -The key number and the corresponding key must also be made -known to -\f\*[B-Font]ntpdc\fP. -This can be done using the -\f\*[B-Font]keyid\f[] -and -\f\*[B-Font]passwd\f[] -commands, the latter of which will prompt at the terminal for a -password to use as the encryption key. -You will also be prompted -automatically for both the key number and password the first time a -command which would result in an authenticated request to the -server is given. -Authentication not only provides verification that -the requester has permission to make such changes, but also gives -an extra degree of protection again transmission errors. -.sp \n(Ppu -.ne 2 - -Authenticated requests always include a timestamp in the packet -data, which is included in the computation of the authentication -code. -This timestamp is compared by the server to its receive time -stamp. -If they differ by more than a small amount the request is -rejected. -This is done for two reasons. -First, it makes simple -replay attacks on the server, by someone who might be able to -overhear traffic on your LAN, much more difficult. -Second, it makes -it more difficult to request configuration changes to your server -from topologically remote hosts. -While the reconfiguration facility -will work well with a server on the local host, and may work -adequately between time-synchronized hosts on the same LAN, it will -work very poorly for more distant hosts. -As such, if reasonable -passwords are chosen, care is taken in the distribution and -protection of keys and appropriate source address restrictions are -applied, the run time reconfiguration facility should provide an -adequate level of security. -.sp \n(Ppu -.ne 2 - -The following commands all make authenticated requests. -.TP 7 -.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[]] -Add a configured peer association at the given address and -operating in symmetric active mode. -Note that an existing -association with the same peer may be deleted when this command is -executed, or may simply be converted to conform to the new -configuration, as appropriate. -If the optional -\f\*[I-Font]keyid\f[] -is a -nonzero integer, all outgoing packets to the remote server will -have an authentication field attached encrypted with this key. -If -the value is 0 (or not given) no authentication will be done. -The -\f\*[I-Font]version\f[] -can be 1, 2 or 3 and defaults to 3. -The -\f\*[B-Font]prefer\f[] -keyword indicates a preferred peer (and thus will -be used primarily for clock synchronisation if possible). -The -preferred peer also determines the validity of the PPS signal \- if -the preferred peer is suitable for synchronisation so is the PPS -signal. -.TP 7 -.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[]] -Identical to the addpeer command, except that the operating -mode is client. -.TP 7 -.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[]] -Identical to the addpeer command, except that the operating -mode is broadcast. -In this case a valid key identifier and key are -required. -The -\f\*[I-Font]peer_address\f[] -parameter can be the broadcast -address of the local network or a multicast group address assigned -to NTP. -If a multicast address, a multicast-capable kernel is -required. -.TP 7 -.NOP \f\*[B-Font]unconfig\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]] -This command causes the configured bit to be removed from the -specified peer(s). -In many cases this will cause the peer -association to be deleted. -When appropriate, however, the -association may persist in an unconfigured mode if the remote peer -is willing to continue on in this fashion. -.TP 7 -.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[]] -This command provides a way to set certain data for a reference -clock. -See the source listing for further information. -.TP 7 -.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[]] -.TP 7 -.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[]] -These commands operate in the same way as the -\f\*[B-Font]enable\f[] -and -\f\*[B-Font]disable\f[] -configuration file commands of -\fCntpd\f[]\fR(1ntpdmdoc)\f[]. -.RS -.TP 7 -.NOP \f\*[B-Font]auth\f[] -Enables the server to synchronize with unconfigured peers only -if the peer has been correctly authenticated using either public key -or private key cryptography. -The default for this flag is enable. -.TP 7 -.NOP \f\*[B-Font]bclient\f[] -Enables the server to listen for a message from a broadcast or -multicast server, as in the multicastclient command with -default address. -The default for this flag is disable. -.TP 7 -.NOP \f\*[B-Font]calibrate\f[] -Enables the calibrate feature for reference clocks. -The default for this flag is disable. -.TP 7 -.NOP \f\*[B-Font]kernel\f[] -Enables the kernel time discipline, if available. -The default for this flag is enable if support is available, otherwise disable. -.TP 7 -.NOP \f\*[B-Font]monitor\f[] -Enables the monitoring facility. -See the documentation here about the -\f\*[B-Font]monlist\f[] -command or further information. -The default for this flag is enable. -.TP 7 -.NOP \f\*[B-Font]ntp\f[] -Enables time and frequency discipline. -In effect, this switch opens and closes the feedback loop, -which is useful for testing. -The default for this flag is enable. -.TP 7 -.NOP \f\*[B-Font]pps\f[] -Enables the pulse-per-second (PPS) signal when frequency -and time is disciplined by the precision time kernel modifications. -See the -"A Kernel Model for Precision Timekeeping" -(available as part of the HTML documentation -provided in -\fI/usr/share/doc/ntp\f[]) -page for further information. -The default for this flag is disable. -.TP 7 -.NOP \f\*[B-Font]stats\f[] -Enables the statistics facility. -See the -\fIMonitoring\f[] \fIOptions\f[] -section of -\fCntp.conf\f[]\fR(5)\f[] -for further information. -The default for this flag is disable. -.RE -.TP 7 -.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[]] -This command operates in the same way as the -\f\*[B-Font]restrict\f[] -configuration file commands of -\fCntpd\f[]\fR(1ntpdmdoc)\f[]. -.TP 7 -.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[]] -Unrestrict the matching entry from the restrict list. -.TP 7 -.NOP \f\*[B-Font]delrestrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] [\f\*[B-Font]ntpport\f[]] -Delete the matching entry from the restrict list. -.TP 7 -.NOP \f\*[B-Font]readkeys\f[] -Causes the current set of authentication keys to be purged and -a new set to be obtained by rereading the keys file (which must -have been specified in the -\fCntpd\f[]\fR(1ntpdmdoc)\f[] -configuration file). -This -allows encryption keys to be changed without restarting the -server. -.TP 7 -.NOP \f\*[B-Font]trustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]] -.TP 7 -.NOP \f\*[B-Font]untrustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]] -These commands operate in the same way as the -\f\*[B-Font]trustedkey\f[] -and -\f\*[B-Font]untrustedkey\f[] -configuration file -commands of -\fCntpd\f[]\fR(1ntpdmdoc)\f[]. -.TP 7 -.NOP \f\*[B-Font]authinfo\f[] -Returns information concerning the authentication module, -including known keys and counts of encryptions and decryptions -which have been done. -.TP 7 -.NOP \f\*[B-Font]traps\f[] -Display the traps set in the server. -See the source listing for -further information. -.TP 7 -.NOP \f\*[B-Font]addtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]] -Set a trap for asynchronous messages. -See the source listing -for further information. -.TP 7 -.NOP \f\*[B-Font]clrtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]] -Clear a trap for asynchronous messages. -See the source listing -for further information. -.TP 7 -.NOP \f\*[B-Font]reset\f[] -Clear the statistics counters in various modules of the server. -See the source listing for further information. -.PP +#! /bin/cat .SH "ENVIRONMENT" See \fBOPTION PRESETS\fP for configuration environment variables. .SH "FILES" @@ -838,33 +165,14 @@ libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you. .PP .SH "SEE ALSO" -\fCntp.conf\f[]\fR(5)\f[], -\fCntpd\f[]\fR(1ntpdmdoc)\f[] -David L. Mills, -\fINetwork Time Protocol (Version 3)\fR, -RFC1305 -.PP - +#! /bin/cat .SH AUTHORS -The formatting directives in this document came from FreeBSD. +#! /bin/cat .SH "COPYRIGHT" Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, . .SH BUGS -The -\f\*[B-Font]ntpdc\fP -utility is a crude hack. -Much of the information it shows is -deadly boring and could only be loved by its implementer. -The -program was designed so that new (and temporary) features were easy -to hack in, at great expense to the program's ease of use. -Despite -this, the program is occasionally useful. -.sp \n(Ppu -.ne 2 - -Please report bugs to http://bugs.ntp.org . +#! /bin/cat .sp \n(Ppu .ne 2 diff --git a/ntpdc/ntpdc.1ntpdcmdoc b/ntpdc/ntpdc.1ntpdcmdoc index 59bd61373..4aec18a87 100644 --- a/ntpdc/ntpdc.1ntpdcmdoc +++ b/ntpdc/ntpdc.1ntpdcmdoc @@ -1,9 +1,9 @@ -.Dd June 23 2020 +.Dd June 26 2022 .Dt NTPDC 1ntpdcmdoc User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc) .\" -.\" It has been AutoGen-ed June 23, 2020 at 02:20:44 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 26, 2022 at 05:34:07 AM by AutoGen 5.18.5 .\" From the definitions ntpdc-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -18,30 +18,7 @@ [ host ...] .Pp .Sh DESCRIPTION -.Nm -is deprecated. -Please use -.Xr ntpq 1ntpqmdoc instead \- it can do everything -.Nm -used to do, and it does so using a much more sane interface. -.Pp -.Nm -is a utility program used to query -.Xr ntpd 1ntpdmdoc -about its -current state and to request changes in that state. -It uses NTP mode 7 control message formats described in the source code. -The program may -be run either in interactive mode or controlled using command line -arguments. -Extensive state and statistics information is available -through the -.Nm -interface. -In addition, nearly all the -configuration options which can be specified at startup using -ntpd's configuration file may also be specified at run time using -.Nm . +#! /bin/cat .Sh "OPTIONS" .Bl -tag .It Fl 4 , Fl \-ipv4 @@ -139,626 +116,7 @@ The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". If any of these are directories, then the file \fI.ntprc\fP is searched for within those directories. .Sh USAGE -If one or more request options are included on the command line -when -.Nm -is executed, each of the requests will be sent -to the NTP servers running on each of the hosts given as command -line arguments, or on localhost by default. -If no request options -are given, -.Nm -will attempt to read commands from the -standard input and execute these on the NTP server running on the -first host given on the command line, again defaulting to localhost -when no other host is specified. -The -.Nm -utility will prompt for -commands if the standard input is a terminal device. -.Pp -The -.Nm -utility uses NTP mode 7 packets to communicate with the -NTP server, and hence can be used to query any compatible server on -the network which permits it. -Note that since NTP is a UDP protocol -this communication will be somewhat unreliable, especially over -large distances in terms of network topology. -The -.Nm -utility makes -no attempt to retransmit requests, and will time requests out if -the remote host is not heard from within a suitable timeout -time. -.Pp -The operation of -.Nm -are specific to the particular -implementation of the -.Xr ntpd 1ntpdmdoc -daemon and can be expected to -work only with this and maybe some previous versions of the daemon. -Requests from a remote -.Nm -utility which affect the -state of the local server must be authenticated, which requires -both the remote program and local server share a common key and key -identifier. -.Pp -Note that in contexts where a host name is expected, a -.Fl 4 -qualifier preceding the host name forces DNS resolution to the IPv4 namespace, -while a -.Fl 6 -qualifier forces DNS resolution to the IPv6 namespace. -Specifying a command line option other than -.Fl i -or -.Fl n -will cause the specified query (queries) to be sent to -the indicated host(s) immediately. -Otherwise, -.Nm -will -attempt to read interactive format commands from the standard -input. -.Ss "Interactive Commands" -Interactive format commands consist of a keyword followed by zero -to four arguments. -Only enough characters of the full keyword to -uniquely identify the command need be typed. -The output of a -command is normally sent to the standard output, but optionally the -output of individual commands may be sent to a file by appending a -.Ql \&> , -followed by a file name, to the command line. -.Pp -A number of interactive format commands are executed entirely -within the -.Nm -utility itself and do not result in NTP -mode 7 requests being sent to a server. -These are described -following. -.Bl -tag -width indent -.It Ic \&? Ar command_keyword -.It Ic help Ar command_keyword -A -.Sq Ic \&? -will print a list of all the command -keywords known to this incarnation of -.Nm . -A -.Sq Ic \&? -followed by a command keyword will print function and usage -information about the command. -This command is probably a better -source of information about -.Xr ntpq 1ntpqmdoc -than this manual -page. -.It Ic delay Ar milliseconds -Specify a time interval to be added to timestamps included in -requests which require authentication. -This is used to enable -(unreliable) server reconfiguration over long delay network paths -or between machines whose clocks are unsynchronized. -Actually the -server does not now require timestamps in authenticated requests, -so this command may be obsolete. -.It Ic host Ar hostname -Set the host to which future queries will be sent. -Hostname may -be either a host name or a numeric address. -.It Ic hostnames Op Cm yes | Cm no -If -.Cm yes -is specified, host names are printed in -information displays. -If -.Cm no -is specified, numeric -addresses are printed instead. -The default is -.Cm yes , -unless -modified using the command line -.Fl n -switch. -.It Ic keyid Ar keyid -This command allows the specification of a key number to be -used to authenticate configuration requests. -This must correspond -to a key number the server has been configured to use for this -purpose. -.It Ic quit -Exit -.Nm . -.It Ic passwd -This command prompts you to type in a password (which will not -be echoed) which will be used to authenticate configuration -requests. -The password must correspond to the key configured for -use by the NTP server for this purpose if such requests are to be -successful. -.It Ic timeout Ar milliseconds -Specify a timeout period for responses to server queries. -The -default is about 8000 milliseconds. -Note that since -.Nm -retries each query once after a timeout, the total waiting time for -a timeout will be twice the timeout value set. -.El -.Ss "Control Message Commands" -Query commands result in NTP mode 7 packets containing requests for -information being sent to the server. -These are read\-only commands -in that they make no modification of the server configuration -state. -.Bl -tag -width indent -.It Ic listpeers -Obtains and prints a brief list of the peers for which the -server is maintaining state. -These should include all configured -peer associations as well as those peers whose stratum is such that -they are considered by the server to be possible future -synchronization candidates. -.It Ic peers -Obtains a list of peers for which the server is maintaining -state, along with a summary of that state. -Summary information -includes the address of the remote peer, the local interface -address (0.0.0.0 if a local address has yet to be determined), the -stratum of the remote peer (a stratum of 16 indicates the remote -peer is unsynchronized), the polling interval, in seconds, the -reachability register, in octal, and the current estimated delay, -offset and dispersion of the peer, all in seconds. -.Pp -The character in the left margin indicates the mode this peer -entry is operating in. -A -.Ql \&+ -denotes symmetric active, a -.Ql \&\- -indicates symmetric passive, a -.Ql \&= -means the -remote server is being polled in client mode, a -.Ql \&^ -indicates that the server is broadcasting to this address, a -.Ql \&~ -denotes that the remote peer is sending broadcasts and a -.Ql \&~ -denotes that the remote peer is sending broadcasts and a -.Ql \&* -marks the peer the server is currently synchronizing -to. -.Pp -The contents of the host field may be one of four forms. -It may -be a host name, an IP address, a reference clock implementation -name with its parameter or -.Fn REFCLK "implementation_number" "parameter" . -On -.Ic hostnames -.Cm no -only IP\-addresses -will be displayed. -.It Ic dmpeers -A slightly different peer summary list. -Identical to the output -of the -.Ic peers -command, except for the character in the -leftmost column. -Characters only appear beside peers which were -included in the final stage of the clock selection algorithm. -A -.Ql \&. -indicates that this peer was cast off in the falseticker -detection, while a -.Ql \&+ -indicates that the peer made it -through. -A -.Ql \&* -denotes the peer the server is currently -synchronizing with. -.It Ic showpeer Ar peer_address Oo Ar ... Oc -Shows a detailed display of the current peer variables for one -or more peers. -Most of these values are described in the NTP -Version 2 specification. -.It Ic pstats Ar peer_address Oo Ar ... Oc -Show per\-peer statistic counters associated with the specified -peer(s). -.It Ic clockstat Ar clock_peer_address Oo Ar ... Oc -Obtain and print information concerning a peer clock. -The -values obtained provide information on the setting of fudge factors -and other clock performance information. -.It Ic kerninfo -Obtain and print kernel phase\-lock loop operating parameters. -This information is available only if the kernel has been specially -modified for a precision timekeeping function. -.It Ic loopinfo Op Cm oneline | Cm multiline -Print the values of selected loop filter variables. -The loop -filter is the part of NTP which deals with adjusting the local -system clock. -The -.Sq offset -is the last offset given to the -loop filter by the packet processing code. -The -.Sq frequency -is the frequency error of the local clock in parts\-per\-million -(ppm). -The -.Sq time_const -controls the stiffness of the -phase\-lock loop and thus the speed at which it can adapt to -oscillator drift. -The -.Sq watchdog timer -value is the number -of seconds which have elapsed since the last sample offset was -given to the loop filter. -The -.Cm oneline -and -.Cm multiline -options specify the format in which this -information is to be printed, with -.Cm multiline -as the -default. -.It Ic sysinfo -Print a variety of system state variables, i.e., state related -to the local server. -All except the last four lines are described -in the NTP Version 3 specification, RFC\-1305. -.Pp -The -.Sq system flags -show various system flags, some of -which can be set and cleared by the -.Ic enable -and -.Ic disable -configuration commands, respectively. -These are -the -.Cm auth , -.Cm bclient , -.Cm monitor , -.Cm pll , -.Cm pps -and -.Cm stats -flags. -See the -.Xr ntpd 1ntpdmdoc -documentation for the meaning of these flags. -There -are two additional flags which are read only, the -.Cm kernel_pll -and -.Cm kernel_pps . -These flags indicate -the synchronization status when the precision time kernel -modifications are in use. -The -.Sq kernel_pll -indicates that -the local clock is being disciplined by the kernel, while the -.Sq kernel_pps -indicates the kernel discipline is provided by the PPS -signal. -.Pp -The -.Sq stability -is the residual frequency error remaining -after the system frequency correction is applied and is intended for -maintenance and debugging. -In most architectures, this value will -initially decrease from as high as 500 ppm to a nominal value in -the range .01 to 0.1 ppm. -If it remains high for some time after -starting the daemon, something may be wrong with the local clock, -or the value of the kernel variable -.Va kern.clockrate.tick -may be -incorrect. -.Pp -The -.Sq broadcastdelay -shows the default broadcast delay, -as set by the -.Ic broadcastdelay -configuration command. -.Pp -The -.Sq authdelay -shows the default authentication delay, -as set by the -.Ic authdelay -configuration command. -.It Ic sysstats -Print statistics counters maintained in the protocol -module. -.It Ic memstats -Print statistics counters related to memory allocation -code. -.It Ic iostats -Print statistics counters maintained in the input\-output -module. -.It Ic timerstats -Print statistics counters maintained in the timer/event queue -support code. -.It Ic reslist -Obtain and print the server's restriction list. -This list is -(usually) printed in sorted order and may help to understand how -the restrictions are applied. -.It Ic monlist Op Ar version -Obtain and print traffic counts collected and maintained by the -monitor facility. -The version number should not normally need to be -specified. -.It Ic clkbug Ar clock_peer_address Oo Ar ... Oc -Obtain debugging information for a reference clock driver. -This -information is provided only by some clock drivers and is mostly -undecodable without a copy of the driver source in hand. -.El -.Ss "Runtime Configuration Requests" -All requests which cause state changes in the server are -authenticated by the server using a configured NTP key (the -facility can also be disabled by the server by not configuring a -key). -The key number and the corresponding key must also be made -known to -.Nm . -This can be done using the -.Ic keyid -and -.Ic passwd -commands, the latter of which will prompt at the terminal for a -password to use as the encryption key. -You will also be prompted -automatically for both the key number and password the first time a -command which would result in an authenticated request to the -server is given. -Authentication not only provides verification that -the requester has permission to make such changes, but also gives -an extra degree of protection again transmission errors. -.Pp -Authenticated requests always include a timestamp in the packet -data, which is included in the computation of the authentication -code. -This timestamp is compared by the server to its receive time -stamp. -If they differ by more than a small amount the request is -rejected. -This is done for two reasons. -First, it makes simple -replay attacks on the server, by someone who might be able to -overhear traffic on your LAN, much more difficult. -Second, it makes -it more difficult to request configuration changes to your server -from topologically remote hosts. -While the reconfiguration facility -will work well with a server on the local host, and may work -adequately between time\-synchronized hosts on the same LAN, it will -work very poorly for more distant hosts. -As such, if reasonable -passwords are chosen, care is taken in the distribution and -protection of keys and appropriate source address restrictions are -applied, the run time reconfiguration facility should provide an -adequate level of security. -.Pp -The following commands all make authenticated requests. -.Bl -tag -width indent -.It Xo Ic addpeer Ar peer_address -.Op Ar keyid -.Op Ar version -.Op Cm prefer -.Xc -Add a configured peer association at the given address and -operating in symmetric active mode. -Note that an existing -association with the same peer may be deleted when this command is -executed, or may simply be converted to conform to the new -configuration, as appropriate. -If the optional -.Ar keyid -is a -nonzero integer, all outgoing packets to the remote server will -have an authentication field attached encrypted with this key. -If -the value is 0 (or not given) no authentication will be done. -The -.Ar version -can be 1, 2 or 3 and defaults to 3. -The -.Cm prefer -keyword indicates a preferred peer (and thus will -be used primarily for clock synchronisation if possible). -The -preferred peer also determines the validity of the PPS signal \- if -the preferred peer is suitable for synchronisation so is the PPS -signal. -.It Xo Ic addserver Ar peer_address -.Op Ar keyid -.Op Ar version -.Op Cm prefer -.Xc -Identical to the addpeer command, except that the operating -mode is client. -.It Xo Ic broadcast Ar peer_address -.Op Ar keyid -.Op Ar version -.Op Cm prefer -.Xc -Identical to the addpeer command, except that the operating -mode is broadcast. -In this case a valid key identifier and key are -required. -The -.Ar peer_address -parameter can be the broadcast -address of the local network or a multicast group address assigned -to NTP. -If a multicast address, a multicast\-capable kernel is -required. -.It Ic unconfig Ar peer_address Oo Ar ... Oc -This command causes the configured bit to be removed from the -specified peer(s). -In many cases this will cause the peer -association to be deleted. -When appropriate, however, the -association may persist in an unconfigured mode if the remote peer -is willing to continue on in this fashion. -.It Xo Ic fudge Ar peer_address -.Op Cm time1 -.Op Cm time2 -.Op Ar stratum -.Op Ar refid -.Xc -This command provides a way to set certain data for a reference -clock. -See the source listing for further information. -.It Xo Ic enable -.Oo -.Cm auth | Cm bclient | -.Cm calibrate | Cm kernel | -.Cm monitor | Cm ntp | -.Cm pps | Cm stats -.Oc -.Xc -.It Xo Ic disable -.Oo -.Cm auth | Cm bclient | -.Cm calibrate | Cm kernel | -.Cm monitor | Cm ntp | -.Cm pps | Cm stats -.Oc -.Xc -These commands operate in the same way as the -.Ic enable -and -.Ic disable -configuration file commands of -.Xr ntpd 1ntpdmdoc . -.Bl -tag -width indent -.It Cm auth -Enables the server to synchronize with unconfigured peers only -if the peer has been correctly authenticated using either public key -or private key cryptography. -The default for this flag is enable. -.It Cm bclient -Enables the server to listen for a message from a broadcast or -multicast server, as in the multicastclient command with -default address. -The default for this flag is disable. -.It Cm calibrate -Enables the calibrate feature for reference clocks. -The default for this flag is disable. -.It Cm kernel -Enables the kernel time discipline, if available. -The default for this flag is enable if support is available, otherwise disable. -.It Cm monitor -Enables the monitoring facility. -See the documentation here about the -.Cm monlist -command or further information. -The default for this flag is enable. -.It Cm ntp -Enables time and frequency discipline. -In effect, this switch opens and closes the feedback loop, -which is useful for testing. -The default for this flag is enable. -.It Cm pps -Enables the pulse\-per\-second (PPS) signal when frequency -and time is disciplined by the precision time kernel modifications. -See the -.Qq A Kernel Model for Precision Timekeeping -(available as part of the HTML documentation -provided in -.Pa /usr/share/doc/ntp ) -page for further information. -The default for this flag is disable. -.It Cm stats -Enables the statistics facility. -See the -.Sx Monitoring Options -section of -.Xr ntp.conf 5 -for further information. -The default for this flag is disable. -.El -.It Xo Ic restrict Ar address Ar mask -.Ar flag Oo Ar ... Oc -.Xc -This command operates in the same way as the -.Ic restrict -configuration file commands of -.Xr ntpd 1ntpdmdoc . -.It Xo Ic unrestrict Ar address Ar mask -.Ar flag Oo Ar ... Oc -.Xc -Unrestrict the matching entry from the restrict list. -.It Xo Ic delrestrict Ar address Ar mask -.Op Cm ntpport -.Xc -Delete the matching entry from the restrict list. -.It Ic readkeys -Causes the current set of authentication keys to be purged and -a new set to be obtained by rereading the keys file (which must -have been specified in the -.Xr ntpd 1ntpdmdoc -configuration file). -This -allows encryption keys to be changed without restarting the -server. -.It Ic trustedkey Ar keyid Oo Ar ... Oc -.It Ic untrustedkey Ar keyid Oo Ar ... Oc -These commands operate in the same way as the -.Ic trustedkey -and -.Ic untrustedkey -configuration file -commands of -.Xr ntpd 1ntpdmdoc . -.It Ic authinfo -Returns information concerning the authentication module, -including known keys and counts of encryptions and decryptions -which have been done. -.It Ic traps -Display the traps set in the server. -See the source listing for -further information. -.It Xo Ic addtrap Ar address -.Op Ar port -.Op Ar interface -.Xc -Set a trap for asynchronous messages. -See the source listing -for further information. -.It Xo Ic clrtrap Ar address -.Op Ar port -.Op Ar interface -.Xc -Clear a trap for asynchronous messages. -See the source listing -for further information. -.It Ic reset -Clear the statistics counters in various modules of the server. -See the source listing for further information. -.El +#! /bin/cat .Sh "ENVIRONMENT" See \fBOPTION PRESETS\fP for configuration environment variables. .Sh "FILES" @@ -777,31 +135,14 @@ libopts had an internal operational error. Please report it to autogen\-users@lists.sourceforge.net. Thank you. .El .Sh "SEE ALSO" -.Xr ntp.conf 5 , -.Xr ntpd 1ntpdmdoc -.Rs -.%A David L. Mills -.%T Network Time Protocol (Version 3) -.%O RFC1305 -.Re +#! /bin/cat .Sh AUTHORS -The formatting directives in this document came from FreeBSD. +#! /bin/cat .Sh "COPYRIGHT" Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, . .Sh BUGS -The -.Nm -utility is a crude hack. -Much of the information it shows is -deadly boring and could only be loved by its implementer. -The -program was designed so that new (and temporary) features were easy -to hack in, at great expense to the program's ease of use. -Despite -this, the program is occasionally useful. -.Pp -Please report bugs to http://bugs.ntp.org . +#! /bin/cat .Pp Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .Sh "NOTES" diff --git a/ntpdc/ntpdc.man.in b/ntpdc/ntpdc.man.in index 43b9138b7..edacdc31c 100644 --- a/ntpdc/ntpdc.man.in +++ b/ntpdc/ntpdc.man.in @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpdc @NTPDC_MS@ "23 Jun 2020" "4.2.8p15" "User Commands" +.TH ntpdc @NTPDC_MS@ "26 Jun 2022" "4.2.8p15" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 23, 2020 at 02:20:47 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 26, 2022 at 05:34:10 AM by AutoGen 5.18.5 .\" From the definitions ntpdc-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -31,32 +31,7 @@ .ne 2 .SH DESCRIPTION -\f\*[B-Font]ntpdc\fP -is deprecated. -Please use -\fCntpq\f[]\fR(@NTPQ_MS@)\f[] instead \- it can do everything -\f\*[B-Font]ntpdc\fP -used to do, and it does so using a much more sane interface. -.sp \n(Ppu -.ne 2 - -\f\*[B-Font]ntpdc\fP -is a utility program used to query -\fCntpd\f[]\fR(@NTPD_MS@)\f[] -about its -current state and to request changes in that state. -It uses NTP mode 7 control message formats described in the source code. -The program may -be run either in interactive mode or controlled using command line -arguments. -Extensive state and statistics information is available -through the -\f\*[B-Font]ntpdc\fP -interface. -In addition, nearly all the -configuration options which can be specified at startup using -ntpd's configuration file may also be specified at run time using -\f\*[B-Font]ntpdc\fP. +#! /bin/cat .SH "OPTIONS" .TP .NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[] @@ -168,655 +143,7 @@ The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". If any of these are directories, then the file \fI.ntprc\fP is searched for within those directories. .SH USAGE -If one or more request options are included on the command line -when -\f\*[B-Font]ntpdc\fP -is executed, each of the requests will be sent -to the NTP servers running on each of the hosts given as command -line arguments, or on localhost by default. -If no request options -are given, -\f\*[B-Font]ntpdc\fP -will attempt to read commands from the -standard input and execute these on the NTP server running on the -first host given on the command line, again defaulting to localhost -when no other host is specified. -The -\f\*[B-Font]ntpdc\fP -utility will prompt for -commands if the standard input is a terminal device. -.sp \n(Ppu -.ne 2 - -The -\f\*[B-Font]ntpdc\fP -utility uses NTP mode 7 packets to communicate with the -NTP server, and hence can be used to query any compatible server on -the network which permits it. -Note that since NTP is a UDP protocol -this communication will be somewhat unreliable, especially over -large distances in terms of network topology. -The -\f\*[B-Font]ntpdc\fP -utility makes -no attempt to retransmit requests, and will time requests out if -the remote host is not heard from within a suitable timeout -time. -.sp \n(Ppu -.ne 2 - -The operation of -\f\*[B-Font]ntpdc\fP -are specific to the particular -implementation of the -\fCntpd\f[]\fR(@NTPD_MS@)\f[] -daemon and can be expected to -work only with this and maybe some previous versions of the daemon. -Requests from a remote -\f\*[B-Font]ntpdc\fP -utility which affect the -state of the local server must be authenticated, which requires -both the remote program and local server share a common key and key -identifier. -.sp \n(Ppu -.ne 2 - -Note that in contexts where a host name is expected, a -\f\*[B-Font]\-4\f[] -qualifier preceding the host name forces DNS resolution to the IPv4 namespace, -while a -\f\*[B-Font]\-6\f[] -qualifier forces DNS resolution to the IPv6 namespace. -Specifying a command line option other than -\f\*[B-Font]\-i\f[] -or -\f\*[B-Font]\-n\f[] -will cause the specified query (queries) to be sent to -the indicated host(s) immediately. -Otherwise, -\f\*[B-Font]ntpdc\fP -will -attempt to read interactive format commands from the standard -input. -.SS "Interactive Commands" -Interactive format commands consist of a keyword followed by zero -to four arguments. -Only enough characters of the full keyword to -uniquely identify the command need be typed. -The output of a -command is normally sent to the standard output, but optionally the -output of individual commands may be sent to a file by appending a -\[oq]\&>\[cq], -followed by a file name, to the command line. -.sp \n(Ppu -.ne 2 - -A number of interactive format commands are executed entirely -within the -\f\*[B-Font]ntpdc\fP -utility itself and do not result in NTP -mode 7 requests being sent to a server. -These are described -following. -.TP 7 -.NOP \f\*[B-Font]\&?\f[] \f\*[I-Font]command_keyword\f[] -.TP 7 -.NOP \f\*[B-Font]help\f[] \f\*[I-Font]command_keyword\f[] -A -\[oq]\f\*[B-Font]\&?\f[]\[cq] -will print a list of all the command -keywords known to this incarnation of -\f\*[B-Font]ntpdc\fP. -A -\[oq]\f\*[B-Font]\&?\f[]\[cq] -followed by a command keyword will print function and usage -information about the command. -This command is probably a better -source of information about -\fCntpq\f[]\fR(@NTPQ_MS@)\f[] -than this manual -page. -.TP 7 -.NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[] -Specify a time interval to be added to timestamps included in -requests which require authentication. -This is used to enable -(unreliable) server reconfiguration over long delay network paths -or between machines whose clocks are unsynchronized. -Actually the -server does not now require timestamps in authenticated requests, -so this command may be obsolete. -.TP 7 -.NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[] -Set the host to which future queries will be sent. -Hostname may -be either a host name or a numeric address. -.TP 7 -.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]] -If -\f\*[B-Font]yes\f[] -is specified, host names are printed in -information displays. -If -\f\*[B-Font]no\f[] -is specified, numeric -addresses are printed instead. -The default is -\f\*[B-Font]yes\f[], -unless -modified using the command line -\f\*[B-Font]\-n\f[] -switch. -.TP 7 -.NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[] -This command allows the specification of a key number to be -used to authenticate configuration requests. -This must correspond -to a key number the server has been configured to use for this -purpose. -.TP 7 -.NOP \f\*[B-Font]quit\f[] -Exit -\f\*[B-Font]ntpdc\fP. -.TP 7 -.NOP \f\*[B-Font]passwd\f[] -This command prompts you to type in a password (which will not -be echoed) which will be used to authenticate configuration -requests. -The password must correspond to the key configured for -use by the NTP server for this purpose if such requests are to be -successful. -.TP 7 -.NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[] -Specify a timeout period for responses to server queries. -The -default is about 8000 milliseconds. -Note that since -\f\*[B-Font]ntpdc\fP -retries each query once after a timeout, the total waiting time for -a timeout will be twice the timeout value set. -.PP -.SS "Control Message Commands" -Query commands result in NTP mode 7 packets containing requests for -information being sent to the server. -These are read-only commands -in that they make no modification of the server configuration -state. -.TP 7 -.NOP \f\*[B-Font]listpeers\f[] -Obtains and prints a brief list of the peers for which the -server is maintaining state. -These should include all configured -peer associations as well as those peers whose stratum is such that -they are considered by the server to be possible future -synchronization candidates. -.TP 7 -.NOP \f\*[B-Font]peers\f[] -Obtains a list of peers for which the server is maintaining -state, along with a summary of that state. -Summary information -includes the address of the remote peer, the local interface -address (0.0.0.0 if a local address has yet to be determined), the -stratum of the remote peer (a stratum of 16 indicates the remote -peer is unsynchronized), the polling interval, in seconds, the -reachability register, in octal, and the current estimated delay, -offset and dispersion of the peer, all in seconds. -.sp \n(Ppu -.ne 2 - -The character in the left margin indicates the mode this peer -entry is operating in. -A -\[oq]\&+\[cq] -denotes symmetric active, a -\[oq]\&-\[cq] -indicates symmetric passive, a -\[oq]\&=\[cq] -means the -remote server is being polled in client mode, a -\[oq]\&^\[cq] -indicates that the server is broadcasting to this address, a -\[oq]\&~\[cq] -denotes that the remote peer is sending broadcasts and a -\[oq]\&~\[cq] -denotes that the remote peer is sending broadcasts and a -\[oq]\&*\[cq] -marks the peer the server is currently synchronizing -to. -.sp \n(Ppu -.ne 2 - -The contents of the host field may be one of four forms. -It may -be a host name, an IP address, a reference clock implementation -name with its parameter or -\fBREFCLK\f[]\fR()\f[] -On -\f\*[B-Font]hostnames\f[] -\f\*[B-Font]no\f[] -only IP-addresses -will be displayed. -.TP 7 -.NOP \f\*[B-Font]dmpeers\f[] -A slightly different peer summary list. -Identical to the output -of the -\f\*[B-Font]peers\f[] -command, except for the character in the -leftmost column. -Characters only appear beside peers which were -included in the final stage of the clock selection algorithm. -A -\[oq]\&.\[cq] -indicates that this peer was cast off in the falseticker -detection, while a -\[oq]\&+\[cq] -indicates that the peer made it -through. -A -\[oq]\&*\[cq] -denotes the peer the server is currently -synchronizing with. -.TP 7 -.NOP \f\*[B-Font]showpeer\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]] -Shows a detailed display of the current peer variables for one -or more peers. -Most of these values are described in the NTP -Version 2 specification. -.TP 7 -.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]] -Show per-peer statistic counters associated with the specified -peer(s). -.TP 7 -.NOP \f\*[B-Font]clockstat\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]] -Obtain and print information concerning a peer clock. -The -values obtained provide information on the setting of fudge factors -and other clock performance information. -.TP 7 -.NOP \f\*[B-Font]kerninfo\f[] -Obtain and print kernel phase-lock loop operating parameters. -This information is available only if the kernel has been specially -modified for a precision timekeeping function. -.TP 7 -.NOP \f\*[B-Font]loopinfo\f[] [\f\*[B-Font]oneline\f[] | \f\*[B-Font]multiline\f[]] -Print the values of selected loop filter variables. -The loop -filter is the part of NTP which deals with adjusting the local -system clock. -The -\[oq]offset\[cq] -is the last offset given to the -loop filter by the packet processing code. -The -\[oq]frequency\[cq] -is the frequency error of the local clock in parts-per-million -(ppm). -The -\[oq]time_const\[cq] -controls the stiffness of the -phase-lock loop and thus the speed at which it can adapt to -oscillator drift. -The -\[oq]watchdog timer\[cq] -value is the number -of seconds which have elapsed since the last sample offset was -given to the loop filter. -The -\f\*[B-Font]oneline\f[] -and -\f\*[B-Font]multiline\f[] -options specify the format in which this -information is to be printed, with -\f\*[B-Font]multiline\f[] -as the -default. -.TP 7 -.NOP \f\*[B-Font]sysinfo\f[] -Print a variety of system state variables, i.e., state related -to the local server. -All except the last four lines are described -in the NTP Version 3 specification, RFC-1305. -.sp \n(Ppu -.ne 2 - -The -\[oq]system flags\[cq] -show various system flags, some of -which can be set and cleared by the -\f\*[B-Font]enable\f[] -and -\f\*[B-Font]disable\f[] -configuration commands, respectively. -These are -the -\f\*[B-Font]auth\f[], -\f\*[B-Font]bclient\f[], -\f\*[B-Font]monitor\f[], -\f\*[B-Font]pll\f[], -\f\*[B-Font]pps\f[] -and -\f\*[B-Font]stats\f[] -flags. -See the -\fCntpd\f[]\fR(@NTPD_MS@)\f[] -documentation for the meaning of these flags. -There -are two additional flags which are read only, the -\f\*[B-Font]kernel_pll\f[] -and -\f\*[B-Font]kernel_pps\f[]. -These flags indicate -the synchronization status when the precision time kernel -modifications are in use. -The -\[oq]kernel_pll\[cq] -indicates that -the local clock is being disciplined by the kernel, while the -\[oq]kernel_pps\[cq] -indicates the kernel discipline is provided by the PPS -signal. -.sp \n(Ppu -.ne 2 - -The -\[oq]stability\[cq] -is the residual frequency error remaining -after the system frequency correction is applied and is intended for -maintenance and debugging. -In most architectures, this value will -initially decrease from as high as 500 ppm to a nominal value in -the range .01 to 0.1 ppm. -If it remains high for some time after -starting the daemon, something may be wrong with the local clock, -or the value of the kernel variable -\fIkern.clockrate.tick\f[] -may be -incorrect. -.sp \n(Ppu -.ne 2 - -The -\[oq]broadcastdelay\[cq] -shows the default broadcast delay, -as set by the -\f\*[B-Font]broadcastdelay\f[] -configuration command. -.sp \n(Ppu -.ne 2 - -The -\[oq]authdelay\[cq] -shows the default authentication delay, -as set by the -\f\*[B-Font]authdelay\f[] -configuration command. -.TP 7 -.NOP \f\*[B-Font]sysstats\f[] -Print statistics counters maintained in the protocol -module. -.TP 7 -.NOP \f\*[B-Font]memstats\f[] -Print statistics counters related to memory allocation -code. -.TP 7 -.NOP \f\*[B-Font]iostats\f[] -Print statistics counters maintained in the input-output -module. -.TP 7 -.NOP \f\*[B-Font]timerstats\f[] -Print statistics counters maintained in the timer/event queue -support code. -.TP 7 -.NOP \f\*[B-Font]reslist\f[] -Obtain and print the server's restriction list. -This list is -(usually) printed in sorted order and may help to understand how -the restrictions are applied. -.TP 7 -.NOP \f\*[B-Font]monlist\f[] [\f\*[I-Font]version\f[]] -Obtain and print traffic counts collected and maintained by the -monitor facility. -The version number should not normally need to be -specified. -.TP 7 -.NOP \f\*[B-Font]clkbug\f[] \f\*[I-Font]clock_peer_address\f[] [\f\*[I-Font]...\f[]] -Obtain debugging information for a reference clock driver. -This -information is provided only by some clock drivers and is mostly -undecodable without a copy of the driver source in hand. -.PP -.SS "Runtime Configuration Requests" -All requests which cause state changes in the server are -authenticated by the server using a configured NTP key (the -facility can also be disabled by the server by not configuring a -key). -The key number and the corresponding key must also be made -known to -\f\*[B-Font]ntpdc\fP. -This can be done using the -\f\*[B-Font]keyid\f[] -and -\f\*[B-Font]passwd\f[] -commands, the latter of which will prompt at the terminal for a -password to use as the encryption key. -You will also be prompted -automatically for both the key number and password the first time a -command which would result in an authenticated request to the -server is given. -Authentication not only provides verification that -the requester has permission to make such changes, but also gives -an extra degree of protection again transmission errors. -.sp \n(Ppu -.ne 2 - -Authenticated requests always include a timestamp in the packet -data, which is included in the computation of the authentication -code. -This timestamp is compared by the server to its receive time -stamp. -If they differ by more than a small amount the request is -rejected. -This is done for two reasons. -First, it makes simple -replay attacks on the server, by someone who might be able to -overhear traffic on your LAN, much more difficult. -Second, it makes -it more difficult to request configuration changes to your server -from topologically remote hosts. -While the reconfiguration facility -will work well with a server on the local host, and may work -adequately between time-synchronized hosts on the same LAN, it will -work very poorly for more distant hosts. -As such, if reasonable -passwords are chosen, care is taken in the distribution and -protection of keys and appropriate source address restrictions are -applied, the run time reconfiguration facility should provide an -adequate level of security. -.sp \n(Ppu -.ne 2 - -The following commands all make authenticated requests. -.TP 7 -.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[]] -Add a configured peer association at the given address and -operating in symmetric active mode. -Note that an existing -association with the same peer may be deleted when this command is -executed, or may simply be converted to conform to the new -configuration, as appropriate. -If the optional -\f\*[I-Font]keyid\f[] -is a -nonzero integer, all outgoing packets to the remote server will -have an authentication field attached encrypted with this key. -If -the value is 0 (or not given) no authentication will be done. -The -\f\*[I-Font]version\f[] -can be 1, 2 or 3 and defaults to 3. -The -\f\*[B-Font]prefer\f[] -keyword indicates a preferred peer (and thus will -be used primarily for clock synchronisation if possible). -The -preferred peer also determines the validity of the PPS signal \- if -the preferred peer is suitable for synchronisation so is the PPS -signal. -.TP 7 -.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[]] -Identical to the addpeer command, except that the operating -mode is client. -.TP 7 -.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[]] -Identical to the addpeer command, except that the operating -mode is broadcast. -In this case a valid key identifier and key are -required. -The -\f\*[I-Font]peer_address\f[] -parameter can be the broadcast -address of the local network or a multicast group address assigned -to NTP. -If a multicast address, a multicast-capable kernel is -required. -.TP 7 -.NOP \f\*[B-Font]unconfig\f[] \f\*[I-Font]peer_address\f[] [\f\*[I-Font]...\f[]] -This command causes the configured bit to be removed from the -specified peer(s). -In many cases this will cause the peer -association to be deleted. -When appropriate, however, the -association may persist in an unconfigured mode if the remote peer -is willing to continue on in this fashion. -.TP 7 -.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[]] -This command provides a way to set certain data for a reference -clock. -See the source listing for further information. -.TP 7 -.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[]] -.TP 7 -.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[]] -These commands operate in the same way as the -\f\*[B-Font]enable\f[] -and -\f\*[B-Font]disable\f[] -configuration file commands of -\fCntpd\f[]\fR(@NTPD_MS@)\f[]. -.RS -.TP 7 -.NOP \f\*[B-Font]auth\f[] -Enables the server to synchronize with unconfigured peers only -if the peer has been correctly authenticated using either public key -or private key cryptography. -The default for this flag is enable. -.TP 7 -.NOP \f\*[B-Font]bclient\f[] -Enables the server to listen for a message from a broadcast or -multicast server, as in the multicastclient command with -default address. -The default for this flag is disable. -.TP 7 -.NOP \f\*[B-Font]calibrate\f[] -Enables the calibrate feature for reference clocks. -The default for this flag is disable. -.TP 7 -.NOP \f\*[B-Font]kernel\f[] -Enables the kernel time discipline, if available. -The default for this flag is enable if support is available, otherwise disable. -.TP 7 -.NOP \f\*[B-Font]monitor\f[] -Enables the monitoring facility. -See the documentation here about the -\f\*[B-Font]monlist\f[] -command or further information. -The default for this flag is enable. -.TP 7 -.NOP \f\*[B-Font]ntp\f[] -Enables time and frequency discipline. -In effect, this switch opens and closes the feedback loop, -which is useful for testing. -The default for this flag is enable. -.TP 7 -.NOP \f\*[B-Font]pps\f[] -Enables the pulse-per-second (PPS) signal when frequency -and time is disciplined by the precision time kernel modifications. -See the -"A Kernel Model for Precision Timekeeping" -(available as part of the HTML documentation -provided in -\fI/usr/share/doc/ntp\f[]) -page for further information. -The default for this flag is disable. -.TP 7 -.NOP \f\*[B-Font]stats\f[] -Enables the statistics facility. -See the -\fIMonitoring\f[] \fIOptions\f[] -section of -\fCntp.conf\f[]\fR(5)\f[] -for further information. -The default for this flag is disable. -.RE -.TP 7 -.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[]] -This command operates in the same way as the -\f\*[B-Font]restrict\f[] -configuration file commands of -\fCntpd\f[]\fR(@NTPD_MS@)\f[]. -.TP 7 -.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[]] -Unrestrict the matching entry from the restrict list. -.TP 7 -.NOP \f\*[B-Font]delrestrict\f[] \f\*[I-Font]address\f[] \f\*[I-Font]mask\f[] [\f\*[B-Font]ntpport\f[]] -Delete the matching entry from the restrict list. -.TP 7 -.NOP \f\*[B-Font]readkeys\f[] -Causes the current set of authentication keys to be purged and -a new set to be obtained by rereading the keys file (which must -have been specified in the -\fCntpd\f[]\fR(@NTPD_MS@)\f[] -configuration file). -This -allows encryption keys to be changed without restarting the -server. -.TP 7 -.NOP \f\*[B-Font]trustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]] -.TP 7 -.NOP \f\*[B-Font]untrustedkey\f[] \f\*[I-Font]keyid\f[] [\f\*[I-Font]...\f[]] -These commands operate in the same way as the -\f\*[B-Font]trustedkey\f[] -and -\f\*[B-Font]untrustedkey\f[] -configuration file -commands of -\fCntpd\f[]\fR(@NTPD_MS@)\f[]. -.TP 7 -.NOP \f\*[B-Font]authinfo\f[] -Returns information concerning the authentication module, -including known keys and counts of encryptions and decryptions -which have been done. -.TP 7 -.NOP \f\*[B-Font]traps\f[] -Display the traps set in the server. -See the source listing for -further information. -.TP 7 -.NOP \f\*[B-Font]addtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]] -Set a trap for asynchronous messages. -See the source listing -for further information. -.TP 7 -.NOP \f\*[B-Font]clrtrap\f[] \f\*[I-Font]address\f[] [\f\*[I-Font]port\f[]] [\f\*[I-Font]interface\f[]] -Clear a trap for asynchronous messages. -See the source listing -for further information. -.TP 7 -.NOP \f\*[B-Font]reset\f[] -Clear the statistics counters in various modules of the server. -See the source listing for further information. -.PP +#! /bin/cat .SH "ENVIRONMENT" See \fBOPTION PRESETS\fP for configuration environment variables. .SH "FILES" @@ -838,33 +165,14 @@ libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you. .PP .SH "SEE ALSO" -\fCntp.conf\f[]\fR(5)\f[], -\fCntpd\f[]\fR(@NTPD_MS@)\f[] -David L. Mills, -\fINetwork Time Protocol (Version 3)\fR, -RFC1305 -.PP - +#! /bin/cat .SH AUTHORS -The formatting directives in this document came from FreeBSD. +#! /bin/cat .SH "COPYRIGHT" Copyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, . .SH BUGS -The -\f\*[B-Font]ntpdc\fP -utility is a crude hack. -Much of the information it shows is -deadly boring and could only be loved by its implementer. -The -program was designed so that new (and temporary) features were easy -to hack in, at great expense to the program's ease of use. -Despite -this, the program is occasionally useful. -.sp \n(Ppu -.ne 2 - -Please report bugs to http://bugs.ntp.org . +#! /bin/cat .sp \n(Ppu .ne 2 diff --git a/ntpdc/ntpdc.mdoc.in b/ntpdc/ntpdc.mdoc.in index 349af271d..36585a318 100644 --- a/ntpdc/ntpdc.mdoc.in +++ b/ntpdc/ntpdc.mdoc.in @@ -1,9 +1,9 @@ -.Dd June 23 2020 +.Dd June 26 2022 .Dt NTPDC @NTPDC_MS@ User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc) .\" -.\" It has been AutoGen-ed June 23, 2020 at 02:20:44 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 26, 2022 at 05:34:07 AM by AutoGen 5.18.5 .\" From the definitions ntpdc-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -18,30 +18,7 @@ [ host ...] .Pp .Sh DESCRIPTION -.Nm -is deprecated. -Please use -.Xr ntpq @NTPQ_MS@ instead \- it can do everything -.Nm -used to do, and it does so using a much more sane interface. -.Pp -.Nm -is a utility program used to query -.Xr ntpd @NTPD_MS@ -about its -current state and to request changes in that state. -It uses NTP mode 7 control message formats described in the source code. -The program may -be run either in interactive mode or controlled using command line -arguments. -Extensive state and statistics information is available -through the -.Nm -interface. -In addition, nearly all the -configuration options which can be specified at startup using -ntpd's configuration file may also be specified at run time using -.Nm . +#! /bin/cat .Sh "OPTIONS" .Bl -tag .It Fl 4 , Fl \-ipv4 @@ -139,626 +116,7 @@ The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". If any of these are directories, then the file \fI.ntprc\fP is searched for within those directories. .Sh USAGE -If one or more request options are included on the command line -when -.Nm -is executed, each of the requests will be sent -to the NTP servers running on each of the hosts given as command -line arguments, or on localhost by default. -If no request options -are given, -.Nm -will attempt to read commands from the -standard input and execute these on the NTP server running on the -first host given on the command line, again defaulting to localhost -when no other host is specified. -The -.Nm -utility will prompt for -commands if the standard input is a terminal device. -.Pp -The -.Nm -utility uses NTP mode 7 packets to communicate with the -NTP server, and hence can be used to query any compatible server on -the network which permits it. -Note that since NTP is a UDP protocol -this communication will be somewhat unreliable, especially over -large distances in terms of network topology. -The -.Nm -utility makes -no attempt to retransmit requests, and will time requests out if -the remote host is not heard from within a suitable timeout -time. -.Pp -The operation of -.Nm -are specific to the particular -implementation of the -.Xr ntpd @NTPD_MS@ -daemon and can be expected to -work only with this and maybe some previous versions of the daemon. -Requests from a remote -.Nm -utility which affect the -state of the local server must be authenticated, which requires -both the remote program and local server share a common key and key -identifier. -.Pp -Note that in contexts where a host name is expected, a -.Fl 4 -qualifier preceding the host name forces DNS resolution to the IPv4 namespace, -while a -.Fl 6 -qualifier forces DNS resolution to the IPv6 namespace. -Specifying a command line option other than -.Fl i -or -.Fl n -will cause the specified query (queries) to be sent to -the indicated host(s) immediately. -Otherwise, -.Nm -will -attempt to read interactive format commands from the standard -input. -.Ss "Interactive Commands" -Interactive format commands consist of a keyword followed by zero -to four arguments. -Only enough characters of the full keyword to -uniquely identify the command need be typed. -The output of a -command is normally sent to the standard output, but optionally the -output of individual commands may be sent to a file by appending a -.Ql \&> , -followed by a file name, to the command line. -.Pp -A number of interactive format commands are executed entirely -within the -.Nm -utility itself and do not result in NTP -mode 7 requests being sent to a server. -These are described -following. -.Bl -tag -width indent -.It Ic \&? Ar command_keyword -.It Ic help Ar command_keyword -A -.Sq Ic \&? -will print a list of all the command -keywords known to this incarnation of -.Nm . -A -.Sq Ic \&? -followed by a command keyword will print function and usage -information about the command. -This command is probably a better -source of information about -.Xr ntpq @NTPQ_MS@ -than this manual -page. -.It Ic delay Ar milliseconds -Specify a time interval to be added to timestamps included in -requests which require authentication. -This is used to enable -(unreliable) server reconfiguration over long delay network paths -or between machines whose clocks are unsynchronized. -Actually the -server does not now require timestamps in authenticated requests, -so this command may be obsolete. -.It Ic host Ar hostname -Set the host to which future queries will be sent. -Hostname may -be either a host name or a numeric address. -.It Ic hostnames Op Cm yes | Cm no -If -.Cm yes -is specified, host names are printed in -information displays. -If -.Cm no -is specified, numeric -addresses are printed instead. -The default is -.Cm yes , -unless -modified using the command line -.Fl n -switch. -.It Ic keyid Ar keyid -This command allows the specification of a key number to be -used to authenticate configuration requests. -This must correspond -to a key number the server has been configured to use for this -purpose. -.It Ic quit -Exit -.Nm . -.It Ic passwd -This command prompts you to type in a password (which will not -be echoed) which will be used to authenticate configuration -requests. -The password must correspond to the key configured for -use by the NTP server for this purpose if such requests are to be -successful. -.It Ic timeout Ar milliseconds -Specify a timeout period for responses to server queries. -The -default is about 8000 milliseconds. -Note that since -.Nm -retries each query once after a timeout, the total waiting time for -a timeout will be twice the timeout value set. -.El -.Ss "Control Message Commands" -Query commands result in NTP mode 7 packets containing requests for -information being sent to the server. -These are read\-only commands -in that they make no modification of the server configuration -state. -.Bl -tag -width indent -.It Ic listpeers -Obtains and prints a brief list of the peers for which the -server is maintaining state. -These should include all configured -peer associations as well as those peers whose stratum is such that -they are considered by the server to be possible future -synchronization candidates. -.It Ic peers -Obtains a list of peers for which the server is maintaining -state, along with a summary of that state. -Summary information -includes the address of the remote peer, the local interface -address (0.0.0.0 if a local address has yet to be determined), the -stratum of the remote peer (a stratum of 16 indicates the remote -peer is unsynchronized), the polling interval, in seconds, the -reachability register, in octal, and the current estimated delay, -offset and dispersion of the peer, all in seconds. -.Pp -The character in the left margin indicates the mode this peer -entry is operating in. -A -.Ql \&+ -denotes symmetric active, a -.Ql \&\- -indicates symmetric passive, a -.Ql \&= -means the -remote server is being polled in client mode, a -.Ql \&^ -indicates that the server is broadcasting to this address, a -.Ql \&~ -denotes that the remote peer is sending broadcasts and a -.Ql \&~ -denotes that the remote peer is sending broadcasts and a -.Ql \&* -marks the peer the server is currently synchronizing -to. -.Pp -The contents of the host field may be one of four forms. -It may -be a host name, an IP address, a reference clock implementation -name with its parameter or -.Fn REFCLK "implementation_number" "parameter" . -On -.Ic hostnames -.Cm no -only IP\-addresses -will be displayed. -.It Ic dmpeers -A slightly different peer summary list. -Identical to the output -of the -.Ic peers -command, except for the character in the -leftmost column. -Characters only appear beside peers which were -included in the final stage of the clock selection algorithm. -A -.Ql \&. -indicates that this peer was cast off in the falseticker -detection, while a -.Ql \&+ -indicates that the peer made it -through. -A -.Ql \&* -denotes the peer the server is currently -synchronizing with. -.It Ic showpeer Ar peer_address Oo Ar ... Oc -Shows a detailed display of the current peer variables for one -or more peers. -Most of these values are described in the NTP -Version 2 specification. -.It Ic pstats Ar peer_address Oo Ar ... Oc -Show per\-peer statistic counters associated with the specified -peer(s). -.It Ic clockstat Ar clock_peer_address Oo Ar ... Oc -Obtain and print information concerning a peer clock. -The -values obtained provide information on the setting of fudge factors -and other clock performance information. -.It Ic kerninfo -Obtain and print kernel phase\-lock loop operating parameters. -This information is available only if the kernel has been specially -modified for a precision timekeeping function. -.It Ic loopinfo Op Cm oneline | Cm multiline -Print the values of selected loop filter variables. -The loop -filter is the part of NTP which deals with adjusting the local -system clock. -The -.Sq offset -is the last offset given to the -loop filter by the packet processing code. -The -.Sq frequency -is the frequency error of the local clock in parts\-per\-million -(ppm). -The -.Sq time_const -controls the stiffness of the -phase\-lock loop and thus the speed at which it can adapt to -oscillator drift. -The -.Sq watchdog timer -value is the number -of seconds which have elapsed since the last sample offset was -given to the loop filter. -The -.Cm oneline -and -.Cm multiline -options specify the format in which this -information is to be printed, with -.Cm multiline -as the -default. -.It Ic sysinfo -Print a variety of system state variables, i.e., state related -to the local server. -All except the last four lines are described -in the NTP Version 3 specification, RFC\-1305. -.Pp -The -.Sq system flags -show various system flags, some of -which can be set and cleared by the -.Ic enable -and -.Ic disable -configuration commands, respectively. -These are -the -.Cm auth , -.Cm bclient , -.Cm monitor , -.Cm pll , -.Cm pps -and -.Cm stats -flags. -See the -.Xr ntpd @NTPD_MS@ -documentation for the meaning of these flags. -There -are two additional flags which are read only, the -.Cm kernel_pll -and -.Cm kernel_pps . -These flags indicate -the synchronization status when the precision time kernel -modifications are in use. -The -.Sq kernel_pll -indicates that -the local clock is being disciplined by the kernel, while the -.Sq kernel_pps -indicates the kernel discipline is provided by the PPS -signal. -.Pp -The -.Sq stability -is the residual frequency error remaining -after the system frequency correction is applied and is intended for -maintenance and debugging. -In most architectures, this value will -initially decrease from as high as 500 ppm to a nominal value in -the range .01 to 0.1 ppm. -If it remains high for some time after -starting the daemon, something may be wrong with the local clock, -or the value of the kernel variable -.Va kern.clockrate.tick -may be -incorrect. -.Pp -The -.Sq broadcastdelay -shows the default broadcast delay, -as set by the -.Ic broadcastdelay -configuration command. -.Pp -The -.Sq authdelay -shows the default authentication delay, -as set by the -.Ic authdelay -configuration command. -.It Ic sysstats -Print statistics counters maintained in the protocol -module. -.It Ic memstats -Print statistics counters related to memory allocation -code. -.It Ic iostats -Print statistics counters maintained in the input\-output -module. -.It Ic timerstats -Print statistics counters maintained in the timer/event queue -support code. -.It Ic reslist -Obtain and print the server's restriction list. -This list is -(usually) printed in sorted order and may help to understand how -the restrictions are applied. -.It Ic monlist Op Ar version -Obtain and print traffic counts collected and maintained by the -monitor facility. -The version number should not normally need to be -specified. -.It Ic clkbug Ar clock_peer_address Oo Ar ... Oc -Obtain debugging information for a reference clock driver. -This -information is provided only by some clock drivers and is mostly -undecodable without a copy of the driver source in hand. -.El -.Ss "Runtime Configuration Requests" -All requests which cause state changes in the server are -authenticated by the server using a configured NTP key (the -facility can also be disabled by the server by not configuring a -key). -The key number and the corresponding key must also be made -known to -.Nm . -This can be done using the -.Ic keyid -and -.Ic passwd -commands, the latter of which will prompt at the terminal for a -password to use as the encryption key. -You will also be prompted -automatically for both the key number and password the first time a -command which would result in an authenticated request to the -server is given. -Authentication not only provides verification that -the requester has permission to make such changes, but also gives -an extra degree of protection again transmission errors. -.Pp -Authenticated requests always include a timestamp in the packet -data, which is included in the computation of the authentication -code. -This timestamp is compared by the server to its receive time -stamp. -If they differ by more than a small amount the request is -rejected. -This is done for two reasons. -First, it makes simple -replay attacks on the server, by someone who might be able to -overhear traffic on your LAN, much more difficult. -Second, it makes -it more difficult to request configuration changes to your server -from topologically remote hosts. -While the reconfiguration facility -will work well with a server on the local host, and may work -adequately between time\-synchronized hosts on the same LAN, it will -work very poorly for more distant hosts. -As such, if reasonable -passwords are chosen, care is taken in the distribution and -protection of keys and appropriate source address restrictions are -applied, the run time reconfiguration facility should provide an -adequate level of security. -.Pp -The following commands all make authenticated requests. -.Bl -tag -width indent -.It Xo Ic addpeer Ar peer_address -.Op Ar keyid -.Op Ar version -.Op Cm prefer -.Xc -Add a configured peer association at the given address and -operating in symmetric active mode. -Note that an existing -association with the same peer may be deleted when this command is -executed, or may simply be converted to conform to the new -configuration, as appropriate. -If the optional -.Ar keyid -is a -nonzero integer, all outgoing packets to the remote server will -have an authentication field attached encrypted with this key. -If -the value is 0 (or not given) no authentication will be done. -The -.Ar version -can be 1, 2 or 3 and defaults to 3. -The -.Cm prefer -keyword indicates a preferred peer (and thus will -be used primarily for clock synchronisation if possible). -The -preferred peer also determines the validity of the PPS signal \- if -the preferred peer is suitable for synchronisation so is the PPS -signal. -.It Xo Ic addserver Ar peer_address -.Op Ar keyid -.Op Ar version -.Op Cm prefer -.Xc -Identical to the addpeer command, except that the operating -mode is client. -.It Xo Ic broadcast Ar peer_address -.Op Ar keyid -.Op Ar version -.Op Cm prefer -.Xc -Identical to the addpeer command, except that the operating -mode is broadcast. -In this case a valid key identifier and key are -required. -The -.Ar peer_address -parameter can be the broadcast -address of the local network or a multicast group address assigned -to NTP. -If a multicast address, a multicast\-capable kernel is -required. -.It Ic unconfig Ar peer_address Oo Ar ... Oc -This command causes the configured bit to be removed from the -specified peer(s). -In many cases this will cause the peer -association to be deleted. -When appropriate, however, the -association may persist in an unconfigured mode if the remote peer -is willing to continue on in this fashion. -.It Xo Ic fudge Ar peer_address -.Op Cm time1 -.Op Cm time2 -.Op Ar stratum -.Op Ar refid -.Xc -This command provides a way to set certain data for a reference -clock. -See the source listing for further information. -.It Xo Ic enable -.Oo -.Cm auth | Cm bclient | -.Cm calibrate | Cm kernel | -.Cm monitor | Cm ntp | -.Cm pps | Cm stats -.Oc -.Xc -.It Xo Ic disable -.Oo -.Cm auth | Cm bclient | -.Cm calibrate | Cm kernel | -.Cm monitor | Cm ntp | -.Cm pps | Cm stats -.Oc -.Xc -These commands operate in the same way as the -.Ic enable -and -.Ic disable -configuration file commands of -.Xr ntpd @NTPD_MS@ . -.Bl -tag -width indent -.It Cm auth -Enables the server to synchronize with unconfigured peers only -if the peer has been correctly authenticated using either public key -or private key cryptography. -The default for this flag is enable. -.It Cm bclient -Enables the server to listen for a message from a broadcast or -multicast server, as in the multicastclient command with -default address. -The default for this flag is disable. -.It Cm calibrate -Enables the calibrate feature for reference clocks. -The default for this flag is disable. -.It Cm kernel -Enables the kernel time discipline, if available. -The default for this flag is enable if support is available, otherwise disable. -.It Cm monitor -Enables the monitoring facility. -See the documentation here about the -.Cm monlist -command or further information. -The default for this flag is enable. -.It Cm ntp -Enables time and frequency discipline. -In effect, this switch opens and closes the feedback loop, -which is useful for testing. -The default for this flag is enable. -.It Cm pps -Enables the pulse\-per\-second (PPS) signal when frequency -and time is disciplined by the precision time kernel modifications. -See the -.Qq A Kernel Model for Precision Timekeeping -(available as part of the HTML documentation -provided in -.Pa /usr/share/doc/ntp ) -page for further information. -The default for this flag is disable. -.It Cm stats -Enables the statistics facility. -See the -.Sx Monitoring Options -section of -.Xr ntp.conf 5 -for further information. -The default for this flag is disable. -.El -.It Xo Ic restrict Ar address Ar mask -.Ar flag Oo Ar ... Oc -.Xc -This command operates in the same way as the -.Ic restrict -configuration file commands of -.Xr ntpd @NTPD_MS@ . -.It Xo Ic unrestrict Ar address Ar mask -.Ar flag Oo Ar ... Oc -.Xc -Unrestrict the matching entry from the restrict list. -.It Xo Ic delrestrict Ar address Ar mask -.Op Cm ntpport -.Xc -Delete the matching entry from the restrict list. -.It Ic readkeys -Causes the current set of authentication keys to be purged and -a new set to be obtained by rereading the keys file (which must -have been specified in the -.Xr ntpd @NTPD_MS@ -configuration file). -This -allows encryption keys to be changed without restarting the -server. -.It Ic trustedkey Ar keyid Oo Ar ... Oc -.It Ic untrustedkey Ar keyid Oo Ar ... Oc -These commands operate in the same way as the -.Ic trustedkey -and -.Ic untrustedkey -configuration file -commands of -.Xr ntpd @NTPD_MS@ . -.It Ic authinfo -Returns information concerning the authentication module, -including known keys and counts of encryptions and decryptions -which have been done. -.It Ic traps -Display the traps set in the server. -See the source listing for -further information. -.It Xo Ic addtrap Ar address -.Op Ar port -.Op Ar interface -.Xc -Set a trap for asynchronous messages. -See the source listing -for further information. -.It Xo Ic clrtrap Ar address -.Op Ar port -.Op Ar interface -.Xc -Clear a trap for asynchronous messages. -See the source listing -for further information. -.It Ic reset -Clear the statistics counters in various modules of the server. -See the source listing for further information. -.El +#! /bin/cat .Sh "ENVIRONMENT" See \fBOPTION PRESETS\fP for configuration environment variables. .Sh "FILES" @@ -777,31 +135,14 @@ libopts had an internal operational error. Please report it to autogen\-users@lists.sourceforge.net. Thank you. .El .Sh "SEE ALSO" -.Xr ntp.conf 5 , -.Xr ntpd @NTPD_MS@ -.Rs -.%A David L. Mills -.%T Network Time Protocol (Version 3) -.%O RFC1305 -.Re +#! /bin/cat .Sh AUTHORS -The formatting directives in this document came from FreeBSD. +#! /bin/cat .Sh "COPYRIGHT" Copyright (C) 1992\-2020 The University of Delaware and Network Time Foundation all rights reserved. This program is released under the terms of the NTP license, . .Sh BUGS -The -.Nm -utility is a crude hack. -Much of the information it shows is -deadly boring and could only be loved by its implementer. -The -program was designed so that new (and temporary) features were easy -to hack in, at great expense to the program's ease of use. -Despite -this, the program is occasionally useful. -.Pp -Please report bugs to http://bugs.ntp.org . +#! /bin/cat .Pp Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org .Sh "NOTES" diff --git a/ntpq/invoke-ntpq.texi b/ntpq/invoke-ntpq.texi index 040575a44..959ef86c4 100644 --- a/ntpq/invoke-ntpq.texi +++ b/ntpq/invoke-ntpq.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi) # -# It has been AutoGen-ed June 23, 2020 at 02:20:55 AM by AutoGen 5.18.5 +# It has been AutoGen-ed June 26, 2022 at 05:34:19 AM by AutoGen 5.18.5 # From the definitions ntpq-opts.def # and the template file agtexi-cmd.tpl @end ignore diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c index ca08c3f0c..81df825e0 100644 --- a/ntpq/ntpq-opts.c +++ b/ntpq/ntpq-opts.c @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpq-opts.c) * - * It has been AutoGen-ed June 23, 2020 at 02:20:48 AM by AutoGen 5.18.5 + * It has been AutoGen-ed June 26, 2022 at 05:41:46 AM by AutoGen 5.18.5 * From the definitions ntpq-opts.def * and the template file options * diff --git a/ntpq/ntpq-opts.h b/ntpq/ntpq-opts.h index 9bc23b8f0..264c2ac6f 100644 --- a/ntpq/ntpq-opts.h +++ b/ntpq/ntpq-opts.h @@ -1,7 +1,7 @@ /* * EDIT THIS FILE WITH CAUTION (ntpq-opts.h) * - * It has been AutoGen-ed June 23, 2020 at 02:20:48 AM by AutoGen 5.18.5 + * It has been AutoGen-ed June 26, 2022 at 05:41:46 AM by AutoGen 5.18.5 * From the definitions ntpq-opts.def * and the template file options * diff --git a/ntpq/ntpq.1ntpqman b/ntpq/ntpq.1ntpqman index 4723f9ff2..1c6b50c35 100644 --- a/ntpq/ntpq.1ntpqman +++ b/ntpq/ntpq.1ntpqman @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpq 1ntpqman "23 Jun 2020" "4.2.8p15" "User Commands" +.TH ntpq 1ntpqman "26 Jun 2022" "4.2.8p15" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 23, 2020 at 02:20:56 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 26, 2022 at 05:34:20 AM by AutoGen 5.18.5 .\" From the definitions ntpq-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -31,1395 +31,7 @@ .ne 2 .SH DESCRIPTION -.sp \n(Ppu -.ne 2 - -The -\f\*[B-Font]ntpq\fP -utility program is used to query NTP servers to monitor NTP operations -and performance, requesting -information about current state and/or changes in that state. -The program may be run either in interactive mode or controlled using -command line arguments. -Requests to read and write arbitrary -variables can be assembled, with raw and pretty-printed output -options being available. -The -\f\*[B-Font]ntpq\fP -utility can also obtain and print a -list of peers in a common format by sending multiple queries to the -server. -.sp \n(Ppu -.ne 2 - -If one or more request options is included on the command line -when -\f\*[B-Font]ntpq\fP -is executed, each of the requests will be sent -to the NTP servers running on each of the hosts given as command -line arguments, or on localhost by default. -If no request options -are given, -\f\*[B-Font]ntpq\fP -will attempt to read commands from the -standard input and execute these on the NTP server running on the -first host given on the command line, again defaulting to localhost -when no other host is specified. -The -\f\*[B-Font]ntpq\fP -utility will prompt for -commands if the standard input is a terminal device. -.sp \n(Ppu -.ne 2 - -\f\*[B-Font]ntpq\fP -uses NTP mode 6 packets to communicate with the -NTP server, and hence can be used to query any compatible server on -the network which permits it. -Note that since NTP is a UDP protocol -this communication will be somewhat unreliable, especially over -large distances in terms of network topology. -The -\f\*[B-Font]ntpq\fP -utility makes -one attempt to retransmit requests, and will time requests out if -the remote host is not heard from within a suitable timeout -time. -.sp \n(Ppu -.ne 2 - -Note that in contexts where a host name is expected, a -\f\*[B-Font]\-4\f[] -qualifier preceding the host name forces resolution to the IPv4 -namespace, while a -\f\*[B-Font]\-6\f[] -qualifier forces resolution to the IPv6 namespace. -For examples and usage, see the -\*[Lq]NTP Debugging Techniques\*[Rq] -page. -.sp \n(Ppu -.ne 2 - -Specifying a -command line option other than -\f\*[B-Font]\-i\f[] -or -\f\*[B-Font]\-n\f[] -will -cause the specified query (queries) to be sent to the indicated -host(s) immediately. -Otherwise, -\f\*[B-Font]ntpq\fP -will attempt to read -interactive format commands from the standard input. -.SS "Internal Commands" -.sp \n(Ppu -.ne 2 - -Interactive format commands consist of a keyword followed by zero -to four arguments. -Only enough characters of the full keyword to -uniquely identify the command need be typed. -.sp \n(Ppu -.ne 2 - -A -number of interactive format commands are executed entirely within -the -\f\*[B-Font]ntpq\fP -utility itself and do not result in NTP -requests being sent to a server. -These are described following. -.TP 15 -.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command\f[]] -.br -.ns -.TP 15 -.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command\f[]] -A -\[oq]\&?\[cq] -by itself will print a list of all the commands -known to -\f\*[B-Font]ntpq\fP. -A -\[oq]\&?\[cq] -followed by a command name will print function and usage -information about the command. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][,...] -.br -.ns -.TP 15 -.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]name\f[][,...] -.br -.ns -.TP 15 -.NOP \f\*[B-Font]clearvars\f[] -.br -.ns -.TP 15 -.NOP \f\*[B-Font]showvars\f[] -The arguments to this command consist of a list of -items of the form -\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]], -where the -.NOP \&=\f\*[I-Font]value\f[] -is ignored, and can be omitted, -in requests to the server to read variables. -The -\f\*[B-Font]ntpq\fP -utility maintains an internal list in which data to be included in -messages can be assembled, and displayed or set using the -\f\*[B-Font]readlist\f[] -and -\f\*[B-Font]writelist\f[] -commands described below. -The -\f\*[B-Font]addvars\f[] -command allows variables and their optional values to be added to -the list. -If more than one variable is to be added, the list should -be comma-separated and not contain white space. -The -\f\*[B-Font]rmvars\f[] -command can be used to remove individual variables from the list, -while the -\f\*[B-Font]clearvars\f[] -command removes all variables from the -list. -The -\f\*[B-Font]showvars\f[] -command displays the current list of optional variables. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]authenticate\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]] -Normally -\f\*[B-Font]ntpq\fP -does not authenticate requests unless -they are write requests. -The command -\f\*[B-Font]authenticate\f[] \f\*[B-Font]yes\f[] -causes -\f\*[B-Font]ntpq\fP -to send authentication with all requests it -makes. -Authenticated requests causes some servers to handle -requests slightly differently. -The command -\f\*[B-Font]authenticate\f[] -causes -\f\*[B-Font]ntpq\fP -to display whether or not -it is currently authenticating requests. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]cooked\f[] -Causes output from query commands to be "cooked", so that -variables which are recognized by -\f\*[B-Font]ntpq\fP -will have their -values reformatted for human consumption. -Variables which -\f\*[B-Font]ntpq\fP -could not decode completely are -marked with a trailing -\[oq]\&?\[cq]. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[]|\f\*[B-Font]less\f[]|\f\*[B-Font]off\f[]] -With no argument, displays the current debug level. -Otherwise, the debugging level is changed as indicated. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]delay\f[] [\f\*[I-Font]milliseconds\f[]] -Specify a time interval to be added to timestamps included in -requests which require authentication. -This is used to enable -(unreliable) server reconfiguration over long delay network paths -or between machines whose clocks are unsynchronized. -Actually the -server does not now require timestamps in authenticated requests, -so this command may be obsolete. -Without any arguments, displays the current delay. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]drefid\f[] [\f\*[B-Font]hash\f[]|\f\*[B-Font]ipv4\f[]] -Display refids as IPv4 or hash. -Without any arguments, displays whether refids are shown as IPv4 -addresses or hashes. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]exit\f[] -Exit -\f\*[B-Font]ntpq\fP. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]host\f[] [\f\*[I-Font]name\f[]] -Set the host to which future queries will be sent. -The -\f\*[I-Font]name\f[] -may be either a host name or a numeric address. -Without any arguments, displays the current host. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]] -If -\f\*[B-Font]yes\f[] -is specified, host names are printed in -information displays. -If -\f\*[B-Font]no\f[] -is specified, numeric -addresses are printed instead. -The default is -\f\*[B-Font]yes\f[], -unless -modified using the command line -\f\*[B-Font]\-n\f[] -switch. -Without any arguments, displays whether host names or numeric addresses -are shown. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]keyid\f[] [\f\*[I-Font]keyid\f[]] -This command allows the specification of a key number to be -used to authenticate configuration requests. -This must correspond -to the -\f\*[B-Font]controlkey\f[] -key number the server has been configured to use for this -purpose. -Without any arguments, displays the current -\f\*[I-Font]keyid\f[]. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]keytype\f[] [\f\*[I-Font]digest\f[]] -Specify the digest algorithm to use for authenticating requests, with default -\f\*[B-Font]MD5\f[]. -If -\f\*[B-Font]ntpq\fP -was built with OpenSSL support, and OpenSSL is installed, -\f\*[I-Font]digest\f[] -can be any message digest algorithm supported by OpenSSL. -If no argument is given, the current -\f\*[B-Font]keytype\f[] \f\*[I-Font]digest\f[] -algorithm used is displayed. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[]|\f\*[B-Font]2\f[]|\f\*[B-Font]3\f[]|\f\*[B-Font]4\f[]] -Sets the NTP version number which -\f\*[B-Font]ntpq\fP -claims in -packets. -Defaults to 3, and note that mode 6 control messages (and -modes, for that matter) didn't exist in NTP version 1. -There appear -to be no servers left which demand version 1. -With no argument, displays the current NTP version that will be used -when communicating with servers. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]passwd\f[] -This command prompts you to type in a password (which will not -be echoed) which will be used to authenticate configuration -requests. -The password must correspond to the key configured for -use by the NTP server for this purpose if such requests are to be -successful. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]poll\f[] [\f\*[I-Font]n\f[]] [\f\*[B-Font]verbose\f[]] -Poll an NTP server in client mode -\f\*[I-Font]n\f[] -times. -Poll not implemented yet. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]quit\f[] -Exit -\f\*[B-Font]ntpq\fP. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]raw\f[] -Causes all output from query commands is printed as received -from the remote server. -The only formating/interpretation done on -the data is to transform nonascii data into a printable (but barely -understandable) form. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]timeout\f[] [\f\*[I-Font]milliseconds\f[]] -Specify a timeout period for responses to server queries. -The -default is about 5000 milliseconds. -Without any arguments, displays the current timeout period. -Note that since -\f\*[B-Font]ntpq\fP -retries each query once after a timeout, the total waiting time for -a timeout will be twice the timeout value set. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]version\f[] -Display the version of the -\f\*[B-Font]ntpq\fP -program. -.PP -.SS "Control Message Commands" -Association ids are used to identify system, peer and clock variables. -System variables are assigned an association id of zero and system name -space, while each association is assigned a nonzero association id and -peer namespace. -Most control commands send a single message to the server and expect a -single response message. -The exceptions are the -\f\*[B-Font]peers\f[] -command, which sends a series of messages, -and the -\f\*[B-Font]mreadlist\f[] -and -\f\*[B-Font]mreadvar\f[] -commands, which iterate over a range of associations. -.TP 10 -.NOP \f\*[B-Font]apeers\f[] -Display a list of peers in the form: -.Dl [tally]remote refid assid st t when pool reach delay offset jitter -where the output is just like the -\f\*[B-Font]peers\f[] -command except that the -\f\*[B-Font]refid\f[] -is displayed in hex format and the association number is also displayed. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]associations\f[] -Display a list of mobilized associations in the form: -.Dl ind assid status conf reach auth condition last_event cnt -.RS -.IP \fB\(bu\fP 2 -.IP \fB\(bu\fP 2 \f\*[B-Font]ind\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]index\f[] \f\*[B-Font]on\f[] \f\*[B-Font]this\f[] \f\*[B-Font]list\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]assid\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]association\f[] \f\*[B-Font]id\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]status\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]conf\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]persistent,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]ephemeral\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]reach\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]reachable,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]unreachable\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]auth\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]ok\f[], \f\*[B-Font]yes\f[], \f\*[B-Font]bad\f[] \f\*[B-Font]No\f[] \f\*[B-Font]and\f[] \f\*[B-Font]none\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]condition\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]selection\f[] \f\*[B-Font]status\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]select\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]last_event\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]report\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]event\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]cnt\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]count\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]count\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[] -.RE -.br -.ns -.TP 10 -.NOP \f\*[B-Font]authinfo\f[] -Display the authentication statistics counters: -time since reset, stored keys, free keys, key lookups, keys not found, -uncached keys, expired keys, encryptions, decryptions. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clocklist\f[] [\f\*[I-Font]associd\f[]] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]cl\f[] [\f\*[I-Font]associd\f[]] -Display all clock variables in the variable list for those associations -supporting a reference clock. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clockvar\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]cv\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...] -Display a list of clock variables for those associations supporting a -reference clock. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]:config\f[] \f\*[I-Font]configuration command line\f[] -Send the remainder of the command line, including whitespace, to the -server as a run-time configuration command in the same format as a line -in the configuration file. -This command is experimental until further notice and clarification. -Authentication is of course required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[] -Send each line of -\f\*[I-Font]filename\f[] -to the server as run-time configuration commands in the same format as -lines in the configuration file. -This command is experimental until further notice and clarification. -Authentication is required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]ifstats\f[] -Display status and statistics counters for each local network interface address: -interface number, interface name and address or broadcast, drop, flag, -ttl, mc, received, sent, send failed, peers, uptime. -Authentication is required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]iostats\f[] -Display network and reference clock I/O statistics: -time since reset, receive buffers, free receive buffers, used receive buffers, -low water refills, dropped packets, ignored packets, received packets, -packets sent, packet send failures, input wakeups, useful input wakeups. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]kerninfo\f[] -Display kernel loop and PPS statistics: -associd, status, pll offset, pll frequency, maximum error, -estimated error, kernel status, pll time constant, precision, -frequency tolerance, pps frequency, pps stability, pps jitter, -calibration interval, calibration cycles, jitter exceeded, -stability exceeded, calibration errors. -As with other ntpq output, times are in milliseconds; very small values -may be shown as exponentials. -The precision value displayed is in milliseconds as well, unlike the -precision system variable. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lassociations\f[] -Perform the same function as the associations command, except display -mobilized and unmobilized associations, including all clients. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]] -Display a list of all peers and clients showing -\f\*[B-Font]dstadr\f[] -(associated with the given IP version). -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lpassociations\f[] -Display the last obtained list of associations, including all clients. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]] -Display a list of all peers and clients (associated with the given IP version). -.br -.ns -.TP 10 -.NOP \f\*[B-Font]monstats\f[] -Display monitor facility status, statistics, and limits: -enabled, addresses, peak addresses, maximum addresses, -reclaim above count, reclaim older than, kilobytes, maximum kilobytes. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mreadlist\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mrl\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] -Perform the same function as the -\f\*[B-Font]readlist\f[] -command for a range of association ids. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mreadvar\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...] -This range may be determined from the list displayed by any -command showing associations. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mrv\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...] -Perform the same function as the -\f\*[B-Font]readvar\f[] -command for a range of association ids. -This range may be determined from the list displayed by any -command showing associations. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]\&=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]\&=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]\&=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]\&=\f\*[I-Font]hexmask\f[]] -Display traffic counts of the most recently seen source addresses -collected and maintained by the monitor facility. -With the exception of -\f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[], -the options filter the list returned by -\fCntpd\f[]\fR(8)\f[]. -The -\f\*[B-Font]limited\f[] -and -\f\*[B-Font]kod\f[] -options return only entries representing client addresses from which the -last packet received triggered either discarding or a KoD response. -The -\f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] -option filters entries representing less than -\f\*[I-Font]count\f[] -packets. -The -\f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] -option filters entries for packets received on any local address other than -\f\*[I-Font]localaddr\f[]. -\f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] -and -\f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[] -filter entries containing none or less than all, respectively, of the bits in -\f\*[I-Font]hexmask\f[], -which must begin with -\f\*[B-Font]0x\f[]. -The -\f\*[I-Font]sortorder\f[] -defaults to -\f\*[B-Font]lstint\f[] -and may be -\f\*[B-Font]addr\f[], -\f\*[B-Font]avgint\f[], -\f\*[B-Font]count\f[], -\f\*[B-Font]lstint\f[], -or any of those preceded by -\[oq]\&-\[cq] -to reverse the sort order. -The output columns are: -.RS -.TP 10 -.NOP Column -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lstint\f[] -Interval in seconds between the receipt of the most recent packet from -this address and the completion of the retrieval of the MRU list by -\f\*[B-Font]ntpq\fP. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]avgint\f[] -Average interval in s between packets from this address. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rstr\f[] -Restriction flags associated with this address. -Most are copied unchanged from the matching -\f\*[B-Font]restrict\f[] -command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless -the last packet from this address triggered a rate control response. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]r\f[] -Rate control indicator, either -a period, -\f\*[B-Font]L\f[] -or -\f\*[B-Font]K\f[] -for no rate control response, -rate limiting by discarding, or rate limiting with a KoD response, respectively. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]m\f[] -Packet mode. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]v\f[] -Packet version number. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]count\f[] -Packets received from this address. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rport\f[] -Source port of last packet from this address. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[] -host or DNS name, numeric address, or address followed by -claimed DNS name which could not be verified in parentheses. -.RE -.br -.ns -.TP 10 -.NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]] -Obtain and print the old-style list of all peers and clients showing -\f\*[B-Font]dstadr\f[] -(associated with the given IP version), -rather than the -\f\*[B-Font]refid\f[]. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]passociations\f[] -Perform the same function as the -\f\*[B-Font]associations\f[] -command, -except that it uses previously stored data rather than making a new query. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]peers\f[] -Display a list of peers in the form: -.Dl [tally]remote refid st t when pool reach delay offset jitter -.RS -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font][tally]\f[] -single-character code indicating current value of the -\f\*[B-Font]select\f[] -field of the -.Lk decode.html#peer "peer status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]remote\f[] -host name (or IP number) of peer. -The value displayed will be truncated to 15 characters unless the -\f\*[B-Font]ntpq\fP -\f\*[B-Font]\-w\f[] -option is given, in which case the full value will be displayed -on the first line, and if too long, -the remaining data will be displayed on the next line. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]refid\f[] -source IP address or -.Lk decode.html#kiss "'kiss code" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]st\f[] -stratum: 0 for local reference clocks, 1 for servers with local -reference clocks, ..., 16 for unsynchronized server clocks -.br -.ns -.TP 10 -.NOP \f\*[B-Font]t\f[] -\f\*[B-Font]u\f[]: -unicast or manycast client, -\f\*[B-Font]b\f[]: -broadcast or multicast client, -\f\*[B-Font]p\f[]: -pool source, -\f\*[B-Font]l\f[]: -local (reference clock), -\f\*[B-Font]s\f[]: -symmetric (peer), -\f\*[B-Font]A\f[]: -manycast server, -\f\*[B-Font]B\f[]: -broadcast server, -\f\*[B-Font]M\f[]: -multicast server -.br -.ns -.TP 10 -.NOP \f\*[B-Font]when\f[] -time in seconds, minutes, hours, or days since the last packet -was received, or -\[oq]\&-\[cq] -if a packet has never been received -.br -.ns -.TP 10 -.NOP \f\*[B-Font]poll\f[] -poll interval (s) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reach\f[] -reach shift register (octal) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]delay\f[] -roundtrip delay -.br -.ns -.TP 10 -.NOP \f\*[B-Font]offset\f[] -offset of server relative to this host -.br -.ns -.TP 10 -.NOP \f\*[B-Font]jitter\f[] -offset RMS error estimate. -.RE -.br -.ns -.TP 10 -.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]associd\f[] -Display the statistics for the peer with the given -\f\*[I-Font]associd\f[]: -associd, status, remote host, local address, time last received, -time until next send, reachability change, packets sent, -packets received, bad authentication, bogus origin, duplicate, -bad dispersion, bad reference time, candidate order. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]readlist\f[] [\f\*[I-Font]associd\f[]] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rl\f[] [\f\*[I-Font]associd\f[]] -Display all system or peer variables. -If the -\f\*[I-Font]associd\f[] -is omitted, it is assumed to be zero. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]readvar\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rv\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]] -Display the specified system or peer variables. -If -\f\*[I-Font]associd\f[] -is zero, the variables are from the -\fISystem\f[] \fIVariables\f[] -name space, otherwise they are from the -\fIPeer\f[] \fIVariables\f[] -name space. -The -\f\*[I-Font]associd\f[] -is required, as the same name can occur in both spaces. -If no -\f\*[I-Font]name\f[] -is included, all operative variables in the name space are displayed. -In this case only, if the -\f\*[I-Font]associd\f[] -is omitted, it is assumed to be zero. -Multiple names are specified with comma separators and without whitespace. -Note that time values are represented in milliseconds -and frequency values in parts-per-million (PPM). -Some NTP timestamps are represented in the format -\f\*[I-Font]YYYY\f[]\f\*[I-Font]MM\f[] \f\*[I-Font]DD\f[] \f\*[I-Font]TTTT\f[], -where -\f\*[I-Font]YYYY\f[] -is the year, -\f\*[I-Font]MM\f[] -the month of year, -\f\*[I-Font]DD\f[] -the day of month and -\f\*[I-Font]TTTT\f[] -the time of day. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reslist\f[] -Display the access control (restrict) list for -\f\*[B-Font]ntpq\fP. -Authentication is required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[] -Save the current configuration, -including any runtime modifications made by -\f\*[B-Font]:config\f[] -or -\f\*[B-Font]config-from-file\f[], -to the NTP server host file -\f\*[I-Font]filename\f[]. -This command will be rejected by the server unless -.Lk miscopt.html#saveconfigdir "saveconfigdir" -appears in the -\fCntpd\f[]\fR(8)\f[] -configuration file. -\f\*[I-Font]filename\f[] -can use -\fCdate\f[]\fR(1)\f[] -format specifiers to substitute the current date and time, for -example, -.in +4 -\f\*[B-Font]saveconfig\f[] \fIntp-%Y%m%d-%H%M%S.conf\f[]. -.in -4 -The filename used is stored in system variable -\f\*[B-Font]savedconfig\f[]. -Authentication is required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]sysinfo\f[] -Display system operational summary: -associd, status, system peer, system peer mode, leap indicator, -stratum, log2 precision, root delay, root dispersion, -reference id, reference time, system jitter, clock jitter, -clock wander, broadcast delay, symm. auth. delay. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]sysstats\f[] -Display system uptime and packet counts maintained in the -protocol module: -uptime, sysstats reset, packets received, current version, -older version, bad length or format, authentication failed, -declined, restricted, rate limited, KoD responses, -processed for time. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]timerstats\f[] -Display interval timer counters: -time since reset, timer overruns, calls to transmit. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]associd\f[] -Set all system or peer variables included in the variable list. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]associd\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...] -Set the specified variables in the variable list. -If the -\f\*[I-Font]associd\f[] -is zero, the variables are from the -\fISystem\f[] \fIVariables\f[] -name space, otherwise they are from the -\fIPeer\f[] \fIVariables\f[] -name space. -The -\f\*[I-Font]associd\f[] -is required, as the same name can occur in both spaces. -Authentication is required. -.PP -.SS Status Words and Kiss Codes -The current state of the operating program is shown -in a set of status words -maintained by the system. -Status information is also available on a per-association basis. -These words are displayed by the -\f\*[B-Font]readlist\f[] -and -\f\*[B-Font]associations\f[] -commands both in hexadecimal and in decoded short tip strings. -The codes, tips and short explanations are documented on the -.Lk decode.html "Event Messages and Status Words" -page. -The page also includes a list of system and peer messages, -the code for the latest of which is included in the status word. -.sp \n(Ppu -.ne 2 - -Information resulting from protocol machine state transitions -is displayed using an informal set of ASCII strings called -.Lk decode.html#kiss "kiss codes" . -The original purpose was for kiss-o'-death (KoD) packets -sent by the server to advise the client of an unusual condition. -They are now displayed, when appropriate, -in the reference identifier field in various billboards. -.SS System Variables -The following system variables appear in the -\f\*[B-Font]readlist\f[] -billboard. -Not all variables are displayed in some configurations. -.sp \n(Ppu -.ne 2 - -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]status\f[] -.Lk decode.html#sys "system status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]version\f[] -NTP software version and build time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]processor\f[] -hardware platform and version -.br -.ns -.TP 10 -.NOP \f\*[B-Font]system\f[] -operating system and version -.br -.ns -.TP 10 -.NOP \f\*[B-Font]leap\f[] -leap warning indicator (0-3) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]stratum\f[] -stratum (1-15) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]precision\f[] -precision (log2 s) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rootdelay\f[] -total roundtrip delay to the primary reference clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rootdisp\f[] -total dispersion to the primary reference clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]refid\f[] -reference id or -.Lk decode.html#kiss "kiss code" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reftime\f[] -reference time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clock\f[] -date and time of day -.br -.ns -.TP 10 -.NOP \f\*[B-Font]peer\f[] -system peer association id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]tc\f[] -time constant and poll exponent (log2 s) (3-17) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mintc\f[] -minimum time constant (log2 s) (3-10) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]offset\f[] -combined offset of server relative to this host -.br -.ns -.TP 10 -.NOP \f\*[B-Font]frequency\f[] -frequency drift (PPM) relative to hardware clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]sys_jitter\f[] -combined system jitter -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clk_wander\f[] -clock frequency wander (PPM) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clk_jitter\f[] -clock jitter -.br -.ns -.TP 10 -.NOP \f\*[B-Font]tai\f[] -TAI-UTC offset (s) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]leapsec\f[] -NTP seconds when the next leap second is/was inserted -.br -.ns -.TP 10 -.NOP \f\*[B-Font]expire\f[] -NTP seconds when the NIST leapseconds file expires -.PP -The jitter and wander statistics are exponentially-weighted RMS averages. -The system jitter is defined in the NTPv4 specification; -the clock jitter statistic is computed by the clock discipline module. -.sp \n(Ppu -.ne 2 - -When the NTPv4 daemon is compiled with the OpenSSL software library, -additional system variables are displayed, -including some or all of the following, -depending on the particular Autokey dance: -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]host\f[] -Autokey host name for this host -.br -.ns -.TP 10 -.NOP \f\*[B-Font]ident\f[] -Autokey group name for this host -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flags\f[] -host flags (see Autokey specification) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]digest\f[] -OpenSSL message digest algorithm -.br -.ns -.TP 10 -.NOP \f\*[B-Font]signature\f[] -OpenSSL digest/signature scheme -.br -.ns -.TP 10 -.NOP \f\*[B-Font]update\f[] -NTP seconds at last signature update -.br -.ns -.TP 10 -.NOP \f\*[B-Font]cert\f[] -certificate subject, issuer and certificate flags -.br -.ns -.TP 10 -.NOP \f\*[B-Font]until\f[] -NTP seconds when the certificate expires -.PP -.SS Peer Variables -The following peer variables appear in the -\f\*[B-Font]readlist\f[] -billboard for each association. -Not all variables are displayed in some configurations. -.sp \n(Ppu -.ne 2 - -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]associd\f[] -association id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]status\f[] -.Lk decode.html#peer "peer status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]srcadr\f[] -source (remote) IP address -.br -.ns -.TP 10 -.NOP \f\*[B-Font]srcport\f[] -source (remote) port -.br -.ns -.TP 10 -.NOP \f\*[B-Font]dstadr\f[] -destination (local) IP address -.br -.ns -.TP 10 -.NOP \f\*[B-Font]dstport\f[] -destination (local) port -.br -.ns -.TP 10 -.NOP \f\*[B-Font]leap\f[] -leap indicator (0-3) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]stratum\f[] -stratum (0-15) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]precision\f[] -precision (log2 s) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rootdelay\f[] -total roundtrip delay to the primary reference clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rootdisp\f[] -total root dispersion to the primary reference clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]refid\f[] -reference id or -.Lk decode.html#kiss "kiss code" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reftime\f[] -reference time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rec\f[] -last packet received time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reach\f[] -reach register (octal) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]unreach\f[] -unreach counter -.br -.ns -.TP 10 -.NOP \f\*[B-Font]hmode\f[] -host mode (1-6) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]pmode\f[] -peer mode (1-5) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]hpoll\f[] -host poll exponent (log2 s) (3-17) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]ppoll\f[] -peer poll exponent (log2 s) (3-17) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]headway\f[] -headway (see -.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" ) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flash\f[] -.Lk decode.html#flash "flash status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]keyid\f[] -symmetric key id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]offset\f[] -filter offset -.br -.ns -.TP 10 -.NOP \f\*[B-Font]delay\f[] -filter delay -.br -.ns -.TP 10 -.NOP \f\*[B-Font]dispersion\f[] -filter dispersion -.br -.ns -.TP 10 -.NOP \f\*[B-Font]jitter\f[] -filter jitter -.br -.ns -.TP 10 -.NOP \f\*[B-Font]bias\f[] -unicast/broadcast bias -.br -.ns -.TP 10 -.NOP \f\*[B-Font]xleave\f[] -interleave delay (see -.Lk xleave.html "NTP Interleaved Modes" ) -.PP -The -\f\*[B-Font]bias\f[] -variable is calculated when the first broadcast packet is received -after the calibration volley. -It represents the offset of the broadcast subgraph relative to the -unicast subgraph. -The -\f\*[B-Font]xleave\f[] -variable appears only for the interleaved symmetric and interleaved modes. -It represents the internal queuing, buffering and transmission delays -for the preceding packet. -.sp \n(Ppu -.ne 2 - -When the NTPv4 daemon is compiled with the OpenSSL software library, -additional peer variables are displayed, including the following: -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flags\f[] -peer flags (see Autokey specification) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]host\f[] -Autokey server name -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flags\f[] -peer flags (see Autokey specification) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]signature\f[] -OpenSSL digest/signature scheme -.br -.ns -.TP 10 -.NOP \f\*[B-Font]initsequence\f[] -initial key id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]initkey\f[] -initial key index -.br -.ns -.TP 10 -.NOP \f\*[B-Font]timestamp\f[] -Autokey signature timestamp -.br -.ns -.TP 10 -.NOP \f\*[B-Font]ident\f[] -Autokey group name for this association -.PP -.SS Clock Variables -The following clock variables appear in the -\f\*[B-Font]clocklist\f[] -billboard for each association with a reference clock. -Not all variables are displayed in some configurations. -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]associd\f[] -association id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]status\f[] -.Lk decode.html#clock "clock status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]device\f[] -device description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]timecode\f[] -ASCII time code string (specific to device) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]poll\f[] -poll messages sent -.br -.ns -.TP 10 -.NOP \f\*[B-Font]noreply\f[] -no reply -.br -.ns -.TP 10 -.NOP \f\*[B-Font]badformat\f[] -bad format -.br -.ns -.TP 10 -.NOP \f\*[B-Font]baddata\f[] -bad date or time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]fudgetime1\f[] -fudge time 1 -.br -.ns -.TP 10 -.NOP \f\*[B-Font]fudgetime2\f[] -fudge time 2 -.br -.ns -.TP 10 -.NOP \f\*[B-Font]stratum\f[] -driver stratum -.br -.ns -.TP 10 -.NOP \f\*[B-Font]refid\f[] -driver reference id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flags\f[] -driver flags -.PP +#! /bin/cat .SH "OPTIONS" .TP .NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[] diff --git a/ntpq/ntpq.1ntpqmdoc b/ntpq/ntpq.1ntpqmdoc index 4b21e393e..222ffbe85 100644 --- a/ntpq/ntpq.1ntpqmdoc +++ b/ntpq/ntpq.1ntpqmdoc @@ -1,9 +1,9 @@ -.Dd June 23 2020 +.Dd June 26 2022 .Dt NTPQ 1ntpqmdoc User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) .\" -.\" It has been AutoGen-ed June 23, 2020 at 02:20:53 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 26, 2022 at 05:34:18 AM by AutoGen 5.18.5 .\" From the definitions ntpq-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -18,893 +18,7 @@ [ host ...] .Pp .Sh DESCRIPTION -.Pp -The -.Nm -utility program is used to query NTP servers to monitor NTP operations -and performance, requesting -information about current state and/or changes in that state. -The program may be run either in interactive mode or controlled using -command line arguments. -Requests to read and write arbitrary -variables can be assembled, with raw and pretty\-printed output -options being available. -The -.Nm -utility can also obtain and print a -list of peers in a common format by sending multiple queries to the -server. -.Pp -If one or more request options is included on the command line -when -.Nm -is executed, each of the requests will be sent -to the NTP servers running on each of the hosts given as command -line arguments, or on localhost by default. -If no request options -are given, -.Nm -will attempt to read commands from the -standard input and execute these on the NTP server running on the -first host given on the command line, again defaulting to localhost -when no other host is specified. -The -.Nm -utility will prompt for -commands if the standard input is a terminal device. -.Pp -.Nm -uses NTP mode 6 packets to communicate with the -NTP server, and hence can be used to query any compatible server on -the network which permits it. -Note that since NTP is a UDP protocol -this communication will be somewhat unreliable, especially over -large distances in terms of network topology. -The -.Nm -utility makes -one attempt to retransmit requests, and will time requests out if -the remote host is not heard from within a suitable timeout -time. -.Pp -Note that in contexts where a host name is expected, a -.Fl 4 -qualifier preceding the host name forces resolution to the IPv4 -namespace, while a -.Fl 6 -qualifier forces resolution to the IPv6 namespace. -For examples and usage, see the -.Dq NTP Debugging Techniques -page. -.Pp -Specifying a -command line option other than -.Fl i -or -.Fl n -will -cause the specified query (queries) to be sent to the indicated -host(s) immediately. -Otherwise, -.Nm -will attempt to read -interactive format commands from the standard input. -.Ss "Internal Commands" -.Pp -Interactive format commands consist of a keyword followed by zero -to four arguments. -Only enough characters of the full keyword to -uniquely identify the command need be typed. -.Pp -A -number of interactive format commands are executed entirely within -the -.Nm -utility itself and do not result in NTP -requests being sent to a server. -These are described following. -.Bl -tag -width "help [command]" -compact -offset indent -.It Ic ? Op Ar command -.It Ic help Op Ar command -A -.Ql \&? -by itself will print a list of all the commands -known to -.Nm . -A -.Ql \&? -followed by a command name will print function and usage -information about the command. -.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,... -.It Ic rmvars Ar name Ns Op ,... -.It Ic clearvars -.It Ic showvars -The arguments to this command consist of a list of -items of the form -.Ar name Ns Op \&= Ns Ar value , -where the -.No \&= Ns Ar value -is ignored, and can be omitted, -in requests to the server to read variables. -The -.Nm -utility maintains an internal list in which data to be included in -messages can be assembled, and displayed or set using the -.Ic readlist -and -.Ic writelist -commands described below. -The -.Ic addvars -command allows variables and their optional values to be added to -the list. -If more than one variable is to be added, the list should -be comma\-separated and not contain white space. -The -.Ic rmvars -command can be used to remove individual variables from the list, -while the -.Ic clearvars -command removes all variables from the -list. -The -.Ic showvars -command displays the current list of optional variables. -.It Ic authenticate Op Cm yes Ns | Ns Cm no -Normally -.Nm -does not authenticate requests unless -they are write requests. -The command -.Ic authenticate Cm yes -causes -.Nm -to send authentication with all requests it -makes. -Authenticated requests causes some servers to handle -requests slightly differently. -The command -.Ic authenticate -causes -.Nm -to display whether or not -it is currently authenticating requests. -.It Ic cooked -Causes output from query commands to be "cooked", so that -variables which are recognized by -.Nm -will have their -values reformatted for human consumption. -Variables which -.Nm -could not decode completely are -marked with a trailing -.Ql \&? . -.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off -With no argument, displays the current debug level. -Otherwise, the debugging level is changed as indicated. -.It Ic delay Op Ar milliseconds -Specify a time interval to be added to timestamps included in -requests which require authentication. -This is used to enable -(unreliable) server reconfiguration over long delay network paths -or between machines whose clocks are unsynchronized. -Actually the -server does not now require timestamps in authenticated requests, -so this command may be obsolete. -Without any arguments, displays the current delay. -.It Ic drefid Op Cm hash Ns | Ns Cm ipv4 -Display refids as IPv4 or hash. -Without any arguments, displays whether refids are shown as IPv4 -addresses or hashes. -.It Ic exit -Exit -.Nm . -.It Ic host Op Ar name -Set the host to which future queries will be sent. -The -.Ar name -may be either a host name or a numeric address. -Without any arguments, displays the current host. -.It Ic hostnames Op Cm yes Ns | Ns Cm no -If -.Cm yes -is specified, host names are printed in -information displays. -If -.Cm no -is specified, numeric -addresses are printed instead. -The default is -.Cm yes , -unless -modified using the command line -.Fl n -switch. -Without any arguments, displays whether host names or numeric addresses -are shown. -.It Ic keyid Op Ar keyid -This command allows the specification of a key number to be -used to authenticate configuration requests. -This must correspond -to the -.Cm controlkey -key number the server has been configured to use for this -purpose. -Without any arguments, displays the current -.Ar keyid . -.It Ic keytype Op Ar digest -Specify the digest algorithm to use for authenticating requests, with default -.Cm MD5 . -If -.Nm -was built with OpenSSL support, and OpenSSL is installed, -.Ar digest -can be any message digest algorithm supported by OpenSSL. -If no argument is given, the current -.Ic keytype Ar digest -algorithm used is displayed. -.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4 -Sets the NTP version number which -.Nm -claims in -packets. -Defaults to 3, and note that mode 6 control messages (and -modes, for that matter) didn't exist in NTP version 1. -There appear -to be no servers left which demand version 1. -With no argument, displays the current NTP version that will be used -when communicating with servers. -.It Ic passwd -This command prompts you to type in a password (which will not -be echoed) which will be used to authenticate configuration -requests. -The password must correspond to the key configured for -use by the NTP server for this purpose if such requests are to be -successful. -.It Ic poll Oo Ar n Oc Op Cm verbose -Poll an NTP server in client mode -.Ar n -times. -Poll not implemented yet. -.It Ic quit -Exit -.Nm . -.It Ic raw -Causes all output from query commands is printed as received -from the remote server. -The only formating/interpretation done on -the data is to transform nonascii data into a printable (but barely -understandable) form. -.It Ic timeout Op Ar milliseconds -Specify a timeout period for responses to server queries. -The -default is about 5000 milliseconds. -Without any arguments, displays the current timeout period. -Note that since -.Nm -retries each query once after a timeout, the total waiting time for -a timeout will be twice the timeout value set. -.It Ic version -Display the version of the -.Nm -program. -.El -.Ss "Control Message Commands" -Association ids are used to identify system, peer and clock variables. -System variables are assigned an association id of zero and system name -space, while each association is assigned a nonzero association id and -peer namespace. -Most control commands send a single message to the server and expect a -single response message. -The exceptions are the -.Ic peers -command, which sends a series of messages, -and the -.Ic mreadlist -and -.Ic mreadvar -commands, which iterate over a range of associations. -.Bl -tag -width "something" -compact -offset indent -.It Ic apeers -Display a list of peers in the form: -.Dl [tally]remote refid assid st t when pool reach delay offset jitter -where the output is just like the -.Ic peers -command except that the -.Cm refid -is displayed in hex format and the association number is also displayed. -.It Ic associations -Display a list of mobilized associations in the form: -.Dl ind assid status conf reach auth condition last_event cnt -.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word" -.It Sy Variable Ta Sy Description -.It Cm ind Ta index on this list -.It Cm assid Ta association id -.It Cm status Ta peer status word -.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral -.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable -.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none -.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&) -.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&) -.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&) -.El -.It Ic authinfo -Display the authentication statistics counters: -time since reset, stored keys, free keys, key lookups, keys not found, -uncached keys, expired keys, encryptions, decryptions. -.It Ic clocklist Op Ar associd -.It Ic cl Op Ar associd -Display all clock variables in the variable list for those associations -supporting a reference clock. -.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,... -.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,... -Display a list of clock variables for those associations supporting a -reference clock. -.It Ic :config Ar "configuration command line" -Send the remainder of the command line, including whitespace, to the -server as a run\-time configuration command in the same format as a line -in the configuration file. -This command is experimental until further notice and clarification. -Authentication is of course required. -.It Ic config\-from\-file Ar filename -Send each line of -.Ar filename -to the server as run\-time configuration commands in the same format as -lines in the configuration file. -This command is experimental until further notice and clarification. -Authentication is required. -.It Ic ifstats -Display status and statistics counters for each local network interface address: -interface number, interface name and address or broadcast, drop, flag, -ttl, mc, received, sent, send failed, peers, uptime. -Authentication is required. -.It Ic iostats -Display network and reference clock I/O statistics: -time since reset, receive buffers, free receive buffers, used receive buffers, -low water refills, dropped packets, ignored packets, received packets, -packets sent, packet send failures, input wakeups, useful input wakeups. -.It Ic kerninfo -Display kernel loop and PPS statistics: -associd, status, pll offset, pll frequency, maximum error, -estimated error, kernel status, pll time constant, precision, -frequency tolerance, pps frequency, pps stability, pps jitter, -calibration interval, calibration cycles, jitter exceeded, -stability exceeded, calibration errors. -As with other ntpq output, times are in milliseconds; very small values -may be shown as exponentials. -The precision value displayed is in milliseconds as well, unlike the -precision system variable. -.It Ic lassociations -Perform the same function as the associations command, except display -mobilized and unmobilized associations, including all clients. -.It Ic lopeers Op Fl 4 Ns | Ns Fl 6 -Display a list of all peers and clients showing -.Cm dstadr -(associated with the given IP version). -.It Ic lpassociations -Display the last obtained list of associations, including all clients. -.It Ic lpeers Op Fl 4 Ns | Ns Fl 6 -Display a list of all peers and clients (associated with the given IP version). -.It Ic monstats -Display monitor facility status, statistics, and limits: -enabled, addresses, peak addresses, maximum addresses, -reclaim above count, reclaim older than, kilobytes, maximum kilobytes. -.It Ic mreadlist Ar associdlo Ar associdhi -.It Ic mrl Ar associdlo Ar associdhi -Perform the same function as the -.Ic readlist -command for a range of association ids. -.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,... -This range may be determined from the list displayed by any -command showing associations. -.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,... -Perform the same function as the -.Ic readvar -command for a range of association ids. -This range may be determined from the list displayed by any -command showing associations. -.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count | -.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder | -.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc -.Xc -Display traffic counts of the most recently seen source addresses -collected and maintained by the monitor facility. -With the exception of -.Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder , -the options filter the list returned by -.Xr ntpd 8 . -The -.Cm limited -and -.Cm kod -options return only entries representing client addresses from which the -last packet received triggered either discarding or a KoD response. -The -.Cm mincount Ns = Ns Ar count -option filters entries representing less than -.Ar count -packets. -The -.Cm laddr Ns = Ns Ar localaddr -option filters entries for packets received on any local address other than -.Ar localaddr . -.Cm resany Ns = Ns Ar hexmask -and -.Cm resall Ns = Ns Ar hexmask -filter entries containing none or less than all, respectively, of the bits in -.Ar hexmask , -which must begin with -.Cm 0x . -The -.Ar sortorder -defaults to -.Cm lstint -and may be -.Cm addr , -.Cm avgint , -.Cm count , -.Cm lstint , -or any of those preceded by -.Ql \&\- -to reverse the sort order. -The output columns are: -.Bl -tag -width "something" -compact -offset indent -.It Column -Description -.It Ic lstint -Interval in seconds between the receipt of the most recent packet from -this address and the completion of the retrieval of the MRU list by -.Nm . -.It Ic avgint -Average interval in s between packets from this address. -.It Ic rstr -Restriction flags associated with this address. -Most are copied unchanged from the matching -.Ic restrict -command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless -the last packet from this address triggered a rate control response. -.It Ic r -Rate control indicator, either -a period, -.Ic L -or -.Ic K -for no rate control response, -rate limiting by discarding, or rate limiting with a KoD response, respectively. -.It Ic m -Packet mode. -.It Ic v -Packet version number. -.It Ic count -Packets received from this address. -.It Ic rport -Source port of last packet from this address. -.It Ic remote address -host or DNS name, numeric address, or address followed by -claimed DNS name which could not be verified in parentheses. -.El -.It Ic opeers Op Fl 4 | Fl 6 -Obtain and print the old\-style list of all peers and clients showing -.Cm dstadr -(associated with the given IP version), -rather than the -.Cm refid . -.It Ic passociations -Perform the same function as the -.Ic associations -command, -except that it uses previously stored data rather than making a new query. -.It Ic peers -Display a list of peers in the form: -.Dl [tally]remote refid st t when pool reach delay offset jitter -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm [tally] -single\-character code indicating current value of the -.Ic select -field of the -.Lk decode.html#peer "peer status word" -.It Cm remote -host name (or IP number) of peer. -The value displayed will be truncated to 15 characters unless the -.Nm -.Fl w -option is given, in which case the full value will be displayed -on the first line, and if too long, -the remaining data will be displayed on the next line. -.It Cm refid -source IP address or -.Lk decode.html#kiss "'kiss code" -.It Cm st -stratum: 0 for local reference clocks, 1 for servers with local -reference clocks, ..., 16 for unsynchronized server clocks -.It Cm t -.Ic u : -unicast or manycast client, -.Ic b : -broadcast or multicast client, -.Ic p : -pool source, -.Ic l : -local (reference clock), -.Ic s : -symmetric (peer), -.Ic A : -manycast server, -.Ic B : -broadcast server, -.Ic M : -multicast server -.It Cm when -time in seconds, minutes, hours, or days since the last packet -was received, or -.Ql \&\- -if a packet has never been received -.It Cm poll -poll interval (s) -.It Cm reach -reach shift register (octal) -.It Cm delay -roundtrip delay -.It Cm offset -offset of server relative to this host -.It Cm jitter -offset RMS error estimate. -.El -.It Ic pstats Ar associd -Display the statistics for the peer with the given -.Ar associd : -associd, status, remote host, local address, time last received, -time until next send, reachability change, packets sent, -packets received, bad authentication, bogus origin, duplicate, -bad dispersion, bad reference time, candidate order. -.It Ic readlist Op Ar associd -.It Ic rl Op Ar associd -Display all system or peer variables. -If the -.Ar associd -is omitted, it is assumed to be zero. -.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ... -.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ... -Display the specified system or peer variables. -If -.Ar associd -is zero, the variables are from the -.Sx System Variables -name space, otherwise they are from the -.Sx Peer Variables -name space. -The -.Ar associd -is required, as the same name can occur in both spaces. -If no -.Ar name -is included, all operative variables in the name space are displayed. -In this case only, if the -.Ar associd -is omitted, it is assumed to be zero. -Multiple names are specified with comma separators and without whitespace. -Note that time values are represented in milliseconds -and frequency values in parts\-per\-million (PPM). -Some NTP timestamps are represented in the format -.Ar YYYY Ns Ar MM Ar DD Ar TTTT , -where -.Ar YYYY -is the year, -.Ar MM -the month of year, -.Ar DD -the day of month and -.Ar TTTT -the time of day. -.It Ic reslist -Display the access control (restrict) list for -.Nm . -Authentication is required. -.It Ic saveconfig Ar filename -Save the current configuration, -including any runtime modifications made by -.Ic :config -or -.Ic config\-from\-file , -to the NTP server host file -.Ar filename . -This command will be rejected by the server unless -.Lk miscopt.html#saveconfigdir "saveconfigdir" -appears in the -.Xr ntpd 8 -configuration file. -.Ar filename -can use -.Xr date 1 -format specifiers to substitute the current date and time, for -example, -.D1 Ic saveconfig Pa ntp\-%Y%m%d\-%H%M%S.conf . -The filename used is stored in system variable -.Cm savedconfig . -Authentication is required. -.It Ic sysinfo -Display system operational summary: -associd, status, system peer, system peer mode, leap indicator, -stratum, log2 precision, root delay, root dispersion, -reference id, reference time, system jitter, clock jitter, -clock wander, broadcast delay, symm. auth. delay. -.It Ic sysstats -Display system uptime and packet counts maintained in the -protocol module: -uptime, sysstats reset, packets received, current version, -older version, bad length or format, authentication failed, -declined, restricted, rate limited, KoD responses, -processed for time. -.It Ic timerstats -Display interval timer counters: -time since reset, timer overruns, calls to transmit. -.It Ic writelist Ar associd -Set all system or peer variables included in the variable list. -.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ... -Set the specified variables in the variable list. -If the -.Ar associd -is zero, the variables are from the -.Sx System Variables -name space, otherwise they are from the -.Sx Peer Variables -name space. -The -.Ar associd -is required, as the same name can occur in both spaces. -Authentication is required. -.El -.Ss Status Words and Kiss Codes -The current state of the operating program is shown -in a set of status words -maintained by the system. -Status information is also available on a per\-association basis. -These words are displayed by the -.Ic readlist -and -.Ic associations -commands both in hexadecimal and in decoded short tip strings. -The codes, tips and short explanations are documented on the -.Lk decode.html "Event Messages and Status Words" -page. -The page also includes a list of system and peer messages, -the code for the latest of which is included in the status word. -.Pp -Information resulting from protocol machine state transitions -is displayed using an informal set of ASCII strings called -.Lk decode.html#kiss "kiss codes" . -The original purpose was for kiss\-o'\-death (KoD) packets -sent by the server to advise the client of an unusual condition. -They are now displayed, when appropriate, -in the reference identifier field in various billboards. -.Ss System Variables -The following system variables appear in the -.Ic readlist -billboard. -Not all variables are displayed in some configurations. -.Pp -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm status -.Lk decode.html#sys "system status word" -.It Cm version -NTP software version and build time -.It Cm processor -hardware platform and version -.It Cm system -operating system and version -.It Cm leap -leap warning indicator (0\-3) -.It Cm stratum -stratum (1\-15) -.It Cm precision -precision (log2 s) -.It Cm rootdelay -total roundtrip delay to the primary reference clock -.It Cm rootdisp -total dispersion to the primary reference clock -.It Cm refid -reference id or -.Lk decode.html#kiss "kiss code" -.It Cm reftime -reference time -.It Ic clock -date and time of day -.It Cm peer -system peer association id -.It Cm tc -time constant and poll exponent (log2 s) (3\-17) -.It Cm mintc -minimum time constant (log2 s) (3\-10) -.It Cm offset -combined offset of server relative to this host -.It Cm frequency -frequency drift (PPM) relative to hardware clock -.It Cm sys_jitter -combined system jitter -.It Cm clk_wander -clock frequency wander (PPM) -.It Cm clk_jitter -clock jitter -.It Cm tai -TAI\-UTC offset (s) -.It Cm leapsec -NTP seconds when the next leap second is/was inserted -.It Cm expire -NTP seconds when the NIST leapseconds file expires -.El -The jitter and wander statistics are exponentially\-weighted RMS averages. -The system jitter is defined in the NTPv4 specification; -the clock jitter statistic is computed by the clock discipline module. -.Pp -When the NTPv4 daemon is compiled with the OpenSSL software library, -additional system variables are displayed, -including some or all of the following, -depending on the particular Autokey dance: -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm host -Autokey host name for this host -.It Cm ident -Autokey group name for this host -.It Cm flags -host flags (see Autokey specification) -.It Cm digest -OpenSSL message digest algorithm -.It Cm signature -OpenSSL digest/signature scheme -.It Cm update -NTP seconds at last signature update -.It Cm cert -certificate subject, issuer and certificate flags -.It Cm until -NTP seconds when the certificate expires -.El -.Ss Peer Variables -The following peer variables appear in the -.Ic readlist -billboard for each association. -Not all variables are displayed in some configurations. -.Pp -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm associd -association id -.It Cm status -.Lk decode.html#peer "peer status word" -.It Cm srcadr -source (remote) IP address -.It Cm srcport -source (remote) port -.It Cm dstadr -destination (local) IP address -.It Cm dstport -destination (local) port -.It Cm leap -leap indicator (0\-3) -.It Cm stratum -stratum (0\-15) -.It Cm precision -precision (log2 s) -.It Cm rootdelay -total roundtrip delay to the primary reference clock -.It Cm rootdisp -total root dispersion to the primary reference clock -.It Cm refid -reference id or -.Lk decode.html#kiss "kiss code" -.It Cm reftime -reference time -.It Cm rec -last packet received time -.It Cm reach -reach register (octal) -.It Cm unreach -unreach counter -.It Cm hmode -host mode (1\-6) -.It Cm pmode -peer mode (1\-5) -.It Cm hpoll -host poll exponent (log2 s) (3\-17) -.It Cm ppoll -peer poll exponent (log2 s) (3\-17) -.It Cm headway -headway (see -.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" ) -.It Cm flash -.Lk decode.html#flash "flash status word" -.It Cm keyid -symmetric key id -.It Cm offset -filter offset -.It Cm delay -filter delay -.It Cm dispersion -filter dispersion -.It Cm jitter -filter jitter -.It Cm bias -unicast/broadcast bias -.It Cm xleave -interleave delay (see -.Lk xleave.html "NTP Interleaved Modes" ) -.El -The -.Cm bias -variable is calculated when the first broadcast packet is received -after the calibration volley. -It represents the offset of the broadcast subgraph relative to the -unicast subgraph. -The -.Cm xleave -variable appears only for the interleaved symmetric and interleaved modes. -It represents the internal queuing, buffering and transmission delays -for the preceding packet. -.Pp -When the NTPv4 daemon is compiled with the OpenSSL software library, -additional peer variables are displayed, including the following: -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm flags -peer flags (see Autokey specification) -.It Cm host -Autokey server name -.It Cm flags -peer flags (see Autokey specification) -.It Cm signature -OpenSSL digest/signature scheme -.It Cm initsequence -initial key id -.It Cm initkey -initial key index -.It Cm timestamp -Autokey signature timestamp -.It Cm ident -Autokey group name for this association -.El -.Ss Clock Variables -The following clock variables appear in the -.Ic clocklist -billboard for each association with a reference clock. -Not all variables are displayed in some configurations. -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm associd -association id -.It Cm status -.Lk decode.html#clock "clock status word" -.It Cm device -device description -.It Cm timecode -ASCII time code string (specific to device) -.It Cm poll -poll messages sent -.It Cm noreply -no reply -.It Cm badformat -bad format -.It Cm baddata -bad date or time -.It Cm fudgetime1 -fudge time 1 -.It Cm fudgetime2 -fudge time 2 -.It Cm stratum -driver stratum -.It Cm refid -driver reference id -.It Cm flags -driver flags -.El +#! /bin/cat .Sh "OPTIONS" .Bl -tag .It Fl 4 , Fl \-ipv4 diff --git a/ntpq/ntpq.man.in b/ntpq/ntpq.man.in index f14c575ae..2714e3808 100644 --- a/ntpq/ntpq.man.in +++ b/ntpq/ntpq.man.in @@ -10,11 +10,11 @@ .ds B-Font B .ds I-Font I .ds R-Font R -.TH ntpq @NTPQ_MS@ "23 Jun 2020" "4.2.8p15" "User Commands" +.TH ntpq @NTPQ_MS@ "26 Jun 2022" "4.2.8p15" "User Commands" .\" .\" EDIT THIS FILE WITH CAUTION (in-mem file) .\" -.\" It has been AutoGen-ed June 23, 2020 at 02:20:56 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 26, 2022 at 05:34:20 AM by AutoGen 5.18.5 .\" From the definitions ntpq-opts.def .\" and the template file agman-cmd.tpl .SH NAME @@ -31,1395 +31,7 @@ .ne 2 .SH DESCRIPTION -.sp \n(Ppu -.ne 2 - -The -\f\*[B-Font]ntpq\fP -utility program is used to query NTP servers to monitor NTP operations -and performance, requesting -information about current state and/or changes in that state. -The program may be run either in interactive mode or controlled using -command line arguments. -Requests to read and write arbitrary -variables can be assembled, with raw and pretty-printed output -options being available. -The -\f\*[B-Font]ntpq\fP -utility can also obtain and print a -list of peers in a common format by sending multiple queries to the -server. -.sp \n(Ppu -.ne 2 - -If one or more request options is included on the command line -when -\f\*[B-Font]ntpq\fP -is executed, each of the requests will be sent -to the NTP servers running on each of the hosts given as command -line arguments, or on localhost by default. -If no request options -are given, -\f\*[B-Font]ntpq\fP -will attempt to read commands from the -standard input and execute these on the NTP server running on the -first host given on the command line, again defaulting to localhost -when no other host is specified. -The -\f\*[B-Font]ntpq\fP -utility will prompt for -commands if the standard input is a terminal device. -.sp \n(Ppu -.ne 2 - -\f\*[B-Font]ntpq\fP -uses NTP mode 6 packets to communicate with the -NTP server, and hence can be used to query any compatible server on -the network which permits it. -Note that since NTP is a UDP protocol -this communication will be somewhat unreliable, especially over -large distances in terms of network topology. -The -\f\*[B-Font]ntpq\fP -utility makes -one attempt to retransmit requests, and will time requests out if -the remote host is not heard from within a suitable timeout -time. -.sp \n(Ppu -.ne 2 - -Note that in contexts where a host name is expected, a -\f\*[B-Font]\-4\f[] -qualifier preceding the host name forces resolution to the IPv4 -namespace, while a -\f\*[B-Font]\-6\f[] -qualifier forces resolution to the IPv6 namespace. -For examples and usage, see the -\*[Lq]NTP Debugging Techniques\*[Rq] -page. -.sp \n(Ppu -.ne 2 - -Specifying a -command line option other than -\f\*[B-Font]\-i\f[] -or -\f\*[B-Font]\-n\f[] -will -cause the specified query (queries) to be sent to the indicated -host(s) immediately. -Otherwise, -\f\*[B-Font]ntpq\fP -will attempt to read -interactive format commands from the standard input. -.SS "Internal Commands" -.sp \n(Ppu -.ne 2 - -Interactive format commands consist of a keyword followed by zero -to four arguments. -Only enough characters of the full keyword to -uniquely identify the command need be typed. -.sp \n(Ppu -.ne 2 - -A -number of interactive format commands are executed entirely within -the -\f\*[B-Font]ntpq\fP -utility itself and do not result in NTP -requests being sent to a server. -These are described following. -.TP 15 -.NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command\f[]] -.br -.ns -.TP 15 -.NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command\f[]] -A -\[oq]\&?\[cq] -by itself will print a list of all the commands -known to -\f\*[B-Font]ntpq\fP. -A -\[oq]\&?\[cq] -followed by a command name will print function and usage -information about the command. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][,...] -.br -.ns -.TP 15 -.NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]name\f[][,...] -.br -.ns -.TP 15 -.NOP \f\*[B-Font]clearvars\f[] -.br -.ns -.TP 15 -.NOP \f\*[B-Font]showvars\f[] -The arguments to this command consist of a list of -items of the form -\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]], -where the -.NOP \&=\f\*[I-Font]value\f[] -is ignored, and can be omitted, -in requests to the server to read variables. -The -\f\*[B-Font]ntpq\fP -utility maintains an internal list in which data to be included in -messages can be assembled, and displayed or set using the -\f\*[B-Font]readlist\f[] -and -\f\*[B-Font]writelist\f[] -commands described below. -The -\f\*[B-Font]addvars\f[] -command allows variables and their optional values to be added to -the list. -If more than one variable is to be added, the list should -be comma-separated and not contain white space. -The -\f\*[B-Font]rmvars\f[] -command can be used to remove individual variables from the list, -while the -\f\*[B-Font]clearvars\f[] -command removes all variables from the -list. -The -\f\*[B-Font]showvars\f[] -command displays the current list of optional variables. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]authenticate\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]] -Normally -\f\*[B-Font]ntpq\fP -does not authenticate requests unless -they are write requests. -The command -\f\*[B-Font]authenticate\f[] \f\*[B-Font]yes\f[] -causes -\f\*[B-Font]ntpq\fP -to send authentication with all requests it -makes. -Authenticated requests causes some servers to handle -requests slightly differently. -The command -\f\*[B-Font]authenticate\f[] -causes -\f\*[B-Font]ntpq\fP -to display whether or not -it is currently authenticating requests. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]cooked\f[] -Causes output from query commands to be "cooked", so that -variables which are recognized by -\f\*[B-Font]ntpq\fP -will have their -values reformatted for human consumption. -Variables which -\f\*[B-Font]ntpq\fP -could not decode completely are -marked with a trailing -\[oq]\&?\[cq]. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[]|\f\*[B-Font]less\f[]|\f\*[B-Font]off\f[]] -With no argument, displays the current debug level. -Otherwise, the debugging level is changed as indicated. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]delay\f[] [\f\*[I-Font]milliseconds\f[]] -Specify a time interval to be added to timestamps included in -requests which require authentication. -This is used to enable -(unreliable) server reconfiguration over long delay network paths -or between machines whose clocks are unsynchronized. -Actually the -server does not now require timestamps in authenticated requests, -so this command may be obsolete. -Without any arguments, displays the current delay. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]drefid\f[] [\f\*[B-Font]hash\f[]|\f\*[B-Font]ipv4\f[]] -Display refids as IPv4 or hash. -Without any arguments, displays whether refids are shown as IPv4 -addresses or hashes. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]exit\f[] -Exit -\f\*[B-Font]ntpq\fP. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]host\f[] [\f\*[I-Font]name\f[]] -Set the host to which future queries will be sent. -The -\f\*[I-Font]name\f[] -may be either a host name or a numeric address. -Without any arguments, displays the current host. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[]|\f\*[B-Font]no\f[]] -If -\f\*[B-Font]yes\f[] -is specified, host names are printed in -information displays. -If -\f\*[B-Font]no\f[] -is specified, numeric -addresses are printed instead. -The default is -\f\*[B-Font]yes\f[], -unless -modified using the command line -\f\*[B-Font]\-n\f[] -switch. -Without any arguments, displays whether host names or numeric addresses -are shown. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]keyid\f[] [\f\*[I-Font]keyid\f[]] -This command allows the specification of a key number to be -used to authenticate configuration requests. -This must correspond -to the -\f\*[B-Font]controlkey\f[] -key number the server has been configured to use for this -purpose. -Without any arguments, displays the current -\f\*[I-Font]keyid\f[]. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]keytype\f[] [\f\*[I-Font]digest\f[]] -Specify the digest algorithm to use for authenticating requests, with default -\f\*[B-Font]MD5\f[]. -If -\f\*[B-Font]ntpq\fP -was built with OpenSSL support, and OpenSSL is installed, -\f\*[I-Font]digest\f[] -can be any message digest algorithm supported by OpenSSL. -If no argument is given, the current -\f\*[B-Font]keytype\f[] \f\*[I-Font]digest\f[] -algorithm used is displayed. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]ntpversion\f[] [\f\*[B-Font]1\f[]|\f\*[B-Font]2\f[]|\f\*[B-Font]3\f[]|\f\*[B-Font]4\f[]] -Sets the NTP version number which -\f\*[B-Font]ntpq\fP -claims in -packets. -Defaults to 3, and note that mode 6 control messages (and -modes, for that matter) didn't exist in NTP version 1. -There appear -to be no servers left which demand version 1. -With no argument, displays the current NTP version that will be used -when communicating with servers. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]passwd\f[] -This command prompts you to type in a password (which will not -be echoed) which will be used to authenticate configuration -requests. -The password must correspond to the key configured for -use by the NTP server for this purpose if such requests are to be -successful. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]poll\f[] [\f\*[I-Font]n\f[]] [\f\*[B-Font]verbose\f[]] -Poll an NTP server in client mode -\f\*[I-Font]n\f[] -times. -Poll not implemented yet. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]quit\f[] -Exit -\f\*[B-Font]ntpq\fP. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]raw\f[] -Causes all output from query commands is printed as received -from the remote server. -The only formating/interpretation done on -the data is to transform nonascii data into a printable (but barely -understandable) form. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]timeout\f[] [\f\*[I-Font]milliseconds\f[]] -Specify a timeout period for responses to server queries. -The -default is about 5000 milliseconds. -Without any arguments, displays the current timeout period. -Note that since -\f\*[B-Font]ntpq\fP -retries each query once after a timeout, the total waiting time for -a timeout will be twice the timeout value set. -.br -.ns -.TP 15 -.NOP \f\*[B-Font]version\f[] -Display the version of the -\f\*[B-Font]ntpq\fP -program. -.PP -.SS "Control Message Commands" -Association ids are used to identify system, peer and clock variables. -System variables are assigned an association id of zero and system name -space, while each association is assigned a nonzero association id and -peer namespace. -Most control commands send a single message to the server and expect a -single response message. -The exceptions are the -\f\*[B-Font]peers\f[] -command, which sends a series of messages, -and the -\f\*[B-Font]mreadlist\f[] -and -\f\*[B-Font]mreadvar\f[] -commands, which iterate over a range of associations. -.TP 10 -.NOP \f\*[B-Font]apeers\f[] -Display a list of peers in the form: -.Dl [tally]remote refid assid st t when pool reach delay offset jitter -where the output is just like the -\f\*[B-Font]peers\f[] -command except that the -\f\*[B-Font]refid\f[] -is displayed in hex format and the association number is also displayed. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]associations\f[] -Display a list of mobilized associations in the form: -.Dl ind assid status conf reach auth condition last_event cnt -.RS -.IP \fB\(bu\fP 2 -.IP \fB\(bu\fP 2 \f\*[B-Font]ind\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]index\f[] \f\*[B-Font]on\f[] \f\*[B-Font]this\f[] \f\*[B-Font]list\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]assid\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]association\f[] \f\*[B-Font]id\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]status\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]conf\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]persistent,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]ephemeral\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]reach\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]yes\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]reachable,\f[] \f\*[B-Font]no\f[]: \f\*[B-Font]No\f[] \f\*[B-Font]unreachable\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]auth\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]ok\f[], \f\*[B-Font]yes\f[], \f\*[B-Font]bad\f[] \f\*[B-Font]No\f[] \f\*[B-Font]and\f[] \f\*[B-Font]none\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]condition\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]selection\f[] \f\*[B-Font]status\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]select\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]last_event\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]report\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]event\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[] -.IP \fB\(bu\fP 2 \f\*[B-Font]cnt\f[] \f\*[B-Font]Ta\f[] \f\*[B-Font]event\f[] \f\*[B-Font]count\f[] \f\*[B-Font]\&(see\f[] \f\*[B-Font]the\f[] \f\*[B-Font]count\f[] \f\*[B-Font]No\f[] \f\*[B-Font]field\f[] \f\*[B-Font]of\f[] \f\*[B-Font]the\f[] \f\*[B-Font]peer\f[] \f\*[B-Font]status\f[] \f\*[B-Font]word\&)\f[] -.RE -.br -.ns -.TP 10 -.NOP \f\*[B-Font]authinfo\f[] -Display the authentication statistics counters: -time since reset, stored keys, free keys, key lookups, keys not found, -uncached keys, expired keys, encryptions, decryptions. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clocklist\f[] [\f\*[I-Font]associd\f[]] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]cl\f[] [\f\*[I-Font]associd\f[]] -Display all clock variables in the variable list for those associations -supporting a reference clock. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clockvar\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]cv\f[] [\f\*[I-Font]associd\f[]] [\f\*[I-Font]name\f[][\&=\f\*[I-Font]value\f[]][] ,...] -Display a list of clock variables for those associations supporting a -reference clock. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]:config\f[] \f\*[I-Font]configuration command line\f[] -Send the remainder of the command line, including whitespace, to the -server as a run-time configuration command in the same format as a line -in the configuration file. -This command is experimental until further notice and clarification. -Authentication is of course required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[] -Send each line of -\f\*[I-Font]filename\f[] -to the server as run-time configuration commands in the same format as -lines in the configuration file. -This command is experimental until further notice and clarification. -Authentication is required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]ifstats\f[] -Display status and statistics counters for each local network interface address: -interface number, interface name and address or broadcast, drop, flag, -ttl, mc, received, sent, send failed, peers, uptime. -Authentication is required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]iostats\f[] -Display network and reference clock I/O statistics: -time since reset, receive buffers, free receive buffers, used receive buffers, -low water refills, dropped packets, ignored packets, received packets, -packets sent, packet send failures, input wakeups, useful input wakeups. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]kerninfo\f[] -Display kernel loop and PPS statistics: -associd, status, pll offset, pll frequency, maximum error, -estimated error, kernel status, pll time constant, precision, -frequency tolerance, pps frequency, pps stability, pps jitter, -calibration interval, calibration cycles, jitter exceeded, -stability exceeded, calibration errors. -As with other ntpq output, times are in milliseconds; very small values -may be shown as exponentials. -The precision value displayed is in milliseconds as well, unlike the -precision system variable. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lassociations\f[] -Perform the same function as the associations command, except display -mobilized and unmobilized associations, including all clients. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]] -Display a list of all peers and clients showing -\f\*[B-Font]dstadr\f[] -(associated with the given IP version). -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lpassociations\f[] -Display the last obtained list of associations, including all clients. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[]|\f\*[B-Font]\-6\f[]] -Display a list of all peers and clients (associated with the given IP version). -.br -.ns -.TP 10 -.NOP \f\*[B-Font]monstats\f[] -Display monitor facility status, statistics, and limits: -enabled, addresses, peak addresses, maximum addresses, -reclaim above count, reclaim older than, kilobytes, maximum kilobytes. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mreadlist\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mrl\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] -Perform the same function as the -\f\*[B-Font]readlist\f[] -command for a range of association ids. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mreadvar\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...] -This range may be determined from the list displayed by any -command showing associations. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mrv\f[] \f\*[I-Font]associdlo\f[] \f\*[I-Font]associdhi\f[] [\f\*[I-Font]name\f[]][,...] -Perform the same function as the -\f\*[B-Font]readvar\f[] -command for a range of association ids. -This range may be determined from the list displayed by any -command showing associations. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mrulist\f[] [\f\*[B-Font]limited\f[] | \f\*[B-Font]kod\f[] | \f\*[B-Font]mincount\f[]\&=\f\*[I-Font]count\f[] | \f\*[B-Font]laddr\f[]\&=\f\*[I-Font]localaddr\f[] | \f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[] | \f\*[B-Font]resany\f[]\&=\f\*[I-Font]hexmask\f[] | \f\*[B-Font]resall\f[]\&=\f\*[I-Font]hexmask\f[]] -Display traffic counts of the most recently seen source addresses -collected and maintained by the monitor facility. -With the exception of -\f\*[B-Font]sort\f[]\&=[\&-]\f\*[I-Font]sortorder\f[], -the options filter the list returned by -\fCntpd\f[]\fR(8)\f[]. -The -\f\*[B-Font]limited\f[] -and -\f\*[B-Font]kod\f[] -options return only entries representing client addresses from which the -last packet received triggered either discarding or a KoD response. -The -\f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[] -option filters entries representing less than -\f\*[I-Font]count\f[] -packets. -The -\f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[] -option filters entries for packets received on any local address other than -\f\*[I-Font]localaddr\f[]. -\f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[] -and -\f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[] -filter entries containing none or less than all, respectively, of the bits in -\f\*[I-Font]hexmask\f[], -which must begin with -\f\*[B-Font]0x\f[]. -The -\f\*[I-Font]sortorder\f[] -defaults to -\f\*[B-Font]lstint\f[] -and may be -\f\*[B-Font]addr\f[], -\f\*[B-Font]avgint\f[], -\f\*[B-Font]count\f[], -\f\*[B-Font]lstint\f[], -or any of those preceded by -\[oq]\&-\[cq] -to reverse the sort order. -The output columns are: -.RS -.TP 10 -.NOP Column -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]lstint\f[] -Interval in seconds between the receipt of the most recent packet from -this address and the completion of the retrieval of the MRU list by -\f\*[B-Font]ntpq\fP. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]avgint\f[] -Average interval in s between packets from this address. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rstr\f[] -Restriction flags associated with this address. -Most are copied unchanged from the matching -\f\*[B-Font]restrict\f[] -command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless -the last packet from this address triggered a rate control response. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]r\f[] -Rate control indicator, either -a period, -\f\*[B-Font]L\f[] -or -\f\*[B-Font]K\f[] -for no rate control response, -rate limiting by discarding, or rate limiting with a KoD response, respectively. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]m\f[] -Packet mode. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]v\f[] -Packet version number. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]count\f[] -Packets received from this address. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rport\f[] -Source port of last packet from this address. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[] -host or DNS name, numeric address, or address followed by -claimed DNS name which could not be verified in parentheses. -.RE -.br -.ns -.TP 10 -.NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]] -Obtain and print the old-style list of all peers and clients showing -\f\*[B-Font]dstadr\f[] -(associated with the given IP version), -rather than the -\f\*[B-Font]refid\f[]. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]passociations\f[] -Perform the same function as the -\f\*[B-Font]associations\f[] -command, -except that it uses previously stored data rather than making a new query. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]peers\f[] -Display a list of peers in the form: -.Dl [tally]remote refid st t when pool reach delay offset jitter -.RS -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font][tally]\f[] -single-character code indicating current value of the -\f\*[B-Font]select\f[] -field of the -.Lk decode.html#peer "peer status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]remote\f[] -host name (or IP number) of peer. -The value displayed will be truncated to 15 characters unless the -\f\*[B-Font]ntpq\fP -\f\*[B-Font]\-w\f[] -option is given, in which case the full value will be displayed -on the first line, and if too long, -the remaining data will be displayed on the next line. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]refid\f[] -source IP address or -.Lk decode.html#kiss "'kiss code" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]st\f[] -stratum: 0 for local reference clocks, 1 for servers with local -reference clocks, ..., 16 for unsynchronized server clocks -.br -.ns -.TP 10 -.NOP \f\*[B-Font]t\f[] -\f\*[B-Font]u\f[]: -unicast or manycast client, -\f\*[B-Font]b\f[]: -broadcast or multicast client, -\f\*[B-Font]p\f[]: -pool source, -\f\*[B-Font]l\f[]: -local (reference clock), -\f\*[B-Font]s\f[]: -symmetric (peer), -\f\*[B-Font]A\f[]: -manycast server, -\f\*[B-Font]B\f[]: -broadcast server, -\f\*[B-Font]M\f[]: -multicast server -.br -.ns -.TP 10 -.NOP \f\*[B-Font]when\f[] -time in seconds, minutes, hours, or days since the last packet -was received, or -\[oq]\&-\[cq] -if a packet has never been received -.br -.ns -.TP 10 -.NOP \f\*[B-Font]poll\f[] -poll interval (s) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reach\f[] -reach shift register (octal) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]delay\f[] -roundtrip delay -.br -.ns -.TP 10 -.NOP \f\*[B-Font]offset\f[] -offset of server relative to this host -.br -.ns -.TP 10 -.NOP \f\*[B-Font]jitter\f[] -offset RMS error estimate. -.RE -.br -.ns -.TP 10 -.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]associd\f[] -Display the statistics for the peer with the given -\f\*[I-Font]associd\f[]: -associd, status, remote host, local address, time last received, -time until next send, reachability change, packets sent, -packets received, bad authentication, bogus origin, duplicate, -bad dispersion, bad reference time, candidate order. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]readlist\f[] [\f\*[I-Font]associd\f[]] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rl\f[] [\f\*[I-Font]associd\f[]] -Display all system or peer variables. -If the -\f\*[I-Font]associd\f[] -is omitted, it is assumed to be zero. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]readvar\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]] -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rv\f[] [\f\*[I-Font]associd\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]] -Display the specified system or peer variables. -If -\f\*[I-Font]associd\f[] -is zero, the variables are from the -\fISystem\f[] \fIVariables\f[] -name space, otherwise they are from the -\fIPeer\f[] \fIVariables\f[] -name space. -The -\f\*[I-Font]associd\f[] -is required, as the same name can occur in both spaces. -If no -\f\*[I-Font]name\f[] -is included, all operative variables in the name space are displayed. -In this case only, if the -\f\*[I-Font]associd\f[] -is omitted, it is assumed to be zero. -Multiple names are specified with comma separators and without whitespace. -Note that time values are represented in milliseconds -and frequency values in parts-per-million (PPM). -Some NTP timestamps are represented in the format -\f\*[I-Font]YYYY\f[]\f\*[I-Font]MM\f[] \f\*[I-Font]DD\f[] \f\*[I-Font]TTTT\f[], -where -\f\*[I-Font]YYYY\f[] -is the year, -\f\*[I-Font]MM\f[] -the month of year, -\f\*[I-Font]DD\f[] -the day of month and -\f\*[I-Font]TTTT\f[] -the time of day. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reslist\f[] -Display the access control (restrict) list for -\f\*[B-Font]ntpq\fP. -Authentication is required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[] -Save the current configuration, -including any runtime modifications made by -\f\*[B-Font]:config\f[] -or -\f\*[B-Font]config-from-file\f[], -to the NTP server host file -\f\*[I-Font]filename\f[]. -This command will be rejected by the server unless -.Lk miscopt.html#saveconfigdir "saveconfigdir" -appears in the -\fCntpd\f[]\fR(8)\f[] -configuration file. -\f\*[I-Font]filename\f[] -can use -\fCdate\f[]\fR(1)\f[] -format specifiers to substitute the current date and time, for -example, -.in +4 -\f\*[B-Font]saveconfig\f[] \fIntp-%Y%m%d-%H%M%S.conf\f[]. -.in -4 -The filename used is stored in system variable -\f\*[B-Font]savedconfig\f[]. -Authentication is required. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]sysinfo\f[] -Display system operational summary: -associd, status, system peer, system peer mode, leap indicator, -stratum, log2 precision, root delay, root dispersion, -reference id, reference time, system jitter, clock jitter, -clock wander, broadcast delay, symm. auth. delay. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]sysstats\f[] -Display system uptime and packet counts maintained in the -protocol module: -uptime, sysstats reset, packets received, current version, -older version, bad length or format, authentication failed, -declined, restricted, rate limited, KoD responses, -processed for time. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]timerstats\f[] -Display interval timer counters: -time since reset, timer overruns, calls to transmit. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]associd\f[] -Set all system or peer variables included in the variable list. -.br -.ns -.TP 10 -.NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]associd\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...] -Set the specified variables in the variable list. -If the -\f\*[I-Font]associd\f[] -is zero, the variables are from the -\fISystem\f[] \fIVariables\f[] -name space, otherwise they are from the -\fIPeer\f[] \fIVariables\f[] -name space. -The -\f\*[I-Font]associd\f[] -is required, as the same name can occur in both spaces. -Authentication is required. -.PP -.SS Status Words and Kiss Codes -The current state of the operating program is shown -in a set of status words -maintained by the system. -Status information is also available on a per-association basis. -These words are displayed by the -\f\*[B-Font]readlist\f[] -and -\f\*[B-Font]associations\f[] -commands both in hexadecimal and in decoded short tip strings. -The codes, tips and short explanations are documented on the -.Lk decode.html "Event Messages and Status Words" -page. -The page also includes a list of system and peer messages, -the code for the latest of which is included in the status word. -.sp \n(Ppu -.ne 2 - -Information resulting from protocol machine state transitions -is displayed using an informal set of ASCII strings called -.Lk decode.html#kiss "kiss codes" . -The original purpose was for kiss-o'-death (KoD) packets -sent by the server to advise the client of an unusual condition. -They are now displayed, when appropriate, -in the reference identifier field in various billboards. -.SS System Variables -The following system variables appear in the -\f\*[B-Font]readlist\f[] -billboard. -Not all variables are displayed in some configurations. -.sp \n(Ppu -.ne 2 - -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]status\f[] -.Lk decode.html#sys "system status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]version\f[] -NTP software version and build time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]processor\f[] -hardware platform and version -.br -.ns -.TP 10 -.NOP \f\*[B-Font]system\f[] -operating system and version -.br -.ns -.TP 10 -.NOP \f\*[B-Font]leap\f[] -leap warning indicator (0-3) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]stratum\f[] -stratum (1-15) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]precision\f[] -precision (log2 s) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rootdelay\f[] -total roundtrip delay to the primary reference clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rootdisp\f[] -total dispersion to the primary reference clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]refid\f[] -reference id or -.Lk decode.html#kiss "kiss code" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reftime\f[] -reference time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clock\f[] -date and time of day -.br -.ns -.TP 10 -.NOP \f\*[B-Font]peer\f[] -system peer association id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]tc\f[] -time constant and poll exponent (log2 s) (3-17) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]mintc\f[] -minimum time constant (log2 s) (3-10) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]offset\f[] -combined offset of server relative to this host -.br -.ns -.TP 10 -.NOP \f\*[B-Font]frequency\f[] -frequency drift (PPM) relative to hardware clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]sys_jitter\f[] -combined system jitter -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clk_wander\f[] -clock frequency wander (PPM) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]clk_jitter\f[] -clock jitter -.br -.ns -.TP 10 -.NOP \f\*[B-Font]tai\f[] -TAI-UTC offset (s) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]leapsec\f[] -NTP seconds when the next leap second is/was inserted -.br -.ns -.TP 10 -.NOP \f\*[B-Font]expire\f[] -NTP seconds when the NIST leapseconds file expires -.PP -The jitter and wander statistics are exponentially-weighted RMS averages. -The system jitter is defined in the NTPv4 specification; -the clock jitter statistic is computed by the clock discipline module. -.sp \n(Ppu -.ne 2 - -When the NTPv4 daemon is compiled with the OpenSSL software library, -additional system variables are displayed, -including some or all of the following, -depending on the particular Autokey dance: -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]host\f[] -Autokey host name for this host -.br -.ns -.TP 10 -.NOP \f\*[B-Font]ident\f[] -Autokey group name for this host -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flags\f[] -host flags (see Autokey specification) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]digest\f[] -OpenSSL message digest algorithm -.br -.ns -.TP 10 -.NOP \f\*[B-Font]signature\f[] -OpenSSL digest/signature scheme -.br -.ns -.TP 10 -.NOP \f\*[B-Font]update\f[] -NTP seconds at last signature update -.br -.ns -.TP 10 -.NOP \f\*[B-Font]cert\f[] -certificate subject, issuer and certificate flags -.br -.ns -.TP 10 -.NOP \f\*[B-Font]until\f[] -NTP seconds when the certificate expires -.PP -.SS Peer Variables -The following peer variables appear in the -\f\*[B-Font]readlist\f[] -billboard for each association. -Not all variables are displayed in some configurations. -.sp \n(Ppu -.ne 2 - -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]associd\f[] -association id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]status\f[] -.Lk decode.html#peer "peer status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]srcadr\f[] -source (remote) IP address -.br -.ns -.TP 10 -.NOP \f\*[B-Font]srcport\f[] -source (remote) port -.br -.ns -.TP 10 -.NOP \f\*[B-Font]dstadr\f[] -destination (local) IP address -.br -.ns -.TP 10 -.NOP \f\*[B-Font]dstport\f[] -destination (local) port -.br -.ns -.TP 10 -.NOP \f\*[B-Font]leap\f[] -leap indicator (0-3) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]stratum\f[] -stratum (0-15) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]precision\f[] -precision (log2 s) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rootdelay\f[] -total roundtrip delay to the primary reference clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rootdisp\f[] -total root dispersion to the primary reference clock -.br -.ns -.TP 10 -.NOP \f\*[B-Font]refid\f[] -reference id or -.Lk decode.html#kiss "kiss code" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reftime\f[] -reference time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]rec\f[] -last packet received time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]reach\f[] -reach register (octal) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]unreach\f[] -unreach counter -.br -.ns -.TP 10 -.NOP \f\*[B-Font]hmode\f[] -host mode (1-6) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]pmode\f[] -peer mode (1-5) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]hpoll\f[] -host poll exponent (log2 s) (3-17) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]ppoll\f[] -peer poll exponent (log2 s) (3-17) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]headway\f[] -headway (see -.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" ) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flash\f[] -.Lk decode.html#flash "flash status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]keyid\f[] -symmetric key id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]offset\f[] -filter offset -.br -.ns -.TP 10 -.NOP \f\*[B-Font]delay\f[] -filter delay -.br -.ns -.TP 10 -.NOP \f\*[B-Font]dispersion\f[] -filter dispersion -.br -.ns -.TP 10 -.NOP \f\*[B-Font]jitter\f[] -filter jitter -.br -.ns -.TP 10 -.NOP \f\*[B-Font]bias\f[] -unicast/broadcast bias -.br -.ns -.TP 10 -.NOP \f\*[B-Font]xleave\f[] -interleave delay (see -.Lk xleave.html "NTP Interleaved Modes" ) -.PP -The -\f\*[B-Font]bias\f[] -variable is calculated when the first broadcast packet is received -after the calibration volley. -It represents the offset of the broadcast subgraph relative to the -unicast subgraph. -The -\f\*[B-Font]xleave\f[] -variable appears only for the interleaved symmetric and interleaved modes. -It represents the internal queuing, buffering and transmission delays -for the preceding packet. -.sp \n(Ppu -.ne 2 - -When the NTPv4 daemon is compiled with the OpenSSL software library, -additional peer variables are displayed, including the following: -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flags\f[] -peer flags (see Autokey specification) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]host\f[] -Autokey server name -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flags\f[] -peer flags (see Autokey specification) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]signature\f[] -OpenSSL digest/signature scheme -.br -.ns -.TP 10 -.NOP \f\*[B-Font]initsequence\f[] -initial key id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]initkey\f[] -initial key index -.br -.ns -.TP 10 -.NOP \f\*[B-Font]timestamp\f[] -Autokey signature timestamp -.br -.ns -.TP 10 -.NOP \f\*[B-Font]ident\f[] -Autokey group name for this association -.PP -.SS Clock Variables -The following clock variables appear in the -\f\*[B-Font]clocklist\f[] -billboard for each association with a reference clock. -Not all variables are displayed in some configurations. -.TP 10 -.NOP Variable -Description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]associd\f[] -association id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]status\f[] -.Lk decode.html#clock "clock status word" -.br -.ns -.TP 10 -.NOP \f\*[B-Font]device\f[] -device description -.br -.ns -.TP 10 -.NOP \f\*[B-Font]timecode\f[] -ASCII time code string (specific to device) -.br -.ns -.TP 10 -.NOP \f\*[B-Font]poll\f[] -poll messages sent -.br -.ns -.TP 10 -.NOP \f\*[B-Font]noreply\f[] -no reply -.br -.ns -.TP 10 -.NOP \f\*[B-Font]badformat\f[] -bad format -.br -.ns -.TP 10 -.NOP \f\*[B-Font]baddata\f[] -bad date or time -.br -.ns -.TP 10 -.NOP \f\*[B-Font]fudgetime1\f[] -fudge time 1 -.br -.ns -.TP 10 -.NOP \f\*[B-Font]fudgetime2\f[] -fudge time 2 -.br -.ns -.TP 10 -.NOP \f\*[B-Font]stratum\f[] -driver stratum -.br -.ns -.TP 10 -.NOP \f\*[B-Font]refid\f[] -driver reference id -.br -.ns -.TP 10 -.NOP \f\*[B-Font]flags\f[] -driver flags -.PP +#! /bin/cat .SH "OPTIONS" .TP .NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[] diff --git a/ntpq/ntpq.mdoc.in b/ntpq/ntpq.mdoc.in index 45c7a5301..cf150e4af 100644 --- a/ntpq/ntpq.mdoc.in +++ b/ntpq/ntpq.mdoc.in @@ -1,9 +1,9 @@ -.Dd June 23 2020 +.Dd June 26 2022 .Dt NTPQ @NTPQ_MS@ User Commands .Os .\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) .\" -.\" It has been AutoGen-ed June 23, 2020 at 02:20:53 AM by AutoGen 5.18.5 +.\" It has been AutoGen-ed June 26, 2022 at 05:34:18 AM by AutoGen 5.18.5 .\" From the definitions ntpq-opts.def .\" and the template file agmdoc-cmd.tpl .Sh NAME @@ -18,893 +18,7 @@ [ host ...] .Pp .Sh DESCRIPTION -.Pp -The -.Nm -utility program is used to query NTP servers to monitor NTP operations -and performance, requesting -information about current state and/or changes in that state. -The program may be run either in interactive mode or controlled using -command line arguments. -Requests to read and write arbitrary -variables can be assembled, with raw and pretty\-printed output -options being available. -The -.Nm -utility can also obtain and print a -list of peers in a common format by sending multiple queries to the -server. -.Pp -If one or more request options is included on the command line -when -.Nm -is executed, each of the requests will be sent -to the NTP servers running on each of the hosts given as command -line arguments, or on localhost by default. -If no request options -are given, -.Nm -will attempt to read commands from the -standard input and execute these on the NTP server running on the -first host given on the command line, again defaulting to localhost -when no other host is specified. -The -.Nm -utility will prompt for -commands if the standard input is a terminal device. -.Pp -.Nm -uses NTP mode 6 packets to communicate with the -NTP server, and hence can be used to query any compatible server on -the network which permits it. -Note that since NTP is a UDP protocol -this communication will be somewhat unreliable, especially over -large distances in terms of network topology. -The -.Nm -utility makes -one attempt to retransmit requests, and will time requests out if -the remote host is not heard from within a suitable timeout -time. -.Pp -Note that in contexts where a host name is expected, a -.Fl 4 -qualifier preceding the host name forces resolution to the IPv4 -namespace, while a -.Fl 6 -qualifier forces resolution to the IPv6 namespace. -For examples and usage, see the -.Dq NTP Debugging Techniques -page. -.Pp -Specifying a -command line option other than -.Fl i -or -.Fl n -will -cause the specified query (queries) to be sent to the indicated -host(s) immediately. -Otherwise, -.Nm -will attempt to read -interactive format commands from the standard input. -.Ss "Internal Commands" -.Pp -Interactive format commands consist of a keyword followed by zero -to four arguments. -Only enough characters of the full keyword to -uniquely identify the command need be typed. -.Pp -A -number of interactive format commands are executed entirely within -the -.Nm -utility itself and do not result in NTP -requests being sent to a server. -These are described following. -.Bl -tag -width "help [command]" -compact -offset indent -.It Ic ? Op Ar command -.It Ic help Op Ar command -A -.Ql \&? -by itself will print a list of all the commands -known to -.Nm . -A -.Ql \&? -followed by a command name will print function and usage -information about the command. -.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,... -.It Ic rmvars Ar name Ns Op ,... -.It Ic clearvars -.It Ic showvars -The arguments to this command consist of a list of -items of the form -.Ar name Ns Op \&= Ns Ar value , -where the -.No \&= Ns Ar value -is ignored, and can be omitted, -in requests to the server to read variables. -The -.Nm -utility maintains an internal list in which data to be included in -messages can be assembled, and displayed or set using the -.Ic readlist -and -.Ic writelist -commands described below. -The -.Ic addvars -command allows variables and their optional values to be added to -the list. -If more than one variable is to be added, the list should -be comma\-separated and not contain white space. -The -.Ic rmvars -command can be used to remove individual variables from the list, -while the -.Ic clearvars -command removes all variables from the -list. -The -.Ic showvars -command displays the current list of optional variables. -.It Ic authenticate Op Cm yes Ns | Ns Cm no -Normally -.Nm -does not authenticate requests unless -they are write requests. -The command -.Ic authenticate Cm yes -causes -.Nm -to send authentication with all requests it -makes. -Authenticated requests causes some servers to handle -requests slightly differently. -The command -.Ic authenticate -causes -.Nm -to display whether or not -it is currently authenticating requests. -.It Ic cooked -Causes output from query commands to be "cooked", so that -variables which are recognized by -.Nm -will have their -values reformatted for human consumption. -Variables which -.Nm -could not decode completely are -marked with a trailing -.Ql \&? . -.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off -With no argument, displays the current debug level. -Otherwise, the debugging level is changed as indicated. -.It Ic delay Op Ar milliseconds -Specify a time interval to be added to timestamps included in -requests which require authentication. -This is used to enable -(unreliable) server reconfiguration over long delay network paths -or between machines whose clocks are unsynchronized. -Actually the -server does not now require timestamps in authenticated requests, -so this command may be obsolete. -Without any arguments, displays the current delay. -.It Ic drefid Op Cm hash Ns | Ns Cm ipv4 -Display refids as IPv4 or hash. -Without any arguments, displays whether refids are shown as IPv4 -addresses or hashes. -.It Ic exit -Exit -.Nm . -.It Ic host Op Ar name -Set the host to which future queries will be sent. -The -.Ar name -may be either a host name or a numeric address. -Without any arguments, displays the current host. -.It Ic hostnames Op Cm yes Ns | Ns Cm no -If -.Cm yes -is specified, host names are printed in -information displays. -If -.Cm no -is specified, numeric -addresses are printed instead. -The default is -.Cm yes , -unless -modified using the command line -.Fl n -switch. -Without any arguments, displays whether host names or numeric addresses -are shown. -.It Ic keyid Op Ar keyid -This command allows the specification of a key number to be -used to authenticate configuration requests. -This must correspond -to the -.Cm controlkey -key number the server has been configured to use for this -purpose. -Without any arguments, displays the current -.Ar keyid . -.It Ic keytype Op Ar digest -Specify the digest algorithm to use for authenticating requests, with default -.Cm MD5 . -If -.Nm -was built with OpenSSL support, and OpenSSL is installed, -.Ar digest -can be any message digest algorithm supported by OpenSSL. -If no argument is given, the current -.Ic keytype Ar digest -algorithm used is displayed. -.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4 -Sets the NTP version number which -.Nm -claims in -packets. -Defaults to 3, and note that mode 6 control messages (and -modes, for that matter) didn't exist in NTP version 1. -There appear -to be no servers left which demand version 1. -With no argument, displays the current NTP version that will be used -when communicating with servers. -.It Ic passwd -This command prompts you to type in a password (which will not -be echoed) which will be used to authenticate configuration -requests. -The password must correspond to the key configured for -use by the NTP server for this purpose if such requests are to be -successful. -.It Ic poll Oo Ar n Oc Op Cm verbose -Poll an NTP server in client mode -.Ar n -times. -Poll not implemented yet. -.It Ic quit -Exit -.Nm . -.It Ic raw -Causes all output from query commands is printed as received -from the remote server. -The only formating/interpretation done on -the data is to transform nonascii data into a printable (but barely -understandable) form. -.It Ic timeout Op Ar milliseconds -Specify a timeout period for responses to server queries. -The -default is about 5000 milliseconds. -Without any arguments, displays the current timeout period. -Note that since -.Nm -retries each query once after a timeout, the total waiting time for -a timeout will be twice the timeout value set. -.It Ic version -Display the version of the -.Nm -program. -.El -.Ss "Control Message Commands" -Association ids are used to identify system, peer and clock variables. -System variables are assigned an association id of zero and system name -space, while each association is assigned a nonzero association id and -peer namespace. -Most control commands send a single message to the server and expect a -single response message. -The exceptions are the -.Ic peers -command, which sends a series of messages, -and the -.Ic mreadlist -and -.Ic mreadvar -commands, which iterate over a range of associations. -.Bl -tag -width "something" -compact -offset indent -.It Ic apeers -Display a list of peers in the form: -.Dl [tally]remote refid assid st t when pool reach delay offset jitter -where the output is just like the -.Ic peers -command except that the -.Cm refid -is displayed in hex format and the association number is also displayed. -.It Ic associations -Display a list of mobilized associations in the form: -.Dl ind assid status conf reach auth condition last_event cnt -.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word" -.It Sy Variable Ta Sy Description -.It Cm ind Ta index on this list -.It Cm assid Ta association id -.It Cm status Ta peer status word -.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral -.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable -.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none -.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&) -.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&) -.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&) -.El -.It Ic authinfo -Display the authentication statistics counters: -time since reset, stored keys, free keys, key lookups, keys not found, -uncached keys, expired keys, encryptions, decryptions. -.It Ic clocklist Op Ar associd -.It Ic cl Op Ar associd -Display all clock variables in the variable list for those associations -supporting a reference clock. -.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,... -.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,... -Display a list of clock variables for those associations supporting a -reference clock. -.It Ic :config Ar "configuration command line" -Send the remainder of the command line, including whitespace, to the -server as a run\-time configuration command in the same format as a line -in the configuration file. -This command is experimental until further notice and clarification. -Authentication is of course required. -.It Ic config\-from\-file Ar filename -Send each line of -.Ar filename -to the server as run\-time configuration commands in the same format as -lines in the configuration file. -This command is experimental until further notice and clarification. -Authentication is required. -.It Ic ifstats -Display status and statistics counters for each local network interface address: -interface number, interface name and address or broadcast, drop, flag, -ttl, mc, received, sent, send failed, peers, uptime. -Authentication is required. -.It Ic iostats -Display network and reference clock I/O statistics: -time since reset, receive buffers, free receive buffers, used receive buffers, -low water refills, dropped packets, ignored packets, received packets, -packets sent, packet send failures, input wakeups, useful input wakeups. -.It Ic kerninfo -Display kernel loop and PPS statistics: -associd, status, pll offset, pll frequency, maximum error, -estimated error, kernel status, pll time constant, precision, -frequency tolerance, pps frequency, pps stability, pps jitter, -calibration interval, calibration cycles, jitter exceeded, -stability exceeded, calibration errors. -As with other ntpq output, times are in milliseconds; very small values -may be shown as exponentials. -The precision value displayed is in milliseconds as well, unlike the -precision system variable. -.It Ic lassociations -Perform the same function as the associations command, except display -mobilized and unmobilized associations, including all clients. -.It Ic lopeers Op Fl 4 Ns | Ns Fl 6 -Display a list of all peers and clients showing -.Cm dstadr -(associated with the given IP version). -.It Ic lpassociations -Display the last obtained list of associations, including all clients. -.It Ic lpeers Op Fl 4 Ns | Ns Fl 6 -Display a list of all peers and clients (associated with the given IP version). -.It Ic monstats -Display monitor facility status, statistics, and limits: -enabled, addresses, peak addresses, maximum addresses, -reclaim above count, reclaim older than, kilobytes, maximum kilobytes. -.It Ic mreadlist Ar associdlo Ar associdhi -.It Ic mrl Ar associdlo Ar associdhi -Perform the same function as the -.Ic readlist -command for a range of association ids. -.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,... -This range may be determined from the list displayed by any -command showing associations. -.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,... -Perform the same function as the -.Ic readvar -command for a range of association ids. -This range may be determined from the list displayed by any -command showing associations. -.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count | -.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder | -.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc -.Xc -Display traffic counts of the most recently seen source addresses -collected and maintained by the monitor facility. -With the exception of -.Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder , -the options filter the list returned by -.Xr ntpd 8 . -The -.Cm limited -and -.Cm kod -options return only entries representing client addresses from which the -last packet received triggered either discarding or a KoD response. -The -.Cm mincount Ns = Ns Ar count -option filters entries representing less than -.Ar count -packets. -The -.Cm laddr Ns = Ns Ar localaddr -option filters entries for packets received on any local address other than -.Ar localaddr . -.Cm resany Ns = Ns Ar hexmask -and -.Cm resall Ns = Ns Ar hexmask -filter entries containing none or less than all, respectively, of the bits in -.Ar hexmask , -which must begin with -.Cm 0x . -The -.Ar sortorder -defaults to -.Cm lstint -and may be -.Cm addr , -.Cm avgint , -.Cm count , -.Cm lstint , -or any of those preceded by -.Ql \&\- -to reverse the sort order. -The output columns are: -.Bl -tag -width "something" -compact -offset indent -.It Column -Description -.It Ic lstint -Interval in seconds between the receipt of the most recent packet from -this address and the completion of the retrieval of the MRU list by -.Nm . -.It Ic avgint -Average interval in s between packets from this address. -.It Ic rstr -Restriction flags associated with this address. -Most are copied unchanged from the matching -.Ic restrict -command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless -the last packet from this address triggered a rate control response. -.It Ic r -Rate control indicator, either -a period, -.Ic L -or -.Ic K -for no rate control response, -rate limiting by discarding, or rate limiting with a KoD response, respectively. -.It Ic m -Packet mode. -.It Ic v -Packet version number. -.It Ic count -Packets received from this address. -.It Ic rport -Source port of last packet from this address. -.It Ic remote address -host or DNS name, numeric address, or address followed by -claimed DNS name which could not be verified in parentheses. -.El -.It Ic opeers Op Fl 4 | Fl 6 -Obtain and print the old\-style list of all peers and clients showing -.Cm dstadr -(associated with the given IP version), -rather than the -.Cm refid . -.It Ic passociations -Perform the same function as the -.Ic associations -command, -except that it uses previously stored data rather than making a new query. -.It Ic peers -Display a list of peers in the form: -.Dl [tally]remote refid st t when pool reach delay offset jitter -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm [tally] -single\-character code indicating current value of the -.Ic select -field of the -.Lk decode.html#peer "peer status word" -.It Cm remote -host name (or IP number) of peer. -The value displayed will be truncated to 15 characters unless the -.Nm -.Fl w -option is given, in which case the full value will be displayed -on the first line, and if too long, -the remaining data will be displayed on the next line. -.It Cm refid -source IP address or -.Lk decode.html#kiss "'kiss code" -.It Cm st -stratum: 0 for local reference clocks, 1 for servers with local -reference clocks, ..., 16 for unsynchronized server clocks -.It Cm t -.Ic u : -unicast or manycast client, -.Ic b : -broadcast or multicast client, -.Ic p : -pool source, -.Ic l : -local (reference clock), -.Ic s : -symmetric (peer), -.Ic A : -manycast server, -.Ic B : -broadcast server, -.Ic M : -multicast server -.It Cm when -time in seconds, minutes, hours, or days since the last packet -was received, or -.Ql \&\- -if a packet has never been received -.It Cm poll -poll interval (s) -.It Cm reach -reach shift register (octal) -.It Cm delay -roundtrip delay -.It Cm offset -offset of server relative to this host -.It Cm jitter -offset RMS error estimate. -.El -.It Ic pstats Ar associd -Display the statistics for the peer with the given -.Ar associd : -associd, status, remote host, local address, time last received, -time until next send, reachability change, packets sent, -packets received, bad authentication, bogus origin, duplicate, -bad dispersion, bad reference time, candidate order. -.It Ic readlist Op Ar associd -.It Ic rl Op Ar associd -Display all system or peer variables. -If the -.Ar associd -is omitted, it is assumed to be zero. -.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ... -.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ... -Display the specified system or peer variables. -If -.Ar associd -is zero, the variables are from the -.Sx System Variables -name space, otherwise they are from the -.Sx Peer Variables -name space. -The -.Ar associd -is required, as the same name can occur in both spaces. -If no -.Ar name -is included, all operative variables in the name space are displayed. -In this case only, if the -.Ar associd -is omitted, it is assumed to be zero. -Multiple names are specified with comma separators and without whitespace. -Note that time values are represented in milliseconds -and frequency values in parts\-per\-million (PPM). -Some NTP timestamps are represented in the format -.Ar YYYY Ns Ar MM Ar DD Ar TTTT , -where -.Ar YYYY -is the year, -.Ar MM -the month of year, -.Ar DD -the day of month and -.Ar TTTT -the time of day. -.It Ic reslist -Display the access control (restrict) list for -.Nm . -Authentication is required. -.It Ic saveconfig Ar filename -Save the current configuration, -including any runtime modifications made by -.Ic :config -or -.Ic config\-from\-file , -to the NTP server host file -.Ar filename . -This command will be rejected by the server unless -.Lk miscopt.html#saveconfigdir "saveconfigdir" -appears in the -.Xr ntpd 8 -configuration file. -.Ar filename -can use -.Xr date 1 -format specifiers to substitute the current date and time, for -example, -.D1 Ic saveconfig Pa ntp\-%Y%m%d\-%H%M%S.conf . -The filename used is stored in system variable -.Cm savedconfig . -Authentication is required. -.It Ic sysinfo -Display system operational summary: -associd, status, system peer, system peer mode, leap indicator, -stratum, log2 precision, root delay, root dispersion, -reference id, reference time, system jitter, clock jitter, -clock wander, broadcast delay, symm. auth. delay. -.It Ic sysstats -Display system uptime and packet counts maintained in the -protocol module: -uptime, sysstats reset, packets received, current version, -older version, bad length or format, authentication failed, -declined, restricted, rate limited, KoD responses, -processed for time. -.It Ic timerstats -Display interval timer counters: -time since reset, timer overruns, calls to transmit. -.It Ic writelist Ar associd -Set all system or peer variables included in the variable list. -.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ... -Set the specified variables in the variable list. -If the -.Ar associd -is zero, the variables are from the -.Sx System Variables -name space, otherwise they are from the -.Sx Peer Variables -name space. -The -.Ar associd -is required, as the same name can occur in both spaces. -Authentication is required. -.El -.Ss Status Words and Kiss Codes -The current state of the operating program is shown -in a set of status words -maintained by the system. -Status information is also available on a per\-association basis. -These words are displayed by the -.Ic readlist -and -.Ic associations -commands both in hexadecimal and in decoded short tip strings. -The codes, tips and short explanations are documented on the -.Lk decode.html "Event Messages and Status Words" -page. -The page also includes a list of system and peer messages, -the code for the latest of which is included in the status word. -.Pp -Information resulting from protocol machine state transitions -is displayed using an informal set of ASCII strings called -.Lk decode.html#kiss "kiss codes" . -The original purpose was for kiss\-o'\-death (KoD) packets -sent by the server to advise the client of an unusual condition. -They are now displayed, when appropriate, -in the reference identifier field in various billboards. -.Ss System Variables -The following system variables appear in the -.Ic readlist -billboard. -Not all variables are displayed in some configurations. -.Pp -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm status -.Lk decode.html#sys "system status word" -.It Cm version -NTP software version and build time -.It Cm processor -hardware platform and version -.It Cm system -operating system and version -.It Cm leap -leap warning indicator (0\-3) -.It Cm stratum -stratum (1\-15) -.It Cm precision -precision (log2 s) -.It Cm rootdelay -total roundtrip delay to the primary reference clock -.It Cm rootdisp -total dispersion to the primary reference clock -.It Cm refid -reference id or -.Lk decode.html#kiss "kiss code" -.It Cm reftime -reference time -.It Ic clock -date and time of day -.It Cm peer -system peer association id -.It Cm tc -time constant and poll exponent (log2 s) (3\-17) -.It Cm mintc -minimum time constant (log2 s) (3\-10) -.It Cm offset -combined offset of server relative to this host -.It Cm frequency -frequency drift (PPM) relative to hardware clock -.It Cm sys_jitter -combined system jitter -.It Cm clk_wander -clock frequency wander (PPM) -.It Cm clk_jitter -clock jitter -.It Cm tai -TAI\-UTC offset (s) -.It Cm leapsec -NTP seconds when the next leap second is/was inserted -.It Cm expire -NTP seconds when the NIST leapseconds file expires -.El -The jitter and wander statistics are exponentially\-weighted RMS averages. -The system jitter is defined in the NTPv4 specification; -the clock jitter statistic is computed by the clock discipline module. -.Pp -When the NTPv4 daemon is compiled with the OpenSSL software library, -additional system variables are displayed, -including some or all of the following, -depending on the particular Autokey dance: -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm host -Autokey host name for this host -.It Cm ident -Autokey group name for this host -.It Cm flags -host flags (see Autokey specification) -.It Cm digest -OpenSSL message digest algorithm -.It Cm signature -OpenSSL digest/signature scheme -.It Cm update -NTP seconds at last signature update -.It Cm cert -certificate subject, issuer and certificate flags -.It Cm until -NTP seconds when the certificate expires -.El -.Ss Peer Variables -The following peer variables appear in the -.Ic readlist -billboard for each association. -Not all variables are displayed in some configurations. -.Pp -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm associd -association id -.It Cm status -.Lk decode.html#peer "peer status word" -.It Cm srcadr -source (remote) IP address -.It Cm srcport -source (remote) port -.It Cm dstadr -destination (local) IP address -.It Cm dstport -destination (local) port -.It Cm leap -leap indicator (0\-3) -.It Cm stratum -stratum (0\-15) -.It Cm precision -precision (log2 s) -.It Cm rootdelay -total roundtrip delay to the primary reference clock -.It Cm rootdisp -total root dispersion to the primary reference clock -.It Cm refid -reference id or -.Lk decode.html#kiss "kiss code" -.It Cm reftime -reference time -.It Cm rec -last packet received time -.It Cm reach -reach register (octal) -.It Cm unreach -unreach counter -.It Cm hmode -host mode (1\-6) -.It Cm pmode -peer mode (1\-5) -.It Cm hpoll -host poll exponent (log2 s) (3\-17) -.It Cm ppoll -peer poll exponent (log2 s) (3\-17) -.It Cm headway -headway (see -.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" ) -.It Cm flash -.Lk decode.html#flash "flash status word" -.It Cm keyid -symmetric key id -.It Cm offset -filter offset -.It Cm delay -filter delay -.It Cm dispersion -filter dispersion -.It Cm jitter -filter jitter -.It Cm bias -unicast/broadcast bias -.It Cm xleave -interleave delay (see -.Lk xleave.html "NTP Interleaved Modes" ) -.El -The -.Cm bias -variable is calculated when the first broadcast packet is received -after the calibration volley. -It represents the offset of the broadcast subgraph relative to the -unicast subgraph. -The -.Cm xleave -variable appears only for the interleaved symmetric and interleaved modes. -It represents the internal queuing, buffering and transmission delays -for the preceding packet. -.Pp -When the NTPv4 daemon is compiled with the OpenSSL software library, -additional peer variables are displayed, including the following: -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm flags -peer flags (see Autokey specification) -.It Cm host -Autokey server name -.It Cm flags -peer flags (see Autokey specification) -.It Cm signature -OpenSSL digest/signature scheme -.It Cm initsequence -initial key id -.It Cm initkey -initial key index -.It Cm timestamp -Autokey signature timestamp -.It Cm ident -Autokey group name for this association -.El -.Ss Clock Variables -The following clock variables appear in the -.Ic clocklist -billboard for each association with a reference clock. -Not all variables are displayed in some configurations. -.Bl -tag -width "something" -compact -offset indent -.It Variable -Description -.It Cm associd -association id -.It Cm status -.Lk decode.html#clock "clock status word" -.It Cm device -device description -.It Cm timecode -ASCII time code string (specific to device) -.It Cm poll -poll messages sent -.It Cm noreply -no reply -.It Cm badformat -bad format -.It Cm baddata -bad date or time -.It Cm fudgetime1 -fudge time 1 -.It Cm fudgetime2 -fudge time 2 -.It Cm stratum -driver stratum -.It Cm refid -driver reference id -.It Cm flags -driver flags -.El +#! /bin/cat .Sh "OPTIONS" .Bl -tag .It Fl 4 , Fl \-ipv4