ntpq.8 revision 293896
1.Dd January 7 2016
2.Dt NTPQ 8 User Commands
3.Os
4.\"  EDIT THIS FILE WITH CAUTION  (ntpq-opts.mdoc)
5.\"
6.\" $FreeBSD: releng/9.3/usr.sbin/ntp/doc/ntpq.8 293896 2016-01-14 09:11:26Z glebius $
7.\"
8.\"  It has been AutoGen-ed  January  7, 2016 at 11:32:02 PM by AutoGen 5.18.5
9.\"  From the definitions    ntpq-opts.def
10.\"  and the template file   agmdoc-cmd.tpl
11.Sh NAME
12.Nm ntpq
13.Nd standard NTP query program
14.Sh SYNOPSIS
15.Nm
16.\" Mixture of short (flag) options and long options
17.Op Fl flags
18.Op Fl flag Op Ar value
19.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
20[ host ...]
21.Pp
22.Sh DESCRIPTION
23The
24.Nm
25utility program is used to query NTP servers which
26implement the standard NTP mode 6 control message formats defined
27in Appendix B of the NTPv3 specification RFC1305, requesting
28information about current state and/or changes in that state.
29The same formats are used in NTPv4, although some of the
30variables have changed and new ones added. The description on this
31page is for the NTPv4 variables.
32The program may be run either in interactive mode or controlled using
33command line arguments.
34Requests to read and write arbitrary
35variables can be assembled, with raw and pretty\-printed output
36options being available.
37The
38.Nm
39utility can also obtain and print a
40list of peers in a common format by sending multiple queries to the
41server.
42If one or more request options is included on the command line
43when
44.Nm
45is executed, each of the requests will be sent
46to the NTP servers running on each of the hosts given as command
47line arguments, or on localhost by default.
48If no request options
49are given,
50.Nm
51will attempt to read commands from the
52standard input and execute these on the NTP server running on the
53first host given on the command line, again defaulting to localhost
54when no other host is specified.
55The
56.Nm
57utility will prompt for
58commands if the standard input is a terminal device.
59.Nm
60uses NTP mode 6 packets to communicate with the
61NTP server, and hence can be used to query any compatible server on
62the network which permits it.
63Note that since NTP is a UDP protocol
64this communication will be somewhat unreliable, especially over
65large distances in terms of network topology.
66The
67.Nm
68utility makes
69one attempt to retransmit requests, and will time requests out if
70the remote host is not heard from within a suitable timeout
71time.
72Specifying a
73command line option other than
74.Fl i
75or
76.Fl n
77will
78cause the specified query (queries) to be sent to the indicated
79host(s) immediately.
80Otherwise,
81.Nm
82will attempt to read
83interactive format commands from the standard input.
84.Ss "Internal Commands"
85Interactive format commands consist of a keyword followed by zero
86to four arguments.
87Only enough characters of the full keyword to
88uniquely identify the command need be typed.
89A
90number of interactive format commands are executed entirely within
91the
92.Nm
93utility itself and do not result in NTP mode 6
94requests being sent to a server.
95These are described following.
96.Bl -tag -width "? [command_keyword]" -compact -offset indent
97.It Ic ? Op  Ar command_keyword
98.It Ic help Op Ar command_keyword
99A
100.Ql \&?
101by itself will print a list of all the command
102keywords known to this incarnation of
103.Nm .
104A
105.Ql \&?
106followed by a command keyword will print function and usage
107information about the command.
108This command is probably a better
109source of information about
110.Nm
111than this manual
112page.
113.It Ic addvars Ar variable_name Ns Xo Op Ic =value
114.Ic ...
115.Xc
116.It Ic rmvars Ar variable_name Ic ...
117.It Ic clearvars
118.It Ic showvars
119The data carried by NTP mode 6 messages consists of a list of
120items of the form
121.Ql variable_name=value ,
122where the
123.Ql =value
124is ignored, and can be omitted,
125in requests to the server to read variables.
126The
127.Nm
128utility maintains an internal list in which data to be included in control
129messages can be assembled, and sent using the
130.Ic readlist
131and
132.Ic writelist
133commands described below.
134The
135.Ic addvars
136command allows variables and their optional values to be added to
137the list.
138If more than one variable is to be added, the list should
139be comma\-separated and not contain white space.
140The
141.Ic rmvars
142command can be used to remove individual variables from the list,
143while the
144.Ic clearlist
145command removes all variables from the
146list.
147The
148.Ic showvars
149command displays the current list of optional variables.
150.It Ic authenticate Op yes | no
151Normally
152.Nm
153does not authenticate requests unless
154they are write requests.
155The command
156.Ql authenticate yes
157causes
158.Nm
159to send authentication with all requests it
160makes.
161Authenticated requests causes some servers to handle
162requests slightly differently, and can occasionally melt the CPU in
163fuzzballs if you turn authentication on before doing a
164.Ic peer
165display.
166The command
167.Ql authenticate
168causes
169.Nm
170to display whether or not
171.Nm
172is currently autheinticating requests.
173.It Ic cooked
174Causes output from query commands to be "cooked", so that
175variables which are recognized by
176.Nm
177will have their
178values reformatted for human consumption.
179Variables which
180.Nm
181thinks should have a decodable value but didn't are
182marked with a trailing
183.Ql \&? .
184.It Xo
185.Ic debug
186.Oo
187.Cm more |
188.Cm less |
189.Cm off
190.Oc
191.Xc
192With no argument, displays the current debug level.
193Otherwise, the debug level is changed to the indicated level.
194.It Ic delay Ar milliseconds
195Specify a time interval to be added to timestamps included in
196requests which require authentication.
197This is used to enable
198(unreliable) server reconfiguration over long delay network paths
199or between machines whose clocks are unsynchronized.
200Actually the
201server does not now require timestamps in authenticated requests,
202so this command may be obsolete.
203.It Ic exit
204Exit
205.Nm .
206.It Ic host Ar hostname
207Set the host to which future queries will be sent.
208.Ar hostname
209may be either a host name or a numeric address.
210.It Ic hostnames Op Cm yes | Cm no
211If
212.Cm yes
213is specified, host names are printed in
214information displays.
215If
216.Cm no
217is specified, numeric
218addresses are printed instead.
219The default is
220.Cm yes ,
221unless
222modified using the command line
223.Fl n
224switch.
225.It Ic keyid Ar keyid
226This command allows the specification of a key number to be
227used to authenticate configuration requests.
228This must correspond
229to the
230.Cm controlkey
231key number the server has been configured to use for this
232purpose.
233.It Ic keytype Xo Oo
234.Cm md5 |
235.Cm OpenSSLDigestType
236.Oc
237.Xc
238Specify the type of key to use for authenticating requests.
239.Cm md5
240is alway supported.
241If
242.Nm
243was built with OpenSSL support,
244any digest type supported by OpenSSL can also be provided.
245If no argument is given, the current
246.Ic keytype
247is displayed.
248.It Ic ntpversion Xo Oo
249.Cm 1 |
250.Cm 2 |
251.Cm 3 |
252.Cm 4
253.Oc
254.Xc
255Sets the NTP version number which
256.Nm
257claims in
258packets.
259Defaults to 3, and note that mode 6 control messages (and
260modes, for that matter) didn't exist in NTP version 1.
261There appear
262to be no servers left which demand version 1.
263With no argument, displays the current NTP version that will be used
264when communicating with servers.
265.It Ic passwd
266This command prompts you to type in a password (which will not
267be echoed) which will be used to authenticate configuration
268requests.
269The password must correspond to the key configured for
270use by the NTP server for this purpose if such requests are to be
271successful.
272.\" Not yet implemented.
273.\" .It Ic poll
274.\" .Op Ar n
275.\" .Op Ic verbose
276.\" Poll an NTP server in client mode
277.\" .Ar n
278.\" times.
279.It Ic quit
280Exit
281.Nm .
282.It Ic raw
283Causes all output from query commands is printed as received
284from the remote server.
285The only formating/interpretation done on
286the data is to transform nonascii data into a printable (but barely
287understandable) form.
288.It Ic timeout Ar milliseconds
289Specify a timeout period for responses to server queries.
290The
291default is about 5000 milliseconds.
292Note that since
293.Nm
294retries each query once after a timeout, the total waiting time for
295a timeout will be twice the timeout value set.
296.It Ic version
297Print the version of the
298.Nm
299program.
300.El
301.Ss "Control Message Commands"
302Association IDs are used to identify system, peer and clock variables.
303System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace.
304Most control commands send a single mode\-6 message to the server and expect a single response message.
305The exceptions are the
306.Li peers
307command, which sends a series of messages,
308and the
309.Li mreadlist
310and
311.Li mreadvar
312commands, which iterate over a range of associations.
313.Bl -tag -width "something" -compact -offset indent
314.It Cm associations
315Display a list of mobilized associations in the form:
316.Dl ind assid status conf reach auth condition last_event cnt
317.Bl -column -offset indent ".Sy Variable" ".Sy Description"
318.It Sy String Ta Sy Description
319.It Li ind Ta index on this list
320.It Li assid Ta association ID
321.It Li status Ta peer status word
322.It Li conf Ta Li yes : persistent, Li no : ephemeral
323.It Li reach Ta Li yes : reachable, Li no : unreachable
324.It Li auth Ta Li ok , Li yes , Li bad and Li none
325.It Li condition Ta selection status (see the Li select field of the peer status word)
326.It Li last_event Ta event report (see the Li event field of the peer status word)
327.It Li cnt Ta event count (see the Li count field of the peer status word)
328.El
329.It Cm authinfo
330Display the authentication statistics.
331.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
332.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ...
333Display a list of clock variables for those associations supporting a reference clock.
334.It Cm :config Op ...
335Send 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.
336.It Cm config\-from\-file Ar filename
337Send the each line of
338.Ar filename
339to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required.
340.It Ic ifstats
341Display statistics for each local network address. Authentication is required.
342.It Ic iostats
343Display network and reference clock I/O statistics.
344.It Ic kerninfo
345Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.
346.It Ic lassociations
347Perform the same function as the associations command, except display mobilized and unmobilized associations.
348.It Ic lopeers Xo
349.Oo Ic \-4 |
350.Ic \-6
351.Oc
352.Xc
353Obtain and print a list of all peers and clients showing
354.Ar dstadr
355(associated with any given IP version).
356.It Ic lpeers Xo
357.Oo Ic \-4 |
358.Ic \-6
359.Oc
360.Xc
361Print a peer spreadsheet for the appropriate IP version(s).
362.Ar dstadr
363(associated with any given IP version).
364.It Ic monstats
365Display monitor facility statistics.
366.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc
367Obtain and print traffic counts collected and maintained by the monitor facility.
368With the exception of
369.Cm sort Ns = Ns Ar sortorder ,
370the options filter the list returned by
371.Cm ntpd.
372The
373.Cm limited
374and
375.Cm kod
376options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
377The
378.Cm mincount Ns = Ns Ar count
379option filters entries representing less than
380.Ar count
381packets.
382The
383.Cm laddr Ns = Ns Ar localaddr
384option filters entries for packets received on any local address other than
385.Ar localaddr .
386.Cm resany Ns = Ns Ar hexmask
387and
388.Cm resall Ns = Ns Ar hexmask
389filter entries containing none or less than all, respectively, of the bits in
390.Ar hexmask ,
391which must begin with
392.Cm 0x .
393The
394.Ar sortorder
395defaults to
396.Cm lstint
397and may be any of
398.Cm addr ,
399.Cm count ,
400.Cm avgint ,
401.Cm lstint ,
402or any of those preceded by a minus sign (hyphen) to reverse the sort order.
403The output columns are:
404.Bl -tag -width "something" -compact -offset indent
405.It Column
406Description
407.It Ic lstint
408Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
409.Nm .
410.It Ic avgint
411Average interval in s between packets from this address.
412.It Ic rstr
413Restriction flags associated with this address.
414Most are copied unchanged from the matching
415.Ic restrict
416command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
417.It Ic r
418Rate control indicator, either
419a period,
420.Ic L
421or
422.Ic K
423for no rate control response,
424rate limiting by discarding, or rate limiting with a KoD response, respectively.
425.It Ic m
426Packet mode.
427.It Ic v
428Packet version number.
429.It Ic count
430Packets received from this address.
431.It Ic rport
432Source port of last packet from this address.
433.It Ic remote address
434DNS name, numeric address, or address followed by
435claimed DNS name which could not be verified in parentheses.
436.El
437.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
438.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ...
439Perform the same function as the
440.Ic readvar
441command, except for a range of association IDs.
442This range is determined from the association list cached by the most recent
443.Ic associations
444command.
445.It Ic opeers Xo
446.Oo Ic \-4 |
447.Ic \-6
448.Oc
449.Xc
450Obtain and print the old\-style list of all peers and clients showing
451.Ar dstadr
452(associated with any given IP version),
453rather than the
454.Ar refid .
455.It Ic passociations
456Perform the same function as the
457.Ic associations
458command,
459except that it uses previously stored data rather than making a new query.
460.It Ic peers
461Display a list of peers in the form:
462.Dl [tally]remote refid st t when pool reach delay offset jitter
463.Bl -tag -width "something" -compact -offset indent
464.It Variable
465Description
466.It Ic [tally]
467single\-character code indicating current value of the
468.Ic select
469field of the
470.Lk decode.html#peer "peer status word"
471.It Ic remote
472host name (or IP number) of peer.
473The value displayed will be truncated to 15 characters  unless the
474.Fl w
475flag is given, in which case the full value will be displayed
476on the first line,
477and the remaining data is displayed on the next line.
478.It Ic refid
479association ID or
480.Lk decode.html#kiss "'kiss code"
481.It Ic st
482stratum
483.It Ic t
484.Ic u :
485unicast or manycast client,
486.Ic b :
487broadcast or multicast client,
488.Ic l :
489local (reference clock),
490.Ic s :
491symmetric (peer),
492.Ic A :
493manycast server,
494.Ic B :
495broadcast server,
496.Ic M :
497multicast server
498.It Ic when
499sec/min/hr since last received packet
500.It Ic poll
501poll interval (log2 s)
502.It Ic reach
503reach shift register (octal)
504.It Ic delay
505roundtrip delay
506.It Ic offset
507offset of server relative to this host
508.It Ic jitter
509jitter
510.El
511.It Ic apeers
512Display a list of peers in the form:
513.Dl [tally]remote refid assid st t when pool reach delay offset jitter
514where the output is just like the
515.Ic peers
516command except that the
517.Ic refid
518is displayed in hex format and the association number is also displayed.
519.It Ic pstats Ar assocID
520Show the statistics for the peer with the given
521.Ar assocID .
522.It Ic readlist Ar assocID
523.It Ic rl Ar assocID
524Read the system or peer variables included in the variable list.
525.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc  Oo , ... Oc
526.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc  Oo , ... Oc
527Display the specified variables.
528If
529.Ar assocID
530is zero, the variables are from the
531.Sx System Variables
532name space, otherwise they are from the
533.Sx Peer Variables
534name space.
535The
536.Ar assocID
537is required, as the same name can occur in both spaces.
538If no
539.Ar name
540is included, all operative variables in the name space are displayed.
541In this case only, if the
542.Ar assocID
543is omitted, it is assumed zero.
544Multiple names are specified with comma separators and without whitespace.
545Note that time values are represented in milliseconds
546and frequency values in parts\-per\-million (PPM).
547Some NTP timestamps are represented in the format
548YYYYMMDDTTTT ,
549where YYYY is the year,
550MM the month of year,
551DD the day of month and
552TTTT the time of day.
553.It Ic reslist
554Show the access control (restrict) list for
555.Nm .
556.It Ic saveconfig Ar filename
557Write the current configuration,
558including any runtime modifications given with
559.Ic :config
560or
561.Ic config\-from\-file ,
562to the ntpd host's file
563.Ar filename .
564This command will be rejected by the server unless
565.Lk miscopt.html#saveconfigdir "saveconfigdir"
566appears in the
567.Ic ntpd
568configuration file.
569.Ar filename
570can use
571.Xr strftime
572format specifies to substitute the current date and time, for example,
573.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] .
574The filename used is stored in system variable
575.Ic savedconfig .
576Authentication is required.
577.It Ic timerstats
578Display interval timer counters.
579.It Ic writelist Ar assocID
580Write the system or peer variables included in the variable list.
581.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ...
582Write the specified variables.
583If the
584.Ar assocID
585is zero, the variables are from the
586.Sx System Variables
587name space, otherwise they are from the
588.Sx Peer Variables
589name space.
590The
591.Ar assocID
592is required, as the same name can occur in both spaces.
593.It Ic sysinfo
594Display operational summary.
595.It Ic sysstats
596Print statistics counters maintained in the protocol module.
597.El
598.Ss Status Words and Kiss Codes
599The current state of the operating program is shown
600in a set of status words
601maintained by the system.
602Status information is also available on a per\-association basis.
603These words are displayed in the
604.Ic rv
605and
606.Ic as
607commands both in hexadecimal and in decoded short tip strings.
608The codes, tips and short explanations are documented on the
609.Lk decode.html "Event Messages and Status Words"
610page.
611The page also includes a list of system and peer messages,
612the code for the latest of which is included in the status word.
613.Pp
614Information resulting from protocol machine state transitions
615is displayed using an informal set of ASCII strings called
616.Lk decode.html#kiss "kiss codes" .
617The original purpose was for kiss\-o'\-death (KoD) packets
618sent by the server to advise the client of an unusual condition.
619They are now displayed, when appropriate,
620in the reference identifier field in various billboards.
621.Ss System Variables
622The following system variables appear in the
623.Ic rv
624billboard.
625Not all variables are displayed in some configurations.
626.Bl -tag -width "something" -compact -offset indent
627.It Variable
628Description
629.It Ic status
630.Lk decode.html#sys "system status word"
631.It Ic version
632NTP software version and build time
633.It Ic processor
634hardware platform and version
635.It Ic system
636operating system and version
637.It Ic leap
638leap warning indicator (0\-3)
639.It Ic stratum
640stratum (1\-15)
641.It Ic precision
642precision (log2 s)
643.It Ic rootdelay
644total roundtrip delay to the primary reference clock
645.It Ic rootdisp
646total dispersion to the primary reference clock
647.It Ic peer
648system peer association ID
649.It Ic tc
650time constant and poll exponent (log2 s) (3\-17)
651.It Ic mintc
652minimum time constant (log2 s) (3\-10)
653.It Ic clock
654date and time of day
655.It Ic refid
656reference ID or
657.Lk decode.html#kiss "kiss code"
658.It Ic reftime
659reference time
660.It Ic offset
661combined  offset of server relative to this host
662.It Ic sys_jitter
663combined system jitter
664.It Ic frequency
665frequency offset (PPM) relative to hardware clock
666.It Ic clk_wander
667clock frequency wander (PPM)
668.It Ic clk_jitter
669clock jitter
670.It Ic tai
671TAI\-UTC offset (s)
672.It Ic leapsec
673NTP seconds when the next leap second is/was inserted
674.It Ic expire
675NTP seconds when the NIST leapseconds file expires
676.El
677The jitter and wander statistics are exponentially\-weighted RMS averages.
678The system jitter is defined in the NTPv4 specification;
679the clock jitter statistic is computed by the clock discipline module.
680.Pp
681When the NTPv4 daemon is compiled with the OpenSSL software library,
682additional system variables are displayed,
683including some or all of the following,
684depending on the particular Autokey dance:
685.Bl -tag -width "something" -compact -offset indent
686.It Variable
687Description
688.It Ic host
689Autokey host name for this host
690.It Ic ident
691Autokey group name for this host
692.It Ic flags
693host flags  (see Autokey specification)
694.It Ic digest
695OpenSSL message digest algorithm
696.It Ic signature
697OpenSSL digest/signature scheme
698.It Ic update
699NTP seconds at last signature update
700.It Ic cert
701certificate subject, issuer and certificate flags
702.It Ic until
703NTP seconds when the certificate expires
704.El
705.Ss Peer Variables
706The following peer variables appear in the
707.Ic rv
708billboard for each association.
709Not all variables are displayed in some configurations.
710.Bl -tag -width "something" -compact -offset indent
711.It Variable
712Description
713.It Ic associd
714association ID
715.It Ic status
716.Lk decode.html#peer "peer status word"
717.It Ic srcadr
718source (remote) IP address
719.It Ic srcport
720source (remote) port
721.It Ic dstadr
722destination (local) IP address
723.It Ic dstport
724destination (local) port
725.It Ic leap
726leap indicator (0\-3)
727.It Ic stratum
728stratum (0\-15)
729.It Ic precision
730precision (log2 s)
731.It Ic rootdelay
732total roundtrip delay to the primary reference clock
733.It Ic rootdisp
734total root dispersion to the primary reference clock
735.It Ic refid
736reference ID or
737.Lk decode.html#kiss "kiss code"
738.It Ic reftime
739reference time
740.It Ic reach
741reach register (octal)
742.It Ic unreach
743unreach counter
744.It Ic hmode
745host mode (1\-6)
746.It Ic pmode
747peer mode (1\-5)
748.It Ic hpoll
749host poll exponent (log2 s) (3\-17)
750.It Ic ppoll
751peer poll exponent (log2 s) (3\-17)
752.It Ic headway
753headway (see
754.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" )
755.It Ic flash
756.Lk decode.html#flash "flash status word"
757.It Ic offset
758filter offset
759.It Ic delay
760filter delay
761.It Ic dispersion
762filter dispersion
763.It Ic jitter
764filter jitter
765.It Ic ident
766Autokey group name for this association
767.It Ic bias
768unicast/broadcast bias
769.It Ic xleave
770interleave delay (see
771.Lk xleave.html "NTP Interleaved Modes" )
772.El
773The
774.Ic bias
775variable is calculated when the first broadcast packet is received
776after the calibration volley.
777It represents the offset of the broadcast subgraph relative to the unicast subgraph.
778The
779.Ic xleave
780variable appears only for the interleaved symmetric and interleaved modes.
781It represents the internal queuing, buffering and transmission delays
782for the preceding packet.
783.Pp
784When the NTPv4 daemon is compiled with the OpenSSL software library,
785additional peer variables are displayed, including the following:
786.Bl -tag -width "something" -compact -offset indent
787.It Variable
788Description
789.It Ic flags
790peer flags (see Autokey specification)
791.It Ic host
792Autokey server name
793.It Ic flags
794peer flags (see Autokey specification)
795.It Ic signature
796OpenSSL digest/signature scheme
797.It Ic initsequence
798initial key ID
799.It Ic initkey
800initial key index
801.It Ic timestamp
802Autokey signature timestamp
803.El
804.Ss Clock Variables
805The following clock variables appear in the
806.Ic cv
807billboard for each association with a reference clock.
808Not all variables are displayed in some configurations.
809.Bl -tag -width "something" -compact -offset indent
810.It Variable
811Description
812.It Ic associd
813association ID
814.It Ic status
815.Lk decode.html#clock "clock status word"
816.It Ic device
817device description
818.It Ic timecode
819ASCII time code string (specific to device)
820.It Ic poll
821poll messages sent
822.It Ic noreply
823no reply
824.It Ic badformat
825bad format
826.It Ic baddata
827bad date or time
828.It Ic fudgetime1
829fudge time 1
830.It Ic fudgetime2
831fudge time 2
832.It Ic stratum
833driver stratum
834.It Ic refid
835driver reference ID
836.It Ic flags
837driver flags
838.El
839.Sh "OPTIONS"
840.Bl -tag
841.It  Fl 4 , Fl \-ipv4 
842Force IPv4 DNS name resolution.
843This option must not appear in combination with any of the following options:
844ipv6.
845.sp
846Force DNS resolution of following host names on the command line
847to the IPv4 namespace.
848.It  Fl 6 , Fl \-ipv6 
849Force IPv6 DNS name resolution.
850This option must not appear in combination with any of the following options:
851ipv4.
852.sp
853Force DNS resolution of following host names on the command line
854to the IPv6 namespace.
855.It  Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd 
856run a command and exit.
857This option may appear an unlimited number of times.
858.sp
859The following argument is interpreted as an interactive format command
860and is added to the list of commands to be executed on the specified
861host(s).
862.It  Fl d , Fl \-debug\-level 
863Increase debug verbosity level.
864This option may appear an unlimited number of times.
865.sp
866.It  Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number 
867Set the debug verbosity level.
868This option may appear an unlimited number of times.
869This option takes an integer number as its argument.
870.sp
871.It  Fl i , Fl \-interactive 
872Force ntpq to operate in interactive mode.
873This option must not appear in combination with any of the following options:
874command, peers.
875.sp
876Force \fBntpq\fP to operate in interactive mode.
877Prompts will be written to the standard output and
878commands read from the standard input.
879.It  Fl n , Fl \-numeric 
880numeric host addresses.
881.sp
882Output all host addresses in dotted\-quad numeric format rather than
883converting to the canonical host names. 
884.It  Fl \-old\-rv 
885Always output status line with readvar.
886.sp
887By default, \fBntpq\fP now suppresses the \fBassocid=...\fP
888line that precedes the output of \fBreadvar\fP
889(alias \fBrv\fP) when a single variable is requested, such as
890\fBntpq \-c "rv 0 offset"\fP.
891This option causes \fBntpq\fP to include both lines of output
892for a single\-variable \fBreadvar\fP.
893Using an environment variable to
894preset this option in a script will enable both older and
895newer \fBntpq\fP to behave identically in this regard.
896.It  Fl p , Fl \-peers 
897Print a list of the peers.
898This option must not appear in combination with any of the following options:
899interactive.
900.sp
901Print a list of the peers known to the server as well as a summary
902of their state. This is equivalent to the 'peers' interactive command.
903.It  Fl w , Fl \-wide 
904Display the full 'remote' value.
905.sp
906Display the full value of the 'remote' value.  If this requires
907more than 15 characters, display the full value, emit a newline,
908and continue the data display properly indented on the next line.
909.It Fl \&? , Fl \-help
910Display usage information and exit.
911.It Fl \&! , Fl \-more\-help
912Pass the extended usage information through a pager.
913.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
914Save the option state to \fIcfgfile\fP.  The default is the \fIlast\fP
915configuration file listed in the \fBOPTION PRESETS\fP section, below.
916The command will exit after updating the config file.
917.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
918Load options from \fIcfgfile\fP.
919The \fIno\-load\-opts\fP form will disable the loading
920of earlier config/rc/ini files.  \fI\-\-no\-load\-opts\fP is handled early,
921out of order.
922.It Fl \-version Op Brq Ar v|c|n
923Output version of program and exit.  The default mode is `v', a simple
924version.  The `c' mode will print copyright information and `n' will
925print the full copyright notice.
926.El
927.Sh "OPTION PRESETS"
928Any option that is not marked as \fInot presettable\fP may be preset
929by loading values from configuration ("RC" or ".INI") file(s) and values from
930environment variables named:
931.nf
932  \fBNTPQ_<option\-name>\fP or \fBNTPQ\fP
933.fi
934.ad
935The environmental presets take precedence (are processed later than)
936the configuration files.
937The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
938If any of these are directories, then the file \fI.ntprc\fP
939is searched for within those directories.
940.Sh "ENVIRONMENT"
941See \fBOPTION PRESETS\fP for configuration environment variables.
942.Sh "FILES"
943See \fBOPTION PRESETS\fP for configuration files.
944.Sh "EXIT STATUS"
945One of the following exit values will be returned:
946.Bl -tag
947.It 0 " (EXIT_SUCCESS)"
948Successful program execution.
949.It 1 " (EXIT_FAILURE)"
950The operation failed or the command syntax was not valid.
951.It 66 " (EX_NOINPUT)"
952A specified configuration file could not be loaded.
953.It 70 " (EX_SOFTWARE)"
954libopts had an internal operational error.  Please report
955it to autogen\-users@lists.sourceforge.net.  Thank you.
956.El
957.Sh "AUTHORS"
958The University of Delaware and Network Time Foundation
959.Sh "COPYRIGHT"
960Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
961This program is released under the terms of the NTP license, <http://ntp.org/license>.
962.Sh "BUGS"
963Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
964.Sh "NOTES"
965This manual page was \fIAutoGen\fP\-erated from the \fBntpq\fP
966option definitions.
967