xref: /freebsd/contrib/ntp/ntpq/ntpq.1ntpqmdoc (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1*f5f40dd6SCy Schubert.Dd May 25 2024
22b15cb3dSCy Schubert.Dt NTPQ 1ntpqmdoc User Commands
32b15cb3dSCy Schubert.Os
42b15cb3dSCy Schubert.\"  EDIT THIS FILE WITH CAUTION  (ntpq-opts.mdoc)
52b15cb3dSCy Schubert.\"
6*f5f40dd6SCy Schubert.\"  It has been AutoGen-ed  May 25, 2024 at 12:04:29 AM by AutoGen 5.18.16
72b15cb3dSCy Schubert.\"  From the definitions    ntpq-opts.def
82b15cb3dSCy Schubert.\"  and the template file   agmdoc-cmd.tpl
92b15cb3dSCy Schubert.Sh NAME
102b15cb3dSCy Schubert.Nm ntpq
112b15cb3dSCy Schubert.Nd standard NTP query program
122b15cb3dSCy Schubert.Sh SYNOPSIS
132b15cb3dSCy Schubert.Nm
142b15cb3dSCy Schubert.\" Mixture of short (flag) options and long options
152b15cb3dSCy Schubert.Op Fl flags
162b15cb3dSCy Schubert.Op Fl flag Op Ar value
172b15cb3dSCy Schubert.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
182b15cb3dSCy Schubert[ host ...]
192b15cb3dSCy Schubert.Pp
202b15cb3dSCy Schubert.Sh DESCRIPTION
2109100258SXin LI.Pp
222b15cb3dSCy SchubertThe
232b15cb3dSCy Schubert.Nm
2409100258SXin LIutility program is used to query NTP servers to monitor NTP operations
2509100258SXin LIand performance, requesting
262b15cb3dSCy Schubertinformation about current state and/or changes in that state.
272b15cb3dSCy SchubertThe program may be run either in interactive mode or controlled using
282b15cb3dSCy Schubertcommand line arguments.
292b15cb3dSCy SchubertRequests to read and write arbitrary
302b15cb3dSCy Schubertvariables can be assembled, with raw and pretty\-printed output
312b15cb3dSCy Schubertoptions being available.
322b15cb3dSCy SchubertThe
332b15cb3dSCy Schubert.Nm
342b15cb3dSCy Schubertutility can also obtain and print a
352b15cb3dSCy Schubertlist of peers in a common format by sending multiple queries to the
362b15cb3dSCy Schubertserver.
3709100258SXin LI.Pp
382b15cb3dSCy SchubertIf one or more request options is included on the command line
392b15cb3dSCy Schubertwhen
402b15cb3dSCy Schubert.Nm
412b15cb3dSCy Schubertis executed, each of the requests will be sent
422b15cb3dSCy Schubertto the NTP servers running on each of the hosts given as command
432b15cb3dSCy Schubertline arguments, or on localhost by default.
442b15cb3dSCy SchubertIf no request options
452b15cb3dSCy Schubertare given,
462b15cb3dSCy Schubert.Nm
472b15cb3dSCy Schubertwill attempt to read commands from the
482b15cb3dSCy Schubertstandard input and execute these on the NTP server running on the
492b15cb3dSCy Schubertfirst host given on the command line, again defaulting to localhost
502b15cb3dSCy Schubertwhen no other host is specified.
512b15cb3dSCy SchubertThe
522b15cb3dSCy Schubert.Nm
532b15cb3dSCy Schubertutility will prompt for
542b15cb3dSCy Schubertcommands if the standard input is a terminal device.
5509100258SXin LI.Pp
562b15cb3dSCy Schubert.Nm
572b15cb3dSCy Schubertuses NTP mode 6 packets to communicate with the
582b15cb3dSCy SchubertNTP server, and hence can be used to query any compatible server on
592b15cb3dSCy Schubertthe network which permits it.
602b15cb3dSCy SchubertNote that since NTP is a UDP protocol
612b15cb3dSCy Schubertthis communication will be somewhat unreliable, especially over
622b15cb3dSCy Schubertlarge distances in terms of network topology.
632b15cb3dSCy SchubertThe
642b15cb3dSCy Schubert.Nm
652b15cb3dSCy Schubertutility makes
662b15cb3dSCy Schubertone attempt to retransmit requests, and will time requests out if
672b15cb3dSCy Schubertthe remote host is not heard from within a suitable timeout
682b15cb3dSCy Schuberttime.
6909100258SXin LI.Pp
7009100258SXin LINote that in contexts where a host name is expected, a
7109100258SXin LI.Fl 4
7209100258SXin LIqualifier preceding the host name forces resolution to the IPv4
7309100258SXin LInamespace, while a
7409100258SXin LI.Fl 6
7509100258SXin LIqualifier forces resolution to the IPv6 namespace.
7609100258SXin LIFor examples and usage, see the
7709100258SXin LI.Dq NTP Debugging Techniques
7809100258SXin LIpage.
7909100258SXin LI.Pp
802b15cb3dSCy SchubertSpecifying a
812b15cb3dSCy Schubertcommand line option other than
822b15cb3dSCy Schubert.Fl i
832b15cb3dSCy Schubertor
842b15cb3dSCy Schubert.Fl n
852b15cb3dSCy Schubertwill
862b15cb3dSCy Schubertcause the specified query (queries) to be sent to the indicated
872b15cb3dSCy Schuberthost(s) immediately.
882b15cb3dSCy SchubertOtherwise,
892b15cb3dSCy Schubert.Nm
902b15cb3dSCy Schubertwill attempt to read
912b15cb3dSCy Schubertinteractive format commands from the standard input.
922b15cb3dSCy Schubert.Ss "Internal Commands"
9309100258SXin LI.Pp
942b15cb3dSCy SchubertInteractive format commands consist of a keyword followed by zero
952b15cb3dSCy Schubertto four arguments.
962b15cb3dSCy SchubertOnly enough characters of the full keyword to
972b15cb3dSCy Schubertuniquely identify the command need be typed.
9809100258SXin LI.Pp
992b15cb3dSCy SchubertA
1002b15cb3dSCy Schubertnumber of interactive format commands are executed entirely within
1012b15cb3dSCy Schubertthe
1022b15cb3dSCy Schubert.Nm
10309100258SXin LIutility itself and do not result in NTP
1042b15cb3dSCy Schubertrequests being sent to a server.
1052b15cb3dSCy SchubertThese are described following.
10609100258SXin LI.Bl -tag -width "help [command]" -compact -offset indent
10709100258SXin LI.It Ic ? Op Ar command
10809100258SXin LI.It Ic help Op Ar command
1092b15cb3dSCy SchubertA
1102b15cb3dSCy Schubert.Ql \&?
11109100258SXin LIby itself will print a list of all the commands
11209100258SXin LIknown to
1132b15cb3dSCy Schubert.Nm .
1142b15cb3dSCy SchubertA
1152b15cb3dSCy Schubert.Ql \&?
11609100258SXin LIfollowed by a command name will print function and usage
1172b15cb3dSCy Schubertinformation about the command.
11809100258SXin LI.It Ic addvars Ar name Ns Oo \&= Ns Ar value Oc Ns Op ,...
11909100258SXin LI.It Ic rmvars Ar name Ns Op ,...
1202b15cb3dSCy Schubert.It Ic clearvars
1212b15cb3dSCy Schubert.It Ic showvars
12209100258SXin LIThe arguments to this command consist of a list of
1232b15cb3dSCy Schubertitems of the form
12409100258SXin LI.Ar name Ns Op \&= Ns Ar value ,
1252b15cb3dSCy Schubertwhere the
12609100258SXin LI.No \&= Ns Ar value
1272b15cb3dSCy Schubertis ignored, and can be omitted,
1282b15cb3dSCy Schubertin requests to the server to read variables.
1292b15cb3dSCy SchubertThe
1302b15cb3dSCy Schubert.Nm
13109100258SXin LIutility maintains an internal list in which data to be included in
13209100258SXin LImessages can be assembled, and displayed or set using the
1332b15cb3dSCy Schubert.Ic readlist
1342b15cb3dSCy Schubertand
1352b15cb3dSCy Schubert.Ic writelist
1362b15cb3dSCy Schubertcommands described below.
1372b15cb3dSCy SchubertThe
1382b15cb3dSCy Schubert.Ic addvars
1392b15cb3dSCy Schubertcommand allows variables and their optional values to be added to
1402b15cb3dSCy Schubertthe list.
1412b15cb3dSCy SchubertIf more than one variable is to be added, the list should
1422b15cb3dSCy Schubertbe comma\-separated and not contain white space.
1432b15cb3dSCy SchubertThe
1442b15cb3dSCy Schubert.Ic rmvars
1452b15cb3dSCy Schubertcommand can be used to remove individual variables from the list,
1462b15cb3dSCy Schubertwhile the
14709100258SXin LI.Ic clearvars
1482b15cb3dSCy Schubertcommand removes all variables from the
1492b15cb3dSCy Schubertlist.
1502b15cb3dSCy SchubertThe
1512b15cb3dSCy Schubert.Ic showvars
1522b15cb3dSCy Schubertcommand displays the current list of optional variables.
15309100258SXin LI.It Ic authenticate Op Cm yes Ns | Ns Cm no
1542b15cb3dSCy SchubertNormally
1552b15cb3dSCy Schubert.Nm
1562b15cb3dSCy Schubertdoes not authenticate requests unless
1572b15cb3dSCy Schubertthey are write requests.
1582b15cb3dSCy SchubertThe command
15909100258SXin LI.Ic authenticate Cm yes
1602b15cb3dSCy Schubertcauses
1612b15cb3dSCy Schubert.Nm
1622b15cb3dSCy Schubertto send authentication with all requests it
1632b15cb3dSCy Schubertmakes.
1642b15cb3dSCy SchubertAuthenticated requests causes some servers to handle
16509100258SXin LIrequests slightly differently.
1662b15cb3dSCy SchubertThe command
16709100258SXin LI.Ic authenticate
1682b15cb3dSCy Schubertcauses
1692b15cb3dSCy Schubert.Nm
1702b15cb3dSCy Schubertto display whether or not
17109100258SXin LIit is currently authenticating requests.
1722b15cb3dSCy Schubert.It Ic cooked
1732b15cb3dSCy SchubertCauses output from query commands to be "cooked", so that
1742b15cb3dSCy Schubertvariables which are recognized by
1752b15cb3dSCy Schubert.Nm
1762b15cb3dSCy Schubertwill have their
1772b15cb3dSCy Schubertvalues reformatted for human consumption.
1782b15cb3dSCy SchubertVariables which
1792b15cb3dSCy Schubert.Nm
18009100258SXin LIcould not decode completely are
1812b15cb3dSCy Schubertmarked with a trailing
1822b15cb3dSCy Schubert.Ql \&? .
18309100258SXin LI.It Ic debug Op Cm more Ns | Ns Cm less Ns | Ns Cm off
1842b15cb3dSCy SchubertWith no argument, displays the current debug level.
18509100258SXin LIOtherwise, the debugging level is changed as indicated.
18609100258SXin LI.It Ic delay Op Ar milliseconds
1872b15cb3dSCy SchubertSpecify a time interval to be added to timestamps included in
1882b15cb3dSCy Schubertrequests which require authentication.
1892b15cb3dSCy SchubertThis is used to enable
1902b15cb3dSCy Schubert(unreliable) server reconfiguration over long delay network paths
1912b15cb3dSCy Schubertor between machines whose clocks are unsynchronized.
1922b15cb3dSCy SchubertActually the
1932b15cb3dSCy Schubertserver does not now require timestamps in authenticated requests,
1942b15cb3dSCy Schubertso this command may be obsolete.
19509100258SXin LIWithout any arguments, displays the current delay.
19609100258SXin LI.It Ic drefid Op Cm hash Ns | Ns Cm ipv4
19709100258SXin LIDisplay refids as IPv4 or hash.
19809100258SXin LIWithout any arguments, displays whether refids are shown as IPv4
19909100258SXin LIaddresses or hashes.
2002b15cb3dSCy Schubert.It Ic exit
2012b15cb3dSCy SchubertExit
2022b15cb3dSCy Schubert.Nm .
20309100258SXin LI.It Ic host Op Ar name
2042b15cb3dSCy SchubertSet the host to which future queries will be sent.
20509100258SXin LIThe
20609100258SXin LI.Ar name
2072b15cb3dSCy Schubertmay be either a host name or a numeric address.
20809100258SXin LIWithout any arguments, displays the current host.
20909100258SXin LI.It Ic hostnames Op Cm yes Ns | Ns Cm no
2102b15cb3dSCy SchubertIf
2112b15cb3dSCy Schubert.Cm yes
2122b15cb3dSCy Schubertis specified, host names are printed in
2132b15cb3dSCy Schubertinformation displays.
2142b15cb3dSCy SchubertIf
2152b15cb3dSCy Schubert.Cm no
2162b15cb3dSCy Schubertis specified, numeric
2172b15cb3dSCy Schubertaddresses are printed instead.
2182b15cb3dSCy SchubertThe default is
2192b15cb3dSCy Schubert.Cm yes ,
2202b15cb3dSCy Schubertunless
2212b15cb3dSCy Schubertmodified using the command line
2222b15cb3dSCy Schubert.Fl n
2232b15cb3dSCy Schubertswitch.
22409100258SXin LIWithout any arguments, displays whether host names or numeric addresses
22509100258SXin LIare shown.
22609100258SXin LI.It Ic keyid Op Ar keyid
2272b15cb3dSCy SchubertThis command allows the specification of a key number to be
2282b15cb3dSCy Schubertused to authenticate configuration requests.
2292b15cb3dSCy SchubertThis must correspond
230276da39aSCy Schubertto the
231276da39aSCy Schubert.Cm controlkey
232276da39aSCy Schubertkey number the server has been configured to use for this
2332b15cb3dSCy Schubertpurpose.
23409100258SXin LIWithout any arguments, displays the current
23509100258SXin LI.Ar keyid .
23609100258SXin LI.It Ic keytype Op Ar digest
23709100258SXin LISpecify the digest algorithm to use for authenticating requests, with default
23809100258SXin LI.Cm MD5 .
2392b15cb3dSCy SchubertIf
2402b15cb3dSCy Schubert.Nm
24109100258SXin LIwas built with OpenSSL support, and OpenSSL is installed,
24209100258SXin LI.Ar digest
24309100258SXin LIcan be any message digest algorithm supported by OpenSSL.
2442b15cb3dSCy SchubertIf no argument is given, the current
24509100258SXin LI.Ic keytype Ar digest
24609100258SXin LIalgorithm used is displayed.
24709100258SXin LI.It Ic ntpversion Op Cm 1 Ns | Ns Cm 2 Ns | Ns Cm 3 Ns | Ns Cm 4
2482b15cb3dSCy SchubertSets the NTP version number which
2492b15cb3dSCy Schubert.Nm
2502b15cb3dSCy Schubertclaims in
2512b15cb3dSCy Schubertpackets.
2522b15cb3dSCy SchubertDefaults to 3, and note that mode 6 control messages (and
2532b15cb3dSCy Schubertmodes, for that matter) didn't exist in NTP version 1.
2542b15cb3dSCy SchubertThere appear
2552b15cb3dSCy Schubertto be no servers left which demand version 1.
2562b15cb3dSCy SchubertWith no argument, displays the current NTP version that will be used
2572b15cb3dSCy Schubertwhen communicating with servers.
2582b15cb3dSCy Schubert.It Ic passwd
2592b15cb3dSCy SchubertThis command prompts you to type in a password (which will not
2602b15cb3dSCy Schubertbe echoed) which will be used to authenticate configuration
2612b15cb3dSCy Schubertrequests.
2622b15cb3dSCy SchubertThe password must correspond to the key configured for
2632b15cb3dSCy Schubertuse by the NTP server for this purpose if such requests are to be
2642b15cb3dSCy Schubertsuccessful.
26509100258SXin LI.It Ic poll Oo Ar n Oc Op Cm verbose
26609100258SXin LIPoll an NTP server in client mode
26709100258SXin LI.Ar n
26809100258SXin LItimes.
26909100258SXin LIPoll not implemented yet.
2702b15cb3dSCy Schubert.It Ic quit
2712b15cb3dSCy SchubertExit
2722b15cb3dSCy Schubert.Nm .
2732b15cb3dSCy Schubert.It Ic raw
2742b15cb3dSCy SchubertCauses all output from query commands is printed as received
2752b15cb3dSCy Schubertfrom the remote server.
2762b15cb3dSCy SchubertThe only formating/interpretation done on
2772b15cb3dSCy Schubertthe data is to transform nonascii data into a printable (but barely
2782b15cb3dSCy Schubertunderstandable) form.
27909100258SXin LI.It Ic timeout Op Ar milliseconds
2802b15cb3dSCy SchubertSpecify a timeout period for responses to server queries.
2812b15cb3dSCy SchubertThe
2822b15cb3dSCy Schubertdefault is about 5000 milliseconds.
28309100258SXin LIWithout any arguments, displays the current timeout period.
2842b15cb3dSCy SchubertNote that since
2852b15cb3dSCy Schubert.Nm
2862b15cb3dSCy Schubertretries each query once after a timeout, the total waiting time for
2872b15cb3dSCy Schuberta timeout will be twice the timeout value set.
2882b15cb3dSCy Schubert.It Ic version
28909100258SXin LIDisplay the version of the
2902b15cb3dSCy Schubert.Nm
2912b15cb3dSCy Schubertprogram.
2922b15cb3dSCy Schubert.El
2932b15cb3dSCy Schubert.Ss "Control Message Commands"
29409100258SXin LIAssociation ids are used to identify system, peer and clock variables.
29509100258SXin LISystem variables are assigned an association id of zero and system name
29609100258SXin LIspace, while each association is assigned a nonzero association id and
29709100258SXin LIpeer namespace.
29809100258SXin LIMost control commands send a single message to the server and expect a
29909100258SXin LIsingle response message.
3002b15cb3dSCy SchubertThe exceptions are the
30109100258SXin LI.Ic peers
3022b15cb3dSCy Schubertcommand, which sends a series of messages,
3032b15cb3dSCy Schubertand the
30409100258SXin LI.Ic mreadlist
3052b15cb3dSCy Schubertand
30609100258SXin LI.Ic mreadvar
3072b15cb3dSCy Schubertcommands, which iterate over a range of associations.
3082b15cb3dSCy Schubert.Bl -tag -width "something" -compact -offset indent
30909100258SXin LI.It Ic apeers
31009100258SXin LIDisplay a list of peers in the form:
31109100258SXin LI.Dl [tally]remote refid assid st t when pool reach delay offset jitter
31209100258SXin LIwhere the output is just like the
31309100258SXin LI.Ic peers
31409100258SXin LIcommand except that the
31509100258SXin LI.Cm refid
31609100258SXin LIis displayed in hex format and the association number is also displayed.
31709100258SXin LI.It Ic associations
3182b15cb3dSCy SchubertDisplay a list of mobilized associations in the form:
3192b15cb3dSCy Schubert.Dl ind assid status conf reach auth condition last_event cnt
32009100258SXin LI.Bl -column -offset indent ".Sy Variable" "see the select field of the peer status word"
32109100258SXin LI.It Sy Variable Ta Sy Description
32209100258SXin LI.It Cm ind Ta index on this list
32309100258SXin LI.It Cm assid Ta association id
32409100258SXin LI.It Cm status Ta peer status word
32509100258SXin LI.It Cm conf Ta Cm yes : No persistent, Cm no : No ephemeral
32609100258SXin LI.It Cm reach Ta Cm yes : No reachable, Cm no : No unreachable
32709100258SXin LI.It Cm auth Ta Cm ok , Cm yes , Cm bad No and Cm none
32809100258SXin LI.It Cm condition Ta selection status \&(see the Cm select No field of the peer status word\&)
32909100258SXin LI.It Cm last_event Ta event report \&(see the Cm event No field of the peer status word\&)
33009100258SXin LI.It Cm cnt Ta event count \&(see the Cm count No field of the peer status word\&)
3312b15cb3dSCy Schubert.El
33209100258SXin LI.It Ic authinfo
33309100258SXin LIDisplay the authentication statistics counters:
33409100258SXin LItime since reset, stored keys, free keys, key lookups, keys not found,
33509100258SXin LIuncached keys, expired keys, encryptions, decryptions.
33609100258SXin LI.It Ic clocklist Op Ar associd
33709100258SXin LI.It Ic cl Op Ar associd
33809100258SXin LIDisplay all clock variables in the variable list for those associations
33909100258SXin LIsupporting a reference clock.
34009100258SXin LI.It Ic clockvar Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
34109100258SXin LI.It Ic cv Oo Ar associd Oc Oo Ar name Ns Oo \&= Ns Ar value Oc Ns Oc Ns Op ,...
34209100258SXin LIDisplay a list of clock variables for those associations supporting a
34309100258SXin LIreference clock.
34409100258SXin LI.It Ic :config Ar "configuration command line"
34509100258SXin LISend the remainder of the command line, including whitespace, to the
34609100258SXin LIserver as a run\-time configuration command in the same format as a line
34709100258SXin LIin the configuration file.
34809100258SXin LIThis command is experimental until further notice and clarification.
34909100258SXin LIAuthentication is of course required.
35009100258SXin LI.It Ic config\-from\-file Ar filename
35109100258SXin LISend each line of
3522b15cb3dSCy Schubert.Ar filename
35309100258SXin LIto the server as run\-time configuration commands in the same format as
35409100258SXin LIlines in the configuration file.
35509100258SXin LIThis command is experimental until further notice and clarification.
35609100258SXin LIAuthentication is required.
3572b15cb3dSCy Schubert.It Ic ifstats
35809100258SXin LIDisplay status and statistics counters for each local network interface address:
35909100258SXin LIinterface number, interface name and address or broadcast, drop, flag,
36009100258SXin LIttl, mc, received, sent, send failed, peers, uptime.
36109100258SXin LIAuthentication is required.
3622b15cb3dSCy Schubert.It Ic iostats
36309100258SXin LIDisplay network and reference clock I/O statistics:
36409100258SXin LItime since reset, receive buffers, free receive buffers, used receive buffers,
36509100258SXin LIlow water refills, dropped packets, ignored packets, received packets,
36609100258SXin LIpackets sent, packet send failures, input wakeups, useful input wakeups.
3672b15cb3dSCy Schubert.It Ic kerninfo
36809100258SXin LIDisplay kernel loop and PPS statistics:
36909100258SXin LIassocid, status, pll offset, pll frequency, maximum error,
37009100258SXin LIestimated error, kernel status, pll time constant, precision,
37109100258SXin LIfrequency tolerance, pps frequency, pps stability, pps jitter,
37209100258SXin LIcalibration interval, calibration cycles, jitter exceeded,
37309100258SXin LIstability exceeded, calibration errors.
37409100258SXin LIAs with other ntpq output, times are in milliseconds; very small values
37509100258SXin LImay be shown as exponentials.
37609100258SXin LIThe precision value displayed is in milliseconds as well, unlike the
37709100258SXin LIprecision system variable.
3782b15cb3dSCy Schubert.It Ic lassociations
37909100258SXin LIPerform the same function as the associations command, except display
38009100258SXin LImobilized and unmobilized associations, including all clients.
38109100258SXin LI.It Ic lopeers Op Fl 4 Ns | Ns Fl 6
38209100258SXin LIDisplay a list of all peers and clients showing
38309100258SXin LI.Cm dstadr
38409100258SXin LI(associated with the given IP version).
38509100258SXin LI.It Ic lpassociations
38609100258SXin LIDisplay the last obtained list of associations, including all clients.
38709100258SXin LI.It Ic lpeers Op Fl 4 Ns | Ns Fl 6
38809100258SXin LIDisplay a list of all peers and clients (associated with the given IP version).
3892b15cb3dSCy Schubert.It Ic monstats
39009100258SXin LIDisplay monitor facility status, statistics, and limits:
39109100258SXin LIenabled, addresses, peak addresses, maximum addresses,
39209100258SXin LIreclaim above count, reclaim older than, kilobytes, maximum kilobytes.
39309100258SXin LI.It Ic mreadlist Ar associdlo Ar associdhi
39409100258SXin LI.It Ic mrl Ar associdlo Ar associdhi
39509100258SXin LIPerform the same function as the
39609100258SXin LI.Ic readlist
39709100258SXin LIcommand for a range of association ids.
39809100258SXin LI.It Ic mreadvar Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
39909100258SXin LIThis range may be determined from the list displayed by any
40009100258SXin LIcommand showing associations.
40109100258SXin LI.It Ic mrv Ar associdlo Ar associdhi Oo Ar name Oc Ns Op ,...
40209100258SXin LIPerform the same function as the
40309100258SXin LI.Ic readvar
40409100258SXin LIcommand for a range of association ids.
40509100258SXin LIThis range may be determined from the list displayed by any
40609100258SXin LIcommand showing associations.
40709100258SXin LI.It Xo Ic mrulist Oo Cm limited | Cm kod | Cm mincount Ns \&= Ns Ar count |
40809100258SXin LI.Cm laddr Ns \&= Ns Ar localaddr | Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder |
40909100258SXin LI.Cm resany Ns \&= Ns Ar hexmask | Cm resall Ns \&= Ns Ar hexmask Oc
41009100258SXin LI.Xc
41109100258SXin LIDisplay traffic counts of the most recently seen source addresses
41209100258SXin LIcollected and maintained by the monitor facility.
4132b15cb3dSCy SchubertWith the exception of
41409100258SXin LI.Cm sort Ns \&= Ns Oo \&\- Oc Ns Ar sortorder ,
4152b15cb3dSCy Schubertthe options filter the list returned by
41609100258SXin LI.Xr ntpd 8 .
4172b15cb3dSCy SchubertThe
4182b15cb3dSCy Schubert.Cm limited
4192b15cb3dSCy Schubertand
4202b15cb3dSCy Schubert.Cm kod
42109100258SXin LIoptions return only entries representing client addresses from which the
42209100258SXin LIlast packet received triggered either discarding or a KoD response.
4232b15cb3dSCy SchubertThe
4242b15cb3dSCy Schubert.Cm mincount Ns = Ns Ar count
4252b15cb3dSCy Schubertoption filters entries representing less than
4262b15cb3dSCy Schubert.Ar count
4272b15cb3dSCy Schubertpackets.
4282b15cb3dSCy SchubertThe
4292b15cb3dSCy Schubert.Cm laddr Ns = Ns Ar localaddr
4302b15cb3dSCy Schubertoption filters entries for packets received on any local address other than
4312b15cb3dSCy Schubert.Ar localaddr .
4322b15cb3dSCy Schubert.Cm resany Ns = Ns Ar hexmask
4332b15cb3dSCy Schubertand
4342b15cb3dSCy Schubert.Cm resall Ns = Ns Ar hexmask
4352b15cb3dSCy Schubertfilter entries containing none or less than all, respectively, of the bits in
4362b15cb3dSCy Schubert.Ar hexmask ,
4372b15cb3dSCy Schubertwhich must begin with
4382b15cb3dSCy Schubert.Cm 0x .
4392b15cb3dSCy SchubertThe
4402b15cb3dSCy Schubert.Ar sortorder
4412b15cb3dSCy Schubertdefaults to
4422b15cb3dSCy Schubert.Cm lstint
44309100258SXin LIand may be
4442b15cb3dSCy Schubert.Cm addr ,
4452b15cb3dSCy Schubert.Cm avgint ,
44609100258SXin LI.Cm count ,
4472b15cb3dSCy Schubert.Cm lstint ,
44809100258SXin LIor any of those preceded by
44909100258SXin LI.Ql \&\-
45009100258SXin LIto reverse the sort order.
4512b15cb3dSCy SchubertThe output columns are:
4522b15cb3dSCy Schubert.Bl -tag -width "something" -compact -offset indent
4532b15cb3dSCy Schubert.It Column
4542b15cb3dSCy SchubertDescription
4552b15cb3dSCy Schubert.It Ic lstint
45609100258SXin LIInterval in seconds between the receipt of the most recent packet from
45709100258SXin LIthis address and the completion of the retrieval of the MRU list by
4582b15cb3dSCy Schubert.Nm .
4592b15cb3dSCy Schubert.It Ic avgint
4602b15cb3dSCy SchubertAverage interval in s between packets from this address.
4612b15cb3dSCy Schubert.It Ic rstr
4622b15cb3dSCy SchubertRestriction flags associated with this address.
4632b15cb3dSCy SchubertMost are copied unchanged from the matching
4642b15cb3dSCy Schubert.Ic restrict
46509100258SXin LIcommand, however 0x400 (kod) and 0x20 (limited) flags are cleared unless
46609100258SXin LIthe last packet from this address triggered a rate control response.
4672b15cb3dSCy Schubert.It Ic r
4682b15cb3dSCy SchubertRate control indicator, either
4692b15cb3dSCy Schuberta period,
4702b15cb3dSCy Schubert.Ic L
4712b15cb3dSCy Schubertor
4722b15cb3dSCy Schubert.Ic K
4732b15cb3dSCy Schubertfor no rate control response,
4742b15cb3dSCy Schubertrate limiting by discarding, or rate limiting with a KoD response, respectively.
4752b15cb3dSCy Schubert.It Ic m
4762b15cb3dSCy SchubertPacket mode.
4772b15cb3dSCy Schubert.It Ic v
4782b15cb3dSCy SchubertPacket version number.
4792b15cb3dSCy Schubert.It Ic count
4802b15cb3dSCy SchubertPackets received from this address.
4812b15cb3dSCy Schubert.It Ic rport
4822b15cb3dSCy SchubertSource port of last packet from this address.
4832b15cb3dSCy Schubert.It Ic remote address
48409100258SXin LIhost or DNS name, numeric address, or address followed by
4852b15cb3dSCy Schubertclaimed DNS name which could not be verified in parentheses.
4862b15cb3dSCy Schubert.El
48709100258SXin LI.It Ic opeers Op Fl 4 | Fl 6
4882b15cb3dSCy SchubertObtain and print the old\-style list of all peers and clients showing
48909100258SXin LI.Cm dstadr
49009100258SXin LI(associated with the given IP version),
4912b15cb3dSCy Schubertrather than the
49209100258SXin LI.Cm refid .
4932b15cb3dSCy Schubert.It Ic passociations
4942b15cb3dSCy SchubertPerform the same function as the
4952b15cb3dSCy Schubert.Ic associations
4962b15cb3dSCy Schubertcommand,
4972b15cb3dSCy Schubertexcept that it uses previously stored data rather than making a new query.
4982b15cb3dSCy Schubert.It Ic peers
4992b15cb3dSCy SchubertDisplay a list of peers in the form:
5002b15cb3dSCy Schubert.Dl [tally]remote refid st t when pool reach delay offset jitter
5012b15cb3dSCy Schubert.Bl -tag -width "something" -compact -offset indent
5022b15cb3dSCy Schubert.It Variable
5032b15cb3dSCy SchubertDescription
50409100258SXin LI.It Cm [tally]
5052b15cb3dSCy Schubertsingle\-character code indicating current value of the
5062b15cb3dSCy Schubert.Ic select
5072b15cb3dSCy Schubertfield of the
5082b15cb3dSCy Schubert.Lk decode.html#peer "peer status word"
50909100258SXin LI.It Cm remote
5102b15cb3dSCy Schuberthost name (or IP number) of peer.
5112b15cb3dSCy SchubertThe value displayed will be truncated to 15 characters unless the
51209100258SXin LI.Nm
5132b15cb3dSCy Schubert.Fl w
51409100258SXin LIoption is given, in which case the full value will be displayed
51509100258SXin LIon the first line, and if too long,
51609100258SXin LIthe remaining data will be displayed on the next line.
51709100258SXin LI.It Cm refid
51809100258SXin LIsource IP address or
5192b15cb3dSCy Schubert.Lk decode.html#kiss "'kiss code"
52009100258SXin LI.It Cm st
52109100258SXin LIstratum: 0 for local reference clocks, 1 for servers with local
52209100258SXin LIreference clocks, ..., 16 for unsynchronized server clocks
52309100258SXin LI.It Cm t
5242b15cb3dSCy Schubert.Ic u :
5252b15cb3dSCy Schubertunicast or manycast client,
5262b15cb3dSCy Schubert.Ic b :
5272b15cb3dSCy Schubertbroadcast or multicast client,
52809100258SXin LI.Ic p :
52909100258SXin LIpool source,
5302b15cb3dSCy Schubert.Ic l :
5312b15cb3dSCy Schubertlocal (reference clock),
5322b15cb3dSCy Schubert.Ic s :
5332b15cb3dSCy Schubertsymmetric (peer),
5342b15cb3dSCy Schubert.Ic A :
5352b15cb3dSCy Schubertmanycast server,
5362b15cb3dSCy Schubert.Ic B :
5372b15cb3dSCy Schubertbroadcast server,
5382b15cb3dSCy Schubert.Ic M :
5392b15cb3dSCy Schubertmulticast server
54009100258SXin LI.It Cm when
54109100258SXin LItime in seconds, minutes, hours, or days since the last packet
54209100258SXin LIwas received, or
54309100258SXin LI.Ql \&\-
54409100258SXin LIif a packet has never been received
54509100258SXin LI.It Cm poll
54609100258SXin LIpoll interval (s)
54709100258SXin LI.It Cm reach
5482b15cb3dSCy Schubertreach shift register (octal)
54909100258SXin LI.It Cm delay
5502b15cb3dSCy Schubertroundtrip delay
55109100258SXin LI.It Cm offset
5522b15cb3dSCy Schubertoffset of server relative to this host
55309100258SXin LI.It Cm jitter
55409100258SXin LIoffset RMS error estimate.
5552b15cb3dSCy Schubert.El
55609100258SXin LI.It Ic pstats Ar associd
55709100258SXin LIDisplay the statistics for the peer with the given
55809100258SXin LI.Ar associd :
55909100258SXin LIassocid, status, remote host, local address, time last received,
56009100258SXin LItime until next send, reachability change, packets sent,
56109100258SXin LIpackets received, bad authentication, bogus origin, duplicate,
56209100258SXin LIbad dispersion, bad reference time, candidate order.
56309100258SXin LI.It Ic readlist Op Ar associd
56409100258SXin LI.It Ic rl Op Ar associd
56509100258SXin LIDisplay all system or peer variables.
56609100258SXin LIIf the
56709100258SXin LI.Ar associd
56809100258SXin LIis omitted, it is assumed to be zero.
56909100258SXin LI.It Ic readvar Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
57009100258SXin LI.It Ic rv Op Ar associd Ar name Ns Oo Ns = Ns Ar value Oc Op , ...
57109100258SXin LIDisplay the specified system or peer variables.
5722b15cb3dSCy SchubertIf
57309100258SXin LI.Ar associd
5742b15cb3dSCy Schubertis zero, the variables are from the
5752b15cb3dSCy Schubert.Sx System Variables
5762b15cb3dSCy Schubertname space, otherwise they are from the
5772b15cb3dSCy Schubert.Sx Peer Variables
5782b15cb3dSCy Schubertname space.
5792b15cb3dSCy SchubertThe
58009100258SXin LI.Ar associd
5812b15cb3dSCy Schubertis required, as the same name can occur in both spaces.
5822b15cb3dSCy SchubertIf no
5832b15cb3dSCy Schubert.Ar name
5842b15cb3dSCy Schubertis included, all operative variables in the name space are displayed.
5852b15cb3dSCy SchubertIn this case only, if the
58609100258SXin LI.Ar associd
58709100258SXin LIis omitted, it is assumed to be zero.
5882b15cb3dSCy SchubertMultiple names are specified with comma separators and without whitespace.
5892b15cb3dSCy SchubertNote that time values are represented in milliseconds
5902b15cb3dSCy Schubertand frequency values in parts\-per\-million (PPM).
5912b15cb3dSCy SchubertSome NTP timestamps are represented in the format
59209100258SXin LI.Ar YYYY Ns Ar MM Ar DD Ar TTTT ,
59309100258SXin LIwhere
59409100258SXin LI.Ar YYYY
59509100258SXin LIis the year,
59609100258SXin LI.Ar MM
59709100258SXin LIthe month of year,
59809100258SXin LI.Ar DD
59909100258SXin LIthe day of month and
60009100258SXin LI.Ar TTTT
60109100258SXin LIthe time of day.
6022b15cb3dSCy Schubert.It Ic reslist
60309100258SXin LIDisplay the access control (restrict) list for
6042b15cb3dSCy Schubert.Nm .
60509100258SXin LIAuthentication is required.
6062b15cb3dSCy Schubert.It Ic saveconfig Ar filename
60709100258SXin LISave the current configuration,
60809100258SXin LIincluding any runtime modifications made by
6092b15cb3dSCy Schubert.Ic :config
6102b15cb3dSCy Schubertor
6112b15cb3dSCy Schubert.Ic config\-from\-file ,
61209100258SXin LIto the NTP server host file
6132b15cb3dSCy Schubert.Ar filename .
6142b15cb3dSCy SchubertThis command will be rejected by the server unless
6152b15cb3dSCy Schubert.Lk miscopt.html#saveconfigdir "saveconfigdir"
6162b15cb3dSCy Schubertappears in the
61709100258SXin LI.Xr ntpd 8
6182b15cb3dSCy Schubertconfiguration file.
6192b15cb3dSCy Schubert.Ar filename
6202b15cb3dSCy Schubertcan use
62109100258SXin LI.Xr date 1
62209100258SXin LIformat specifiers to substitute the current date and time, for
62309100258SXin LIexample,
62409100258SXin LI.D1 Ic saveconfig Pa ntp\-%Y%m%d\-%H%M%S.conf .
6252b15cb3dSCy SchubertThe filename used is stored in system variable
62609100258SXin LI.Cm savedconfig .
6272b15cb3dSCy SchubertAuthentication is required.
62809100258SXin LI.It Ic sysinfo
62909100258SXin LIDisplay system operational summary:
63009100258SXin LIassocid, status, system peer, system peer mode, leap indicator,
63109100258SXin LIstratum, log2 precision, root delay, root dispersion,
63209100258SXin LIreference id, reference time, system jitter, clock jitter,
63309100258SXin LIclock wander, broadcast delay, symm. auth. delay.
63409100258SXin LI.It Ic sysstats
63509100258SXin LIDisplay system uptime and packet counts maintained in the
63609100258SXin LIprotocol module:
63709100258SXin LIuptime, sysstats reset, packets received, current version,
63809100258SXin LIolder version, bad length or format, authentication failed,
63909100258SXin LIdeclined, restricted, rate limited, KoD responses,
64009100258SXin LIprocessed for time.
6412b15cb3dSCy Schubert.It Ic timerstats
64209100258SXin LIDisplay interval timer counters:
64309100258SXin LItime since reset, timer overruns, calls to transmit.
64409100258SXin LI.It Ic writelist Ar associd
64509100258SXin LISet all system or peer variables included in the variable list.
64609100258SXin LI.It Ic writevar Ar associd Ar name Ns = Ns Ar value Op , ...
64709100258SXin LISet the specified variables in the variable list.
6482b15cb3dSCy SchubertIf the
64909100258SXin LI.Ar associd
6502b15cb3dSCy Schubertis zero, the variables are from the
6512b15cb3dSCy Schubert.Sx System Variables
6522b15cb3dSCy Schubertname space, otherwise they are from the
6532b15cb3dSCy Schubert.Sx Peer Variables
6542b15cb3dSCy Schubertname space.
6552b15cb3dSCy SchubertThe
65609100258SXin LI.Ar associd
6572b15cb3dSCy Schubertis required, as the same name can occur in both spaces.
65809100258SXin LIAuthentication is required.
6592b15cb3dSCy Schubert.El
6602b15cb3dSCy Schubert.Ss Status Words and Kiss Codes
6612b15cb3dSCy SchubertThe current state of the operating program is shown
6622b15cb3dSCy Schubertin a set of status words
6632b15cb3dSCy Schubertmaintained by the system.
6642b15cb3dSCy SchubertStatus information is also available on a per\-association basis.
66509100258SXin LIThese words are displayed by the
66609100258SXin LI.Ic readlist
6672b15cb3dSCy Schubertand
66809100258SXin LI.Ic associations
6692b15cb3dSCy Schubertcommands both in hexadecimal and in decoded short tip strings.
6702b15cb3dSCy SchubertThe codes, tips and short explanations are documented on the
6712b15cb3dSCy Schubert.Lk decode.html "Event Messages and Status Words"
6722b15cb3dSCy Schubertpage.
6732b15cb3dSCy SchubertThe page also includes a list of system and peer messages,
6742b15cb3dSCy Schubertthe code for the latest of which is included in the status word.
6752b15cb3dSCy Schubert.Pp
6762b15cb3dSCy SchubertInformation resulting from protocol machine state transitions
6772b15cb3dSCy Schubertis displayed using an informal set of ASCII strings called
6782b15cb3dSCy Schubert.Lk decode.html#kiss "kiss codes" .
6792b15cb3dSCy SchubertThe original purpose was for kiss\-o'\-death (KoD) packets
6802b15cb3dSCy Schubertsent by the server to advise the client of an unusual condition.
6812b15cb3dSCy SchubertThey are now displayed, when appropriate,
6822b15cb3dSCy Schubertin the reference identifier field in various billboards.
6832b15cb3dSCy Schubert.Ss System Variables
6842b15cb3dSCy SchubertThe following system variables appear in the
68509100258SXin LI.Ic readlist
6862b15cb3dSCy Schubertbillboard.
6872b15cb3dSCy SchubertNot all variables are displayed in some configurations.
68809100258SXin LI.Pp
6892b15cb3dSCy Schubert.Bl -tag -width "something" -compact -offset indent
6902b15cb3dSCy Schubert.It Variable
6912b15cb3dSCy SchubertDescription
69209100258SXin LI.It Cm status
6932b15cb3dSCy Schubert.Lk decode.html#sys "system status word"
69409100258SXin LI.It Cm version
6952b15cb3dSCy SchubertNTP software version and build time
69609100258SXin LI.It Cm processor
6972b15cb3dSCy Schuberthardware platform and version
69809100258SXin LI.It Cm system
6992b15cb3dSCy Schubertoperating system and version
70009100258SXin LI.It Cm leap
7012b15cb3dSCy Schubertleap warning indicator (0\-3)
70209100258SXin LI.It Cm stratum
7032b15cb3dSCy Schubertstratum (1\-15)
70409100258SXin LI.It Cm precision
7052b15cb3dSCy Schubertprecision (log2 s)
70609100258SXin LI.It Cm rootdelay
7072b15cb3dSCy Schuberttotal roundtrip delay to the primary reference clock
70809100258SXin LI.It Cm rootdisp
7092b15cb3dSCy Schuberttotal dispersion to the primary reference clock
71009100258SXin LI.It Cm refid
71109100258SXin LIreference id or
71209100258SXin LI.Lk decode.html#kiss "kiss code"
71309100258SXin LI.It Cm reftime
71409100258SXin LIreference time
7152b15cb3dSCy Schubert.It Ic clock
7162b15cb3dSCy Schubertdate and time of day
71709100258SXin LI.It Cm peer
71809100258SXin LIsystem peer association id
71909100258SXin LI.It Cm tc
72009100258SXin LItime constant and poll exponent (log2 s) (3\-17)
72109100258SXin LI.It Cm mintc
72209100258SXin LIminimum time constant (log2 s) (3\-10)
72309100258SXin LI.It Cm offset
7242b15cb3dSCy Schubertcombined offset of server relative to this host
72509100258SXin LI.It Cm frequency
72609100258SXin LIfrequency drift (PPM) relative to hardware clock
72709100258SXin LI.It Cm sys_jitter
7282b15cb3dSCy Schubertcombined system jitter
72909100258SXin LI.It Cm clk_wander
7302b15cb3dSCy Schubertclock frequency wander (PPM)
73109100258SXin LI.It Cm clk_jitter
7322b15cb3dSCy Schubertclock jitter
73309100258SXin LI.It Cm tai
7342b15cb3dSCy SchubertTAI\-UTC offset (s)
73509100258SXin LI.It Cm leapsec
7362b15cb3dSCy SchubertNTP seconds when the next leap second is/was inserted
73709100258SXin LI.It Cm expire
7382b15cb3dSCy SchubertNTP seconds when the NIST leapseconds file expires
7392b15cb3dSCy Schubert.El
7402b15cb3dSCy SchubertThe jitter and wander statistics are exponentially\-weighted RMS averages.
7412b15cb3dSCy SchubertThe system jitter is defined in the NTPv4 specification;
7422b15cb3dSCy Schubertthe clock jitter statistic is computed by the clock discipline module.
7432b15cb3dSCy Schubert.Pp
7442b15cb3dSCy SchubertWhen the NTPv4 daemon is compiled with the OpenSSL software library,
7452b15cb3dSCy Schubertadditional system variables are displayed,
7462b15cb3dSCy Schubertincluding some or all of the following,
7472b15cb3dSCy Schubertdepending on the particular Autokey dance:
7482b15cb3dSCy Schubert.Bl -tag -width "something" -compact -offset indent
7492b15cb3dSCy Schubert.It Variable
7502b15cb3dSCy SchubertDescription
75109100258SXin LI.It Cm host
7522b15cb3dSCy SchubertAutokey host name for this host
75309100258SXin LI.It Cm ident
7542b15cb3dSCy SchubertAutokey group name for this host
75509100258SXin LI.It Cm flags
7562b15cb3dSCy Schuberthost flags  (see Autokey specification)
75709100258SXin LI.It Cm digest
7582b15cb3dSCy SchubertOpenSSL message digest algorithm
75909100258SXin LI.It Cm signature
7602b15cb3dSCy SchubertOpenSSL digest/signature scheme
76109100258SXin LI.It Cm update
7622b15cb3dSCy SchubertNTP seconds at last signature update
76309100258SXin LI.It Cm cert
7642b15cb3dSCy Schubertcertificate subject, issuer and certificate flags
76509100258SXin LI.It Cm until
7662b15cb3dSCy SchubertNTP seconds when the certificate expires
7672b15cb3dSCy Schubert.El
7682b15cb3dSCy Schubert.Ss Peer Variables
7692b15cb3dSCy SchubertThe following peer variables appear in the
77009100258SXin LI.Ic readlist
7712b15cb3dSCy Schubertbillboard for each association.
7722b15cb3dSCy SchubertNot all variables are displayed in some configurations.
77309100258SXin LI.Pp
7742b15cb3dSCy Schubert.Bl -tag -width "something" -compact -offset indent
7752b15cb3dSCy Schubert.It Variable
7762b15cb3dSCy SchubertDescription
77709100258SXin LI.It Cm associd
77809100258SXin LIassociation id
77909100258SXin LI.It Cm status
7802b15cb3dSCy Schubert.Lk decode.html#peer "peer status word"
78109100258SXin LI.It Cm srcadr
7822b15cb3dSCy Schubertsource (remote) IP address
78309100258SXin LI.It Cm srcport
7842b15cb3dSCy Schubertsource (remote) port
78509100258SXin LI.It Cm dstadr
7862b15cb3dSCy Schubertdestination (local) IP address
78709100258SXin LI.It Cm dstport
7882b15cb3dSCy Schubertdestination (local) port
78909100258SXin LI.It Cm leap
7902b15cb3dSCy Schubertleap indicator (0\-3)
79109100258SXin LI.It Cm stratum
7922b15cb3dSCy Schubertstratum (0\-15)
79309100258SXin LI.It Cm precision
7942b15cb3dSCy Schubertprecision (log2 s)
79509100258SXin LI.It Cm rootdelay
7962b15cb3dSCy Schuberttotal roundtrip delay to the primary reference clock
79709100258SXin LI.It Cm rootdisp
7982b15cb3dSCy Schuberttotal root dispersion to the primary reference clock
79909100258SXin LI.It Cm refid
80009100258SXin LIreference id or
8012b15cb3dSCy Schubert.Lk decode.html#kiss "kiss code"
80209100258SXin LI.It Cm reftime
8032b15cb3dSCy Schubertreference time
80409100258SXin LI.It Cm rec
80509100258SXin LIlast packet received time
80609100258SXin LI.It Cm reach
8072b15cb3dSCy Schubertreach register (octal)
80809100258SXin LI.It Cm unreach
8092b15cb3dSCy Schubertunreach counter
81009100258SXin LI.It Cm hmode
8112b15cb3dSCy Schuberthost mode (1\-6)
81209100258SXin LI.It Cm pmode
8132b15cb3dSCy Schubertpeer mode (1\-5)
81409100258SXin LI.It Cm hpoll
8152b15cb3dSCy Schuberthost poll exponent (log2 s) (3\-17)
81609100258SXin LI.It Cm ppoll
8172b15cb3dSCy Schubertpeer poll exponent (log2 s) (3\-17)
81809100258SXin LI.It Cm headway
8192b15cb3dSCy Schubertheadway (see
8202b15cb3dSCy Schubert.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
82109100258SXin LI.It Cm flash
8222b15cb3dSCy Schubert.Lk decode.html#flash "flash status word"
82309100258SXin LI.It Cm keyid
82409100258SXin LIsymmetric key id
82509100258SXin LI.It Cm offset
8262b15cb3dSCy Schubertfilter offset
82709100258SXin LI.It Cm delay
8282b15cb3dSCy Schubertfilter delay
82909100258SXin LI.It Cm dispersion
8302b15cb3dSCy Schubertfilter dispersion
83109100258SXin LI.It Cm jitter
8322b15cb3dSCy Schubertfilter jitter
83309100258SXin LI.It Cm bias
8342b15cb3dSCy Schubertunicast/broadcast bias
83509100258SXin LI.It Cm xleave
8362b15cb3dSCy Schubertinterleave delay (see
8372b15cb3dSCy Schubert.Lk xleave.html "NTP Interleaved Modes" )
8382b15cb3dSCy Schubert.El
8392b15cb3dSCy SchubertThe
84009100258SXin LI.Cm bias
8412b15cb3dSCy Schubertvariable is calculated when the first broadcast packet is received
8422b15cb3dSCy Schubertafter the calibration volley.
84309100258SXin LIIt represents the offset of the broadcast subgraph relative to the
84409100258SXin LIunicast subgraph.
8452b15cb3dSCy SchubertThe
84609100258SXin LI.Cm xleave
8472b15cb3dSCy Schubertvariable appears only for the interleaved symmetric and interleaved modes.
8482b15cb3dSCy SchubertIt represents the internal queuing, buffering and transmission delays
8492b15cb3dSCy Schubertfor the preceding packet.
8502b15cb3dSCy Schubert.Pp
8512b15cb3dSCy SchubertWhen the NTPv4 daemon is compiled with the OpenSSL software library,
8522b15cb3dSCy Schubertadditional peer variables are displayed, including the following:
8532b15cb3dSCy Schubert.Bl -tag -width "something" -compact -offset indent
8542b15cb3dSCy Schubert.It Variable
8552b15cb3dSCy SchubertDescription
85609100258SXin LI.It Cm flags
8572b15cb3dSCy Schubertpeer flags (see Autokey specification)
85809100258SXin LI.It Cm host
8592b15cb3dSCy SchubertAutokey server name
86009100258SXin LI.It Cm flags
8612b15cb3dSCy Schubertpeer flags (see Autokey specification)
86209100258SXin LI.It Cm signature
8632b15cb3dSCy SchubertOpenSSL digest/signature scheme
86409100258SXin LI.It Cm initsequence
86509100258SXin LIinitial key id
86609100258SXin LI.It Cm initkey
8672b15cb3dSCy Schubertinitial key index
86809100258SXin LI.It Cm timestamp
8692b15cb3dSCy SchubertAutokey signature timestamp
87009100258SXin LI.It Cm ident
87109100258SXin LIAutokey group name for this association
8722b15cb3dSCy Schubert.El
8732b15cb3dSCy Schubert.Ss Clock Variables
8742b15cb3dSCy SchubertThe following clock variables appear in the
87509100258SXin LI.Ic clocklist
8762b15cb3dSCy Schubertbillboard for each association with a reference clock.
8772b15cb3dSCy SchubertNot all variables are displayed in some configurations.
8782b15cb3dSCy Schubert.Bl -tag -width "something" -compact -offset indent
8792b15cb3dSCy Schubert.It Variable
8802b15cb3dSCy SchubertDescription
88109100258SXin LI.It Cm associd
88209100258SXin LIassociation id
88309100258SXin LI.It Cm status
8842b15cb3dSCy Schubert.Lk decode.html#clock "clock status word"
88509100258SXin LI.It Cm device
8862b15cb3dSCy Schubertdevice description
88709100258SXin LI.It Cm timecode
8882b15cb3dSCy SchubertASCII time code string (specific to device)
88909100258SXin LI.It Cm poll
8902b15cb3dSCy Schubertpoll messages sent
89109100258SXin LI.It Cm noreply
8922b15cb3dSCy Schubertno reply
89309100258SXin LI.It Cm badformat
8942b15cb3dSCy Schubertbad format
89509100258SXin LI.It Cm baddata
8962b15cb3dSCy Schubertbad date or time
89709100258SXin LI.It Cm fudgetime1
8982b15cb3dSCy Schubertfudge time 1
89909100258SXin LI.It Cm fudgetime2
9002b15cb3dSCy Schubertfudge time 2
90109100258SXin LI.It Cm stratum
9022b15cb3dSCy Schubertdriver stratum
90309100258SXin LI.It Cm refid
90409100258SXin LIdriver reference id
90509100258SXin LI.It Cm flags
9062b15cb3dSCy Schubertdriver flags
9072b15cb3dSCy Schubert.El
9082b15cb3dSCy Schubert.Sh "OPTIONS"
9092b15cb3dSCy Schubert.Bl -tag
9102b15cb3dSCy Schubert.It  Fl 4 , Fl \-ipv4
91109100258SXin LIForce IPv4 name resolution.
9122b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
9132b15cb3dSCy Schubertipv6.
9142b15cb3dSCy Schubert.sp
91509100258SXin LIForce resolution of following host names on the command line
9162b15cb3dSCy Schubertto the IPv4 namespace.
9172b15cb3dSCy Schubert.It  Fl 6 , Fl \-ipv6
91809100258SXin LIForce IPv6 name resolution.
9192b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
9202b15cb3dSCy Schubertipv4.
9212b15cb3dSCy Schubert.sp
92209100258SXin LIForce resolution of following host names on the command line
9232b15cb3dSCy Schubertto the IPv6 namespace.
9242b15cb3dSCy Schubert.It  Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd
9252b15cb3dSCy Schubertrun a command and exit.
9262b15cb3dSCy SchubertThis option may appear an unlimited number of times.
9272b15cb3dSCy Schubert.sp
9282b15cb3dSCy SchubertThe following argument is interpreted as an interactive format command
9292b15cb3dSCy Schubertand is added to the list of commands to be executed on the specified
9302b15cb3dSCy Schuberthost(s).
9312b15cb3dSCy Schubert.It  Fl d , Fl \-debug\-level
9322b15cb3dSCy SchubertIncrease debug verbosity level.
9332b15cb3dSCy SchubertThis option may appear an unlimited number of times.
9342b15cb3dSCy Schubert.sp
9352b15cb3dSCy Schubert.It  Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number
9362b15cb3dSCy SchubertSet the debug verbosity level.
9372b15cb3dSCy SchubertThis option may appear an unlimited number of times.
9382b15cb3dSCy SchubertThis option takes an integer number as its argument.
9392b15cb3dSCy Schubert.sp
9402b15cb3dSCy Schubert.It  Fl i , Fl \-interactive
9412b15cb3dSCy SchubertForce ntpq to operate in interactive mode.
9422b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
9432b15cb3dSCy Schubertcommand, peers.
9442b15cb3dSCy Schubert.sp
9452b15cb3dSCy SchubertForce \fBntpq\fP to operate in interactive mode.
9462b15cb3dSCy SchubertPrompts will be written to the standard output and
9472b15cb3dSCy Schubertcommands read from the standard input.
9482b15cb3dSCy Schubert.It  Fl n , Fl \-numeric
9492b15cb3dSCy Schubertnumeric host addresses.
9502b15cb3dSCy Schubert.sp
9512b15cb3dSCy SchubertOutput all host addresses in dotted\-quad numeric format rather than
9522b15cb3dSCy Schubertconverting to the canonical host names.
9532b15cb3dSCy Schubert.It  Fl \-old\-rv
9542b15cb3dSCy SchubertAlways output status line with readvar.
9552b15cb3dSCy Schubert.sp
9562b15cb3dSCy SchubertBy default, \fBntpq\fP now suppresses the \fBassocid=...\fP
9572b15cb3dSCy Schubertline that precedes the output of \fBreadvar\fP
9582b15cb3dSCy Schubert(alias \fBrv\fP) when a single variable is requested, such as
9592b15cb3dSCy Schubert\fBntpq \-c "rv 0 offset"\fP.
9602b15cb3dSCy SchubertThis option causes \fBntpq\fP to include both lines of output
9612b15cb3dSCy Schubertfor a single\-variable \fBreadvar\fP.
9622b15cb3dSCy SchubertUsing an environment variable to
9632b15cb3dSCy Schubertpreset this option in a script will enable both older and
9642b15cb3dSCy Schubertnewer \fBntpq\fP to behave identically in this regard.
9652b15cb3dSCy Schubert.It  Fl p , Fl \-peers
9662b15cb3dSCy SchubertPrint a list of the peers.
9672b15cb3dSCy SchubertThis option must not appear in combination with any of the following options:
9682b15cb3dSCy Schubertinteractive.
9692b15cb3dSCy Schubert.sp
9702b15cb3dSCy SchubertPrint a list of the peers known to the server as well as a summary
9712b15cb3dSCy Schubertof their state. This is equivalent to the 'peers' interactive command.
9724990d495SXin LI.It  Fl r Ar keyword , Fl \-refid Ns = Ns Ar keyword
9734990d495SXin LISet default display type for S2+ refids.
9744990d495SXin LIThis option takes a keyword as its argument.  The argument sets an enumeration value that can
9754990d495SXin LIbe tested by comparing them against the option value macro.
9764990d495SXin LIThe available keywords are:
9774990d495SXin LI.in +4
9784990d495SXin LI.nf
9794990d495SXin LI.na
9804990d495SXin LIhash ipv4
9814990d495SXin LI.fi
9824990d495SXin LIor their numeric equivalent.
9834990d495SXin LI.in -4
9844990d495SXin LI.sp
9854990d495SXin LIThe default
9864990d495SXin LI.Ar keyword
9874990d495SXin LIfor this option is:
9884990d495SXin LI.ti +4
9894990d495SXin LI ipv4
9904990d495SXin LI.sp
9914990d495SXin LISet the default display format for S2+ refids.
992a466cc55SCy Schubert.It  Fl u , Fl \-unconnected
993a466cc55SCy SchubertUse unconnected UDP to communicate with ntpd (default on Windows).
994a466cc55SCy Schubert.sp
995a466cc55SCy SchubertOpen an unconnected UDP association to ntpd (the default
996a466cc55SCy Schuberton Windows).
9972b15cb3dSCy Schubert.It  Fl w , Fl \-wide
9982b15cb3dSCy SchubertDisplay the full 'remote' value.
9992b15cb3dSCy Schubert.sp
10002b15cb3dSCy SchubertDisplay the full value of the 'remote' value.  If this requires
10012b15cb3dSCy Schubertmore than 15 characters, display the full value, emit a newline,
10022b15cb3dSCy Schubertand continue the data display properly indented on the next line.
10032b15cb3dSCy Schubert.It Fl \&? , Fl \-help
10042b15cb3dSCy SchubertDisplay usage information and exit.
10052b15cb3dSCy Schubert.It Fl \&! , Fl \-more\-help
10062b15cb3dSCy SchubertPass the extended usage information through a pager.
10072b15cb3dSCy Schubert.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
10082b15cb3dSCy SchubertSave the option state to \fIcfgfile\fP.  The default is the \fIlast\fP
10092b15cb3dSCy Schubertconfiguration file listed in the \fBOPTION PRESETS\fP section, below.
10102b15cb3dSCy SchubertThe command will exit after updating the config file.
10112b15cb3dSCy Schubert.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
10122b15cb3dSCy SchubertLoad options from \fIcfgfile\fP.
10132b15cb3dSCy SchubertThe \fIno\-load\-opts\fP form will disable the loading
10142b15cb3dSCy Schubertof earlier config/rc/ini files.  \fI\-\-no\-load\-opts\fP is handled early,
10152b15cb3dSCy Schubertout of order.
10162b15cb3dSCy Schubert.It Fl \-version Op Brq Ar v|c|n
10172b15cb3dSCy SchubertOutput version of program and exit.  The default mode is `v', a simple
10182b15cb3dSCy Schubertversion.  The `c' mode will print copyright information and `n' will
10192b15cb3dSCy Schubertprint the full copyright notice.
10202b15cb3dSCy Schubert.El
10212b15cb3dSCy Schubert.Sh "OPTION PRESETS"
10222b15cb3dSCy SchubertAny option that is not marked as \fInot presettable\fP may be preset
10232b15cb3dSCy Schubertby loading values from configuration ("RC" or ".INI") file(s) and values from
10242b15cb3dSCy Schubertenvironment variables named:
10252b15cb3dSCy Schubert.nf
10262b15cb3dSCy Schubert  \fBNTPQ_<option\-name>\fP or \fBNTPQ\fP
10272b15cb3dSCy Schubert.fi
10282b15cb3dSCy Schubert.ad
10292b15cb3dSCy SchubertThe environmental presets take precedence (are processed later than)
10302b15cb3dSCy Schubertthe configuration files.
10312b15cb3dSCy SchubertThe \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
10322b15cb3dSCy SchubertIf any of these are directories, then the file \fI.ntprc\fP
10332b15cb3dSCy Schubertis searched for within those directories.
10342b15cb3dSCy Schubert.Sh "ENVIRONMENT"
10352b15cb3dSCy SchubertSee \fBOPTION PRESETS\fP for configuration environment variables.
10362b15cb3dSCy Schubert.Sh "FILES"
10372b15cb3dSCy SchubertSee \fBOPTION PRESETS\fP for configuration files.
10382b15cb3dSCy Schubert.Sh "EXIT STATUS"
10392b15cb3dSCy SchubertOne of the following exit values will be returned:
10402b15cb3dSCy Schubert.Bl -tag
10412b15cb3dSCy Schubert.It 0 " (EXIT_SUCCESS)"
10422b15cb3dSCy SchubertSuccessful program execution.
10432b15cb3dSCy Schubert.It 1 " (EXIT_FAILURE)"
10442b15cb3dSCy SchubertThe operation failed or the command syntax was not valid.
10452b15cb3dSCy Schubert.It 66 " (EX_NOINPUT)"
10462b15cb3dSCy SchubertA specified configuration file could not be loaded.
10472b15cb3dSCy Schubert.It 70 " (EX_SOFTWARE)"
10482b15cb3dSCy Schubertlibopts had an internal operational error.  Please report
10492b15cb3dSCy Schubertit to autogen\-users@lists.sourceforge.net.  Thank you.
10502b15cb3dSCy Schubert.El
10512b15cb3dSCy Schubert.Sh "AUTHORS"
10522b15cb3dSCy SchubertThe University of Delaware and Network Time Foundation
10532b15cb3dSCy Schubert.Sh "COPYRIGHT"
1054*f5f40dd6SCy SchubertCopyright (C) 1992\-2024 The University of Delaware and Network Time Foundation all rights reserved.
10552b15cb3dSCy SchubertThis program is released under the terms of the NTP license, <http://ntp.org/license>.
10562b15cb3dSCy Schubert.Sh "BUGS"
1057a466cc55SCy SchubertPlease send bug reports to: https://bugs.ntp.org, bugs@ntp.org
10582b15cb3dSCy Schubert.Sh "NOTES"
10592b15cb3dSCy SchubertThis manual page was \fIAutoGen\fP\-erated from the \fBntpq\fP
10602b15cb3dSCy Schubertoption definitions.
1061