]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ntp/ntpq/ntpq.1ntpqman
Merge llvm trunk r238337 from ^/vendor/llvm/dist, resolve conflicts, and
[FreeBSD/FreeBSD.git] / contrib / ntp / ntpq / ntpq.1ntpqman
1 .de1 NOP
2 .  it 1 an-trap
3 .  if \\n[.$] \,\\$*\/
4 ..
5 .ie t \
6 .ds B-Font [CB]
7 .ds I-Font [CI]
8 .ds R-Font [CR]
9 .el \
10 .ds B-Font B
11 .ds I-Font I
12 .ds R-Font R
13 .TH ntpq 1ntpqman "07 Apr 2015" "4.2.8p2" "User Commands"
14 .\"
15 .\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
16 .\"
17 .\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
18 .\" From the definitions ntpq-opts.def
19 .\" and the template file agman-cmd.tpl
20 .SH NAME
21 \f\*[B-Font]ntpq\fP
22 \- standard NTP query program
23 .SH SYNOPSIS
24 \f\*[B-Font]ntpq\fP
25 .\" Mixture of short (flag) options and long options
26 [\f\*[B-Font]\-flags\f[]]
27 [\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
28 [\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
29 [ host ...]
30 .sp \n(Ppu
31 .ne 2
32
33 .SH DESCRIPTION
34 The
35 \f\*[B-Font]ntpq\fP
36 utility program is used to query NTP servers which
37 implement the standard NTP mode 6 control message formats defined
38 in Appendix B of the NTPv3 specification RFC1305, requesting
39 information about current state and/or changes in that state.
40 The same formats are used in NTPv4, although some of the
41 variables have changed and new ones added. The description on this
42 page is for the NTPv4 variables.
43 The program may be run either in interactive mode or controlled using
44 command line arguments.
45 Requests to read and write arbitrary
46 variables can be assembled, with raw and pretty-printed output
47 options being available.
48 The
49 \f\*[B-Font]ntpq\fP
50 utility can also obtain and print a
51 list of peers in a common format by sending multiple queries to the
52 server.
53 If one or more request options is included on the command line
54 when
55 \f\*[B-Font]ntpq\fP
56 is executed, each of the requests will be sent
57 to the NTP servers running on each of the hosts given as command
58 line arguments, or on localhost by default.
59 If no request options
60 are given,
61 \f\*[B-Font]ntpq\fP
62 will attempt to read commands from the
63 standard input and execute these on the NTP server running on the
64 first host given on the command line, again defaulting to localhost
65 when no other host is specified.
66 The
67 \f\*[B-Font]ntpq\fP
68 utility will prompt for
69 commands if the standard input is a terminal device.
70 \f\*[B-Font]ntpq\fP
71 uses NTP mode 6 packets to communicate with the
72 NTP server, and hence can be used to query any compatible server on
73 the network which permits it.
74 Note that since NTP is a UDP protocol
75 this communication will be somewhat unreliable, especially over
76 large distances in terms of network topology.
77 The
78 \f\*[B-Font]ntpq\fP
79 utility makes
80 one attempt to retransmit requests, and will time requests out if
81 the remote host is not heard from within a suitable timeout
82 time.
83 Specifying a
84 command line option other than
85 \f\*[B-Font]\-i\f[]
86 or
87 \f\*[B-Font]\-n\f[]
88 will
89 cause the specified query (queries) to be sent to the indicated
90 host(s) immediately.
91 Otherwise,
92 \f\*[B-Font]ntpq\fP
93 will attempt to read
94 interactive format commands from the standard input.
95 .SS "Internal Commands"
96 Interactive format commands consist of a keyword followed by zero
97 to four arguments.
98 Only enough characters of the full keyword to
99 uniquely identify the command need be typed.
100 A
101 number of interactive format commands are executed entirely within
102 the
103 \f\*[B-Font]ntpq\fP
104 utility itself and do not result in NTP mode 6
105 requests being sent to a server.
106 These are described following.
107 .TP 20
108 .NOP \f\*[B-Font]?\f[] [\f\*[I-Font]command_keyword\f[]]
109 .br
110 .ns
111 .TP 20
112 .NOP \f\*[B-Font]help\f[] [\f\*[I-Font]command_keyword\f[]]
113 A
114 \[oq]\&?\[cq]
115 by itself will print a list of all the command
116 keywords known to this incarnation of
117 \f\*[B-Font]ntpq\fP.
118 A
119 \[oq]\&?\[cq]
120 followed by a command keyword will print function and usage
121 information about the command.
122 This command is probably a better
123 source of information about
124 \f\*[B-Font]ntpq\fP
125 than this manual
126 page.
127 .br
128 .ns
129 .TP 20
130 .NOP \f\*[B-Font]addvars\f[] \f\*[I-Font]variable_name\f[][\f\*[B-Font]=value\f[]] \f\*[B-Font]...\f[]
131 .br
132 .ns
133 .TP 20
134 .NOP \f\*[B-Font]rmvars\f[] \f\*[I-Font]variable_name\f[] \f\*[B-Font]...\f[]
135 .br
136 .ns
137 .TP 20
138 .NOP \f\*[B-Font]clearvars\f[]
139 .br
140 .ns
141 .TP 20
142 .NOP \f\*[B-Font]showvars\f[]
143 The data carried by NTP mode 6 messages consists of a list of
144 items of the form
145 \[oq]variable_name=value\[cq],
146 where the
147 \[oq]=value\[cq]
148 is ignored, and can be omitted,
149 in requests to the server to read variables.
150 The
151 \f\*[B-Font]ntpq\fP
152 utility maintains an internal list in which data to be included in control
153 messages can be assembled, and sent using the
154 \f\*[B-Font]readlist\f[]
155 and
156 \f\*[B-Font]writelist\f[]
157 commands described below.
158 The
159 \f\*[B-Font]addvars\f[]
160 command allows variables and their optional values to be added to
161 the list.
162 If more than one variable is to be added, the list should
163 be comma-separated and not contain white space.
164 The
165 \f\*[B-Font]rmvars\f[]
166 command can be used to remove individual variables from the list,
167 while the
168 \f\*[B-Font]clearlist\f[]
169 command removes all variables from the
170 list.
171 The
172 \f\*[B-Font]showvars\f[]
173 command displays the current list of optional variables.
174 .br
175 .ns
176 .TP 20
177 .NOP \f\*[B-Font]authenticate\f[] [yes | no]
178 Normally
179 \f\*[B-Font]ntpq\fP
180 does not authenticate requests unless
181 they are write requests.
182 The command
183 \[oq]authenticate yes\[cq]
184 causes
185 \f\*[B-Font]ntpq\fP
186 to send authentication with all requests it
187 makes.
188 Authenticated requests causes some servers to handle
189 requests slightly differently, and can occasionally melt the CPU in
190 fuzzballs if you turn authentication on before doing a
191 \f\*[B-Font]peer\f[]
192 display.
193 The command
194 \[oq]authenticate\[cq]
195 causes
196 \f\*[B-Font]ntpq\fP
197 to display whether or not
198 \f\*[B-Font]ntpq\fP
199 is currently autheinticating requests.
200 .br
201 .ns
202 .TP 20
203 .NOP \f\*[B-Font]cooked\f[]
204 Causes output from query commands to be "cooked", so that
205 variables which are recognized by
206 \f\*[B-Font]ntpq\fP
207 will have their
208 values reformatted for human consumption.
209 Variables which
210 \f\*[B-Font]ntpq\fP
211 thinks should have a decodable value but didn't are
212 marked with a trailing
213 \[oq]\&?\[cq].
214 .br
215 .ns
216 .TP 20
217 .NOP \f\*[B-Font]debug\f[] [\f\*[B-Font]more\f[] | \f\*[B-Font]less\f[] | \f\*[B-Font]off\f[]]
218 With no argument, displays the current debug level.
219 Otherwise, the debug level is changed to the indicated level.
220 .br
221 .ns
222 .TP 20
223 .NOP \f\*[B-Font]delay\f[] \f\*[I-Font]milliseconds\f[]
224 Specify a time interval to be added to timestamps included in
225 requests which require authentication.
226 This is used to enable
227 (unreliable) server reconfiguration over long delay network paths
228 or between machines whose clocks are unsynchronized.
229 Actually the
230 server does not now require timestamps in authenticated requests,
231 so this command may be obsolete.
232 .br
233 .ns
234 .TP 20
235 .NOP \f\*[B-Font]exit\f[]
236 Exit
237 \f\*[B-Font]ntpq\fP.
238 .br
239 .ns
240 .TP 20
241 .NOP \f\*[B-Font]host\f[] \f\*[I-Font]hostname\f[]
242 Set the host to which future queries will be sent.
243 \f\*[I-Font]hostname\f[]
244 may be either a host name or a numeric address.
245 .br
246 .ns
247 .TP 20
248 .NOP \f\*[B-Font]hostnames\f[] [\f\*[B-Font]yes\f[] | \f\*[B-Font]no\f[]]
249 If
250 \f\*[B-Font]yes\f[]
251 is specified, host names are printed in
252 information displays.
253 If
254 \f\*[B-Font]no\f[]
255 is specified, numeric
256 addresses are printed instead.
257 The default is
258 \f\*[B-Font]yes\f[],
259 unless
260 modified using the command line
261 \f\*[B-Font]\-n\f[]
262 switch.
263 .br
264 .ns
265 .TP 20
266 .NOP \f\*[B-Font]keyid\f[] \f\*[I-Font]keyid\f[]
267 This command allows the specification of a key number to be
268 used to authenticate configuration requests.
269 This must correspond
270 to a key number the server has been configured to use for this
271 purpose.
272 .br
273 .ns
274 .TP 20
275 .NOP \f\*[B-Font]keytype\f[] [\f\*[B-Font]md5\f[] | \f\*[B-Font]OpenSSLDigestType\f[]]
276 Specify the type of key to use for authenticating requests.
277 \f\*[B-Font]md5\f[]
278 is alway supported.
279 If
280 \f\*[B-Font]ntpq\fP
281 was built with OpenSSL support,
282 any digest type supported by OpenSSL can also be provided.
283 If no argument is given, the current
284 \f\*[B-Font]keytype\f[]
285 is displayed.
286 .br
287 .ns
288 .TP 20
289 .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[]]
290 Sets the NTP version number which
291 \f\*[B-Font]ntpq\fP
292 claims in
293 packets.
294 Defaults to 3, and note that mode 6 control messages (and
295 modes, for that matter) didn't exist in NTP version 1.
296 There appear
297 to be no servers left which demand version 1.
298 With no argument, displays the current NTP version that will be used
299 when communicating with servers.
300 .br
301 .ns
302 .TP 20
303 .NOP \f\*[B-Font]passwd\f[]
304 This command prompts you to type in a password (which will not
305 be echoed) which will be used to authenticate configuration
306 requests.
307 The password must correspond to the key configured for
308 use by the NTP server for this purpose if such requests are to be
309 successful.
310 .\" Not yet implemented.
311 .\" .It Ic poll
312 .\" .Op Ar n
313 .\" .Op Ic verbose
314 .\" Poll an NTP server in client mode
315 .\" .Ar n
316 .\" times.
317 .br
318 .ns
319 .TP 20
320 .NOP \f\*[B-Font]quit\f[]
321 Exit
322 \f\*[B-Font]ntpq\fP.
323 .br
324 .ns
325 .TP 20
326 .NOP \f\*[B-Font]raw\f[]
327 Causes all output from query commands is printed as received
328 from the remote server.
329 The only formating/interpretation done on
330 the data is to transform nonascii data into a printable (but barely
331 understandable) form.
332 .br
333 .ns
334 .TP 20
335 .NOP \f\*[B-Font]timeout\f[] \f\*[I-Font]milliseconds\f[]
336 Specify a timeout period for responses to server queries.
337 The
338 default is about 5000 milliseconds.
339 Note that since
340 \f\*[B-Font]ntpq\fP
341 retries each query once after a timeout, the total waiting time for
342 a timeout will be twice the timeout value set.
343 .br
344 .ns
345 .TP 20
346 .NOP \f\*[B-Font]version\f[]
347 Print the version of the
348 \f\*[B-Font]ntpq\fP
349 program.
350 .PP
351 .SS "Control Message Commands"
352 Association IDs are used to identify system, peer and clock variables.
353 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.
354 Most control commands send a single mode-6 message to the server and expect a single response message.
355 The exceptions are the
356 \f[C]peers\f[]
357 command, which sends a series of messages,
358 and the
359 \f[C]mreadlist\f[]
360 and
361 \f[C]mreadvar\f[]
362 commands, which iterate over a range of associations.
363 .TP 10
364 .NOP \f\*[B-Font]associations\f[]
365 Display a list of mobilized associations in the form:
366 .Dl ind assid status conf reach auth condition last_event cnt
367 .RS
368 .IP \fB\(bu\fP 2
369 .IP \fB\(bu\fP 2 \f[C]ind\f[] \f[C]Ta\f[] \f[C]index\f[] \f[C]on\f[] \f[C]this\f[] \f[C]list\f[]
370 .IP \fB\(bu\fP 2 \f[C]assid\f[] \f[C]Ta\f[] \f[C]association\f[] \f[C]ID\f[]
371 .IP \fB\(bu\fP 2 \f[C]status\f[] \f[C]Ta\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word\f[]
372 .IP \fB\(bu\fP 2 \f[C]conf\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]persistent,\f[] \f[C]no\f[]: \f[C]ephemeral\f[]
373 .IP \fB\(bu\fP 2 \f[C]reach\f[] \f[C]Ta\f[] \f[C]yes\f[]: \f[C]reachable,\f[] \f[C]no\f[]: \f[C]unreachable\f[]
374 .IP \fB\(bu\fP 2 \f[C]auth\f[] \f[C]Ta\f[] \f[C]ok\f[], \f[C]yes\f[], \f[C]bad\f[] \f[C]and\f[] \f[C]none\f[]
375 .IP \fB\(bu\fP 2 \f[C]condition\f[] \f[C]Ta\f[] \f[C]selection\f[] \f[C]status\f[] \f[C](see\f[] \f[C]the\f[] \f[C]select\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
376 .IP \fB\(bu\fP 2 \f[C]last_event\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]report\f[] \f[C](see\f[] \f[C]the\f[] \f[C]event\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
377 .IP \fB\(bu\fP 2 \f[C]cnt\f[] \f[C]Ta\f[] \f[C]event\f[] \f[C]count\f[] \f[C](see\f[] \f[C]the\f[] \f[C]count\f[] \f[C]field\f[] \f[C]of\f[] \f[C]the\f[] \f[C]peer\f[] \f[C]status\f[] \f[C]word)\f[]
378 .RE
379 .br
380 .ns
381 .TP 10
382 .NOP \f\*[B-Font]authinfo\f[]
383 Display the authentication statistics.
384 .br
385 .ns
386 .TP 10
387 .NOP \f\*[B-Font]clockvar\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
388 .br
389 .ns
390 .TP 10
391 .NOP \f\*[B-Font]cv\f[] \f\*[I-Font]assocID\f[] [\f\*[I-Font]name\f[][\f\*[B-Font]=\f[]\f\*[I-Font]value\f[]] [] ...]
392 Display a list of clock variables for those associations supporting a reference clock.
393 .br
394 .ns
395 .TP 10
396 .NOP \f\*[B-Font]:config\f[] [...]
397 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.
398 .br
399 .ns
400 .TP 10
401 .NOP \f\*[B-Font]config-from-file\f[] \f\*[I-Font]filename\f[]
402 Send the each line of
403 \f\*[I-Font]filename\f[]
404 to 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.
405 .br
406 .ns
407 .TP 10
408 .NOP \f\*[B-Font]ifstats\f[]
409 Display statistics for each local network address. Authentication is required.
410 .br
411 .ns
412 .TP 10
413 .NOP \f\*[B-Font]iostats\f[]
414 Display network and reference clock I/O statistics.
415 .br
416 .ns
417 .TP 10
418 .NOP \f\*[B-Font]kerninfo\f[]
419 Display 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.
420 .br
421 .ns
422 .TP 10
423 .NOP \f\*[B-Font]lassociations\f[]
424 Perform the same function as the associations command, except display mobilized and unmobilized associations.
425 .br
426 .ns
427 .TP 10
428 .NOP \f\*[B-Font]lopeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
429 Obtain and print a list of all peers and clients showing
430 \f\*[I-Font]dstadr\f[]
431 (associated with any given IP version).
432 .br
433 .ns
434 .TP 10
435 .NOP \f\*[B-Font]lpeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
436 Print a peer spreadsheet for the appropriate IP version(s).
437 \f\*[I-Font]dstadr\f[]
438 (associated with any given IP version).
439 .br
440 .ns
441 .TP 10
442 .NOP \f\*[B-Font]monstats\f[]
443 Display monitor facility statistics.
444 .br
445 .ns
446 .TP 10
447 .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[]]
448 Obtain and print traffic counts collected and maintained by the monitor facility.
449 With the exception of
450 \f\*[B-Font]sort\f[]=\f\*[I-Font]sortorder\f[],
451 the options filter the list returned by
452 \f\*[B-Font]ntpd.\f[]
453 The
454 \f\*[B-Font]limited\f[]
455 and
456 \f\*[B-Font]kod\f[]
457 options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response.
458 The
459 \f\*[B-Font]mincount\f[]=\f\*[I-Font]count\f[]
460 option filters entries representing less than
461 \f\*[I-Font]count\f[]
462 packets.
463 The
464 \f\*[B-Font]laddr\f[]=\f\*[I-Font]localaddr\f[]
465 option filters entries for packets received on any local address other than
466 \f\*[I-Font]localaddr\f[].
467 \f\*[B-Font]resany\f[]=\f\*[I-Font]hexmask\f[]
468 and
469 \f\*[B-Font]resall\f[]=\f\*[I-Font]hexmask\f[]
470 filter entries containing none or less than all, respectively, of the bits in
471 \f\*[I-Font]hexmask\f[],
472 which must begin with
473 \f\*[B-Font]0x\f[].
474 The
475 \f\*[I-Font]sortorder\f[]
476 defaults to
477 \f\*[B-Font]lstint\f[]
478 and may be any of
479 \f\*[B-Font]addr\f[],
480 \f\*[B-Font]count\f[],
481 \f\*[B-Font]avgint\f[],
482 \f\*[B-Font]lstint\f[],
483 or any of those preceded by a minus sign (hyphen) to reverse the sort order.
484 The output columns are:
485 .RS
486 .TP 10
487 .NOP Column
488 Description
489 .br
490 .ns
491 .TP 10
492 .NOP \f\*[B-Font]lstint\f[]
493 Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by
494 \f\*[B-Font]ntpq\fP.
495 .br
496 .ns
497 .TP 10
498 .NOP \f\*[B-Font]avgint\f[]
499 Average interval in s between packets from this address.
500 .br
501 .ns
502 .TP 10
503 .NOP \f\*[B-Font]rstr\f[]
504 Restriction flags associated with this address.
505 Most are copied unchanged from the matching
506 \f\*[B-Font]restrict\f[]
507 command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response.
508 .br
509 .ns
510 .TP 10
511 .NOP \f\*[B-Font]r\f[]
512 Rate control indicator, either
513 a period,
514 \f\*[B-Font]L\f[]
515 or
516 \f\*[B-Font]K\f[]
517 for no rate control response,
518 rate limiting by discarding, or rate limiting with a KoD response, respectively.
519 .br
520 .ns
521 .TP 10
522 .NOP \f\*[B-Font]m\f[]
523 Packet mode.
524 .br
525 .ns
526 .TP 10
527 .NOP \f\*[B-Font]v\f[]
528 Packet version number.
529 .br
530 .ns
531 .TP 10
532 .NOP \f\*[B-Font]count\f[]
533 Packets received from this address.
534 .br
535 .ns
536 .TP 10
537 .NOP \f\*[B-Font]rport\f[]
538 Source port of last packet from this address.
539 .br
540 .ns
541 .TP 10
542 .NOP \f\*[B-Font]remote\f[] \f\*[B-Font]address\f[]
543 DNS name, numeric address, or address followed by
544 claimed DNS name which could not be verified in parentheses.
545 .RE
546 .br
547 .ns
548 .TP 10
549 .NOP \f\*[B-Font]mreadvar\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
550 .br
551 .ns
552 .TP 10
553 .NOP \f\*[B-Font]mrv\f[] \f\*[B-Font]assocID\f[] \f\*[B-Font]assocID\f[] [\f\*[I-Font]variable_name\f[][=\f\*[I-Font]value\f[]]] ...
554 Perform the same function as the
555 \f\*[B-Font]readvar\f[]
556 command, except for a range of association IDs.
557 This range is determined from the association list cached by the most recent
558 \f\*[B-Font]associations\f[]
559 command.
560 .br
561 .ns
562 .TP 10
563 .NOP \f\*[B-Font]opeers\f[] [\f\*[B-Font]\-4\f[] | \f\*[B-Font]\-6\f[]]
564 Obtain and print the old-style list of all peers and clients showing
565 \f\*[I-Font]dstadr\f[]
566 (associated with any given IP version),
567 rather than the
568 \f\*[I-Font]refid\f[].
569 .br
570 .ns
571 .TP 10
572 .NOP \f\*[B-Font]passociations\f[]
573 Perform the same function as the
574 \f\*[B-Font]associations\f[]
575 command,
576 except that it uses previously stored data rather than making a new query.
577 .br
578 .ns
579 .TP 10
580 .NOP \f\*[B-Font]peers\f[]
581 Display a list of peers in the form:
582 .Dl [tally]remote refid st t when pool reach delay offset jitter
583 .RS
584 .TP 10
585 .NOP Variable
586 Description
587 .br
588 .ns
589 .TP 10
590 .NOP \f\*[B-Font][tally]\f[]
591 single-character code indicating current value of the
592 \f\*[B-Font]select\f[]
593 field of the
594 .Lk decode.html#peer "peer status word"
595 .br
596 .ns
597 .TP 10
598 .NOP \f\*[B-Font]remote\f[]
599 host name (or IP number) of peer.
600 The value displayed will be truncated to 15 characters  unless the
601 \f\*[B-Font]\-w\f[]
602 flag is given, in which case the full value will be displayed
603 on the first line,
604 and the remaining data is displayed on the next line.
605 .br
606 .ns
607 .TP 10
608 .NOP \f\*[B-Font]refid\f[]
609 association ID or
610 .Lk decode.html#kiss "'kiss code"
611 .br
612 .ns
613 .TP 10
614 .NOP \f\*[B-Font]st\f[]
615 stratum
616 .br
617 .ns
618 .TP 10
619 .NOP \f\*[B-Font]t\f[]
620 \f\*[B-Font]u\f[]:
621 unicast or manycast client,
622 \f\*[B-Font]b\f[]:
623 broadcast or multicast client,
624 \f\*[B-Font]l\f[]:
625 local (reference clock),
626 \f\*[B-Font]s\f[]:
627 symmetric (peer),
628 \f\*[B-Font]A\f[]:
629 manycast server,
630 \f\*[B-Font]B\f[]:
631 broadcast server,
632 \f\*[B-Font]M\f[]:
633 multicast server
634 .br
635 .ns
636 .TP 10
637 .NOP \f\*[B-Font]when\f[]
638 sec/min/hr since last received packet
639 .br
640 .ns
641 .TP 10
642 .NOP \f\*[B-Font]poll\f[]
643 poll interval (log2 s)
644 .br
645 .ns
646 .TP 10
647 .NOP \f\*[B-Font]reach\f[]
648 reach shift register (octal)
649 .br
650 .ns
651 .TP 10
652 .NOP \f\*[B-Font]delay\f[]
653 roundtrip delay
654 .br
655 .ns
656 .TP 10
657 .NOP \f\*[B-Font]offset\f[]
658 offset of server relative to this host
659 .br
660 .ns
661 .TP 10
662 .NOP \f\*[B-Font]jitter\f[]
663 jitter
664 .RE
665 .br
666 .ns
667 .TP 10
668 .NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
669 Show the statistics for the peer with the given
670 \f\*[I-Font]assocID\f[].
671 .br
672 .ns
673 .TP 10
674 .NOP \f\*[B-Font]readlist\f[] \f\*[I-Font]assocID\f[]
675 .br
676 .ns
677 .TP 10
678 .NOP \f\*[B-Font]rl\f[] \f\*[I-Font]assocID\f[]
679 Read the system or peer variables included in the variable list.
680 .br
681 .ns
682 .TP 10
683 .NOP \f\*[B-Font]readvar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
684 .br
685 .ns
686 .TP 10
687 .NOP \f\*[B-Font]rv\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[][=\f\*[I-Font]value\f[]] [, ...]
688 Display the specified variables.
689 If
690 \f\*[I-Font]assocID\f[]
691 is zero, the variables are from the
692 \fISystem\f[] \fIVariables\f[]
693 name space, otherwise they are from the
694 \fIPeer\f[] \fIVariables\f[]
695 name space.
696 The
697 \f\*[I-Font]assocID\f[]
698 is required, as the same name can occur in both spaces.
699 If no
700 \f\*[I-Font]name\f[]
701 is included, all operative variables in the name space are displayed.
702 In this case only, if the
703 \f\*[I-Font]assocID\f[]
704 is omitted, it is assumed zero.
705 Multiple names are specified with comma separators and without whitespace.
706 Note that time values are represented in milliseconds
707 and frequency values in parts-per-million (PPM).
708 Some NTP timestamps are represented in the format
709 YYYYMMDDTTTT ,
710 where YYYY is the year,
711 MM the month of year,
712 DD the day of month and
713 TTTT the time of day.
714 .br
715 .ns
716 .TP 10
717 .NOP \f\*[B-Font]reslist\f[]
718 Show the access control (restrict) list for
719 \f\*[B-Font]ntpq\fP.
720 .br
721 .ns
722 .TP 10
723 .NOP \f\*[B-Font]saveconfig\f[] \f\*[I-Font]filename\f[]
724 Write the current configuration,
725 including any runtime modifications given with
726 \f\*[B-Font]:config\f[]
727 or
728 \f\*[B-Font]config-from-file\f[],
729 to the ntpd host's file
730 \f\*[I-Font]filename\f[].
731 This command will be rejected by the server unless
732 .Lk miscopt.html#saveconfigdir "saveconfigdir"
733 appears in the
734 \f\*[B-Font]ntpd\f[]
735 configuration file.
736 \f\*[I-Font]filename\f[]
737 can use
738 \fCstrftime\fR()\f[]
739 format specifies to substitute the current date and time, for example,
740 \f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
741 The filename used is stored in system variable
742 \f\*[B-Font]savedconfig\f[].
743 Authentication is required.
744 .br
745 .ns
746 .TP 10
747 .NOP \f\*[B-Font]timerstats\f[]
748 Display interval timer counters.
749 .br
750 .ns
751 .TP 10
752 .NOP \f\*[B-Font]writelist\f[] \f\*[I-Font]assocID\f[]
753 Write the system or peer variables included in the variable list.
754 .br
755 .ns
756 .TP 10
757 .NOP \f\*[B-Font]writevar\f[] \f\*[I-Font]assocID\f[] \f\*[I-Font]name\f[]=\f\*[I-Font]value\f[] [, ...]
758 Write the specified variables.
759 If the
760 \f\*[I-Font]assocID\f[]
761 is zero, the variables are from the
762 \fISystem\f[] \fIVariables\f[]
763 name space, otherwise they are from the
764 \fIPeer\f[] \fIVariables\f[]
765 name space.
766 The
767 \f\*[I-Font]assocID\f[]
768 is required, as the same name can occur in both spaces.
769 .br
770 .ns
771 .TP 10
772 .NOP \f\*[B-Font]sysinfo\f[]
773 Display operational summary.
774 .br
775 .ns
776 .TP 10
777 .NOP \f\*[B-Font]sysstats\f[]
778 Print statistics counters maintained in the protocol module.
779 .PP
780 .SS Status Words and Kiss Codes
781 The current state of the operating program is shown
782 in a set of status words
783 maintained by the system.
784 Status information is also available on a per-association basis.
785 These words are displayed in the
786 \f\*[B-Font]rv\f[]
787 and
788 \f\*[B-Font]as\f[]
789 commands both in hexadecimal and in decoded short tip strings.
790 The codes, tips and short explanations are documented on the
791 .Lk decode.html "Event Messages and Status Words"
792 page.
793 The page also includes a list of system and peer messages,
794 the code for the latest of which is included in the status word.
795 .sp \n(Ppu
796 .ne 2
797
798 Information resulting from protocol machine state transitions
799 is displayed using an informal set of ASCII strings called
800 .Lk decode.html#kiss "kiss codes" .
801 The original purpose was for kiss-o'-death (KoD) packets
802 sent by the server to advise the client of an unusual condition.
803 They are now displayed, when appropriate,
804 in the reference identifier field in various billboards.
805 .SS System Variables
806 The following system variables appear in the
807 \f\*[B-Font]rv\f[]
808 billboard.
809 Not all variables are displayed in some configurations.
810 .TP 10
811 .NOP Variable
812 Description
813 .br
814 .ns
815 .TP 10
816 .NOP \f\*[B-Font]status\f[]
817 .Lk decode.html#sys "system status word"
818 .br
819 .ns
820 .TP 10
821 .NOP \f\*[B-Font]version\f[]
822 NTP software version and build time
823 .br
824 .ns
825 .TP 10
826 .NOP \f\*[B-Font]processor\f[]
827 hardware platform and version
828 .br
829 .ns
830 .TP 10
831 .NOP \f\*[B-Font]system\f[]
832 operating system and version
833 .br
834 .ns
835 .TP 10
836 .NOP \f\*[B-Font]leap\f[]
837 leap warning indicator (0-3)
838 .br
839 .ns
840 .TP 10
841 .NOP \f\*[B-Font]stratum\f[]
842 stratum (1-15)
843 .br
844 .ns
845 .TP 10
846 .NOP \f\*[B-Font]precision\f[]
847 precision (log2 s)
848 .br
849 .ns
850 .TP 10
851 .NOP \f\*[B-Font]rootdelay\f[]
852 total roundtrip delay to the primary reference clock
853 .br
854 .ns
855 .TP 10
856 .NOP \f\*[B-Font]rootdisp\f[]
857 total dispersion to the primary reference clock
858 .br
859 .ns
860 .TP 10
861 .NOP \f\*[B-Font]peer\f[]
862 system peer association ID
863 .br
864 .ns
865 .TP 10
866 .NOP \f\*[B-Font]tc\f[]
867 time constant and poll exponent (log2 s) (3-17)
868 .br
869 .ns
870 .TP 10
871 .NOP \f\*[B-Font]mintc\f[]
872 minimum time constant (log2 s) (3-10)
873 .br
874 .ns
875 .TP 10
876 .NOP \f\*[B-Font]clock\f[]
877 date and time of day
878 .br
879 .ns
880 .TP 10
881 .NOP \f\*[B-Font]refid\f[]
882 reference ID or
883 .Lk decode.html#kiss "kiss code"
884 .br
885 .ns
886 .TP 10
887 .NOP \f\*[B-Font]reftime\f[]
888 reference time
889 .br
890 .ns
891 .TP 10
892 .NOP \f\*[B-Font]offset\f[]
893 combined  offset of server relative to this host
894 .br
895 .ns
896 .TP 10
897 .NOP \f\*[B-Font]sys_jitter\f[]
898 combined system jitter
899 .br
900 .ns
901 .TP 10
902 .NOP \f\*[B-Font]frequency\f[]
903 frequency offset (PPM) relative to hardware clock
904 .br
905 .ns
906 .TP 10
907 .NOP \f\*[B-Font]clk_wander\f[]
908 clock frequency wander (PPM)
909 .br
910 .ns
911 .TP 10
912 .NOP \f\*[B-Font]clk_jitter\f[]
913 clock jitter
914 .br
915 .ns
916 .TP 10
917 .NOP \f\*[B-Font]tai\f[]
918 TAI-UTC offset (s)
919 .br
920 .ns
921 .TP 10
922 .NOP \f\*[B-Font]leapsec\f[]
923 NTP seconds when the next leap second is/was inserted
924 .br
925 .ns
926 .TP 10
927 .NOP \f\*[B-Font]expire\f[]
928 NTP seconds when the NIST leapseconds file expires
929 .PP
930 The jitter and wander statistics are exponentially-weighted RMS averages.
931 The system jitter is defined in the NTPv4 specification;
932 the clock jitter statistic is computed by the clock discipline module.
933 .sp \n(Ppu
934 .ne 2
935
936 When the NTPv4 daemon is compiled with the OpenSSL software library,
937 additional system variables are displayed,
938 including some or all of the following,
939 depending on the particular Autokey dance:
940 .TP 10
941 .NOP Variable
942 Description
943 .br
944 .ns
945 .TP 10
946 .NOP \f\*[B-Font]host\f[]
947 Autokey host name for this host
948 .br
949 .ns
950 .TP 10
951 .NOP \f\*[B-Font]ident\f[]
952 Autokey group name for this host
953 .br
954 .ns
955 .TP 10
956 .NOP \f\*[B-Font]flags\f[]
957 host flags  (see Autokey specification)
958 .br
959 .ns
960 .TP 10
961 .NOP \f\*[B-Font]digest\f[]
962 OpenSSL message digest algorithm
963 .br
964 .ns
965 .TP 10
966 .NOP \f\*[B-Font]signature\f[]
967 OpenSSL digest/signature scheme
968 .br
969 .ns
970 .TP 10
971 .NOP \f\*[B-Font]update\f[]
972 NTP seconds at last signature update
973 .br
974 .ns
975 .TP 10
976 .NOP \f\*[B-Font]cert\f[]
977 certificate subject, issuer and certificate flags
978 .br
979 .ns
980 .TP 10
981 .NOP \f\*[B-Font]until\f[]
982 NTP seconds when the certificate expires
983 .PP
984 .SS Peer Variables
985 The following peer variables appear in the
986 \f\*[B-Font]rv\f[]
987 billboard for each association.
988 Not all variables are displayed in some configurations.
989 .TP 10
990 .NOP Variable
991 Description
992 .br
993 .ns
994 .TP 10
995 .NOP \f\*[B-Font]associd\f[]
996 association ID
997 .br
998 .ns
999 .TP 10
1000 .NOP \f\*[B-Font]status\f[]
1001 .Lk decode.html#peer "peer status word"
1002 .br
1003 .ns
1004 .TP 10
1005 .NOP \f\*[B-Font]srcadr\f[]
1006 source (remote) IP address
1007 .br
1008 .ns
1009 .TP 10
1010 .NOP \f\*[B-Font]srcport\f[]
1011 source (remote) port
1012 .br
1013 .ns
1014 .TP 10
1015 .NOP \f\*[B-Font]dstadr\f[]
1016 destination (local) IP address
1017 .br
1018 .ns
1019 .TP 10
1020 .NOP \f\*[B-Font]dstport\f[]
1021 destination (local) port
1022 .br
1023 .ns
1024 .TP 10
1025 .NOP \f\*[B-Font]leap\f[]
1026 leap indicator (0-3)
1027 .br
1028 .ns
1029 .TP 10
1030 .NOP \f\*[B-Font]stratum\f[]
1031 stratum (0-15)
1032 .br
1033 .ns
1034 .TP 10
1035 .NOP \f\*[B-Font]precision\f[]
1036 precision (log2 s)
1037 .br
1038 .ns
1039 .TP 10
1040 .NOP \f\*[B-Font]rootdelay\f[]
1041 total roundtrip delay to the primary reference clock
1042 .br
1043 .ns
1044 .TP 10
1045 .NOP \f\*[B-Font]rootdisp\f[]
1046 total root dispersion to the primary reference clock
1047 .br
1048 .ns
1049 .TP 10
1050 .NOP \f\*[B-Font]refid\f[]
1051 reference ID or
1052 .Lk decode.html#kiss "kiss code"
1053 .br
1054 .ns
1055 .TP 10
1056 .NOP \f\*[B-Font]reftime\f[]
1057 reference time
1058 .br
1059 .ns
1060 .TP 10
1061 .NOP \f\*[B-Font]reach\f[]
1062 reach register (octal)
1063 .br
1064 .ns
1065 .TP 10
1066 .NOP \f\*[B-Font]unreach\f[]
1067 unreach counter
1068 .br
1069 .ns
1070 .TP 10
1071 .NOP \f\*[B-Font]hmode\f[]
1072 host mode (1-6)
1073 .br
1074 .ns
1075 .TP 10
1076 .NOP \f\*[B-Font]pmode\f[]
1077 peer mode (1-5)
1078 .br
1079 .ns
1080 .TP 10
1081 .NOP \f\*[B-Font]hpoll\f[]
1082 host poll exponent (log2 s) (3-17)
1083 .br
1084 .ns
1085 .TP 10
1086 .NOP \f\*[B-Font]ppoll\f[]
1087 peer poll exponent (log2 s) (3-17)
1088 .br
1089 .ns
1090 .TP 10
1091 .NOP \f\*[B-Font]headway\f[]
1092 headway (see
1093 .Lk rate.html "Rate Management and the Kiss-o'-Death Packet" )
1094 .br
1095 .ns
1096 .TP 10
1097 .NOP \f\*[B-Font]flash\f[]
1098 .Lk decode.html#flash "flash status word"
1099 .br
1100 .ns
1101 .TP 10
1102 .NOP \f\*[B-Font]offset\f[]
1103 filter offset
1104 .br
1105 .ns
1106 .TP 10
1107 .NOP \f\*[B-Font]delay\f[]
1108 filter delay
1109 .br
1110 .ns
1111 .TP 10
1112 .NOP \f\*[B-Font]dispersion\f[]
1113 filter dispersion
1114 .br
1115 .ns
1116 .TP 10
1117 .NOP \f\*[B-Font]jitter\f[]
1118 filter jitter
1119 .br
1120 .ns
1121 .TP 10
1122 .NOP \f\*[B-Font]ident\f[]
1123 Autokey group name for this association
1124 .br
1125 .ns
1126 .TP 10
1127 .NOP \f\*[B-Font]bias\f[]
1128 unicast/broadcast bias
1129 .br
1130 .ns
1131 .TP 10
1132 .NOP \f\*[B-Font]xleave\f[]
1133 interleave delay (see
1134 .Lk xleave.html "NTP Interleaved Modes" )
1135 .PP
1136 The
1137 \f\*[B-Font]bias\f[]
1138 variable is calculated when the first broadcast packet is received
1139 after the calibration volley.
1140 It represents the offset of the broadcast subgraph relative to the unicast subgraph.
1141 The
1142 \f\*[B-Font]xleave\f[]
1143 variable appears only for the interleaved symmetric and interleaved modes.
1144 It represents the internal queuing, buffering and transmission delays
1145 for the preceding packet.
1146 .sp \n(Ppu
1147 .ne 2
1148
1149 When the NTPv4 daemon is compiled with the OpenSSL software library,
1150 additional peer variables are displayed, including the following:
1151 .TP 10
1152 .NOP Variable
1153 Description
1154 .br
1155 .ns
1156 .TP 10
1157 .NOP \f\*[B-Font]flags\f[]
1158 peer flags (see Autokey specification)
1159 .br
1160 .ns
1161 .TP 10
1162 .NOP \f\*[B-Font]host\f[]
1163 Autokey server name
1164 .br
1165 .ns
1166 .TP 10
1167 .NOP \f\*[B-Font]flags\f[]
1168 peer flags (see Autokey specification)
1169 .br
1170 .ns
1171 .TP 10
1172 .NOP \f\*[B-Font]signature\f[]
1173 OpenSSL digest/signature scheme
1174 .br
1175 .ns
1176 .TP 10
1177 .NOP \f\*[B-Font]initsequence\f[]
1178 initial key ID
1179 .br
1180 .ns
1181 .TP 10
1182 .NOP \f\*[B-Font]initkey\f[]
1183 initial key index
1184 .br
1185 .ns
1186 .TP 10
1187 .NOP \f\*[B-Font]timestamp\f[]
1188 Autokey signature timestamp
1189 .PP
1190 .SS Clock Variables
1191 The following clock variables appear in the
1192 \f\*[B-Font]cv\f[]
1193 billboard for each association with a reference clock.
1194 Not all variables are displayed in some configurations.
1195 .TP 10
1196 .NOP Variable
1197 Description
1198 .br
1199 .ns
1200 .TP 10
1201 .NOP \f\*[B-Font]associd\f[]
1202 association ID
1203 .br
1204 .ns
1205 .TP 10
1206 .NOP \f\*[B-Font]status\f[]
1207 .Lk decode.html#clock "clock status word"
1208 .br
1209 .ns
1210 .TP 10
1211 .NOP \f\*[B-Font]device\f[]
1212 device description
1213 .br
1214 .ns
1215 .TP 10
1216 .NOP \f\*[B-Font]timecode\f[]
1217 ASCII time code string (specific to device)
1218 .br
1219 .ns
1220 .TP 10
1221 .NOP \f\*[B-Font]poll\f[]
1222 poll messages sent
1223 .br
1224 .ns
1225 .TP 10
1226 .NOP \f\*[B-Font]noreply\f[]
1227 no reply
1228 .br
1229 .ns
1230 .TP 10
1231 .NOP \f\*[B-Font]badformat\f[]
1232 bad format
1233 .br
1234 .ns
1235 .TP 10
1236 .NOP \f\*[B-Font]baddata\f[]
1237 bad date or time
1238 .br
1239 .ns
1240 .TP 10
1241 .NOP \f\*[B-Font]fudgetime1\f[]
1242 fudge time 1
1243 .br
1244 .ns
1245 .TP 10
1246 .NOP \f\*[B-Font]fudgetime2\f[]
1247 fudge time 2
1248 .br
1249 .ns
1250 .TP 10
1251 .NOP \f\*[B-Font]stratum\f[]
1252 driver stratum
1253 .br
1254 .ns
1255 .TP 10
1256 .NOP \f\*[B-Font]refid\f[]
1257 driver reference ID
1258 .br
1259 .ns
1260 .TP 10
1261 .NOP \f\*[B-Font]flags\f[]
1262 driver flags
1263 .PP
1264 .SH "OPTIONS"
1265 .TP
1266 .NOP \f\*[B-Font]\-4\f[], \f\*[B-Font]\-\-ipv4\f[]
1267 Force IPv4 DNS name resolution.
1268 This option must not appear in combination with any of the following options:
1269 ipv6.
1270 .sp
1271 Force DNS resolution of following host names on the command line
1272 to the IPv4 namespace.
1273 .TP
1274 .NOP \f\*[B-Font]\-6\f[], \f\*[B-Font]\-\-ipv6\f[]
1275 Force IPv6 DNS name resolution.
1276 This option must not appear in combination with any of the following options:
1277 ipv4.
1278 .sp
1279 Force DNS resolution of following host names on the command line
1280 to the IPv6 namespace.
1281 .TP
1282 .NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]cmd\f[], \f\*[B-Font]\-\-command\f[]=\f\*[I-Font]cmd\f[]
1283 run a command and exit.
1284 This option may appear an unlimited number of times.
1285 .sp
1286 The following argument is interpreted as an interactive format command
1287 and is added to the list of commands to be executed on the specified
1288 host(s).
1289 .TP
1290 .NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
1291 Increase debug verbosity level.
1292 This option may appear an unlimited number of times.
1293 .sp
1294 .TP
1295 .NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
1296 Set the debug verbosity level.
1297 This option may appear an unlimited number of times.
1298 This option takes an integer number as its argument.
1299 .sp
1300 .TP
1301 .NOP \f\*[B-Font]\-i\f[], \f\*[B-Font]\-\-interactive\f[]
1302 Force ntpq to operate in interactive mode.
1303 This option must not appear in combination with any of the following options:
1304 command, peers.
1305 .sp
1306 Force \fBntpq\fP to operate in interactive mode.
1307 Prompts will be written to the standard output and
1308 commands read from the standard input.
1309 .TP
1310 .NOP \f\*[B-Font]\-n\f[], \f\*[B-Font]\-\-numeric\f[]
1311 numeric host addresses.
1312 .sp
1313 Output all host addresses in dotted-quad numeric format rather than
1314 converting to the canonical host names. 
1315 .TP
1316 .NOP \f\*[B-Font]\-\-old\-rv\f[]
1317 Always output status line with readvar.
1318 .sp
1319 By default, \fBntpq\fP now suppresses the \fBassocid=...\fP
1320 line that precedes the output of \fBreadvar\fP
1321 (alias \fBrv\fP) when a single variable is requested, such as
1322 \fBntpq \-c "rv 0 offset"\fP.
1323 This option causes \fBntpq\fP to include both lines of output
1324 for a single-variable \fBreadvar\fP.
1325 Using an environment variable to
1326 preset this option in a script will enable both older and
1327 newer \fBntpq\fP to behave identically in this regard.
1328 .TP
1329 .NOP \f\*[B-Font]\-p\f[], \f\*[B-Font]\-\-peers\f[]
1330 Print a list of the peers.
1331 This option must not appear in combination with any of the following options:
1332 interactive.
1333 .sp
1334 Print a list of the peers known to the server as well as a summary
1335 of their state. This is equivalent to the 'peers' interactive command.
1336 .TP
1337 .NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-wide\f[]
1338 Display the full 'remote' value.
1339 .sp
1340 Display the full value of the 'remote' value.  If this requires
1341 more than 15 characters, display the full value, emit a newline,
1342 and continue the data display properly indented on the next line.
1343 .TP
1344 .NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
1345 Display usage information and exit.
1346 .TP
1347 .NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
1348 Pass the extended usage information through a pager.
1349 .TP
1350 .NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
1351 Save the option state to \fIcfgfile\fP.  The default is the \fIlast\fP
1352 configuration file listed in the \fBOPTION PRESETS\fP section, below.
1353 The command will exit after updating the config file.
1354 .TP
1355 .NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
1356 Load options from \fIcfgfile\fP.
1357 The \fIno-load-opts\fP form will disable the loading
1358 of earlier config/rc/ini files.  \fI\-\-no-load-opts\fP is handled early,
1359 out of order.
1360 .TP
1361 .NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
1362 Output version of program and exit.  The default mode is `v', a simple
1363 version.  The `c' mode will print copyright information and `n' will
1364 print the full copyright notice.
1365 .PP
1366 .SH "OPTION PRESETS"
1367 Any option that is not marked as \fInot presettable\fP may be preset
1368 by loading values from configuration ("RC" or ".INI") file(s) and values from
1369 environment variables named:
1370 .nf
1371   \fBNTPQ_<option-name>\fP or \fBNTPQ\fP
1372 .fi
1373 .ad
1374 The environmental presets take precedence (are processed later than)
1375 the configuration files.
1376 The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
1377 If any of these are directories, then the file \fI.ntprc\fP
1378 is searched for within those directories.
1379 .SH "ENVIRONMENT"
1380 See \fBOPTION PRESETS\fP for configuration environment variables.
1381 .SH "FILES"
1382 See \fBOPTION PRESETS\fP for configuration files.
1383 .SH "EXIT STATUS"
1384 One of the following exit values will be returned:
1385 .TP
1386 .NOP 0 " (EXIT_SUCCESS)"
1387 Successful program execution.
1388 .TP
1389 .NOP 1 " (EXIT_FAILURE)"
1390 The operation failed or the command syntax was not valid.
1391 .TP
1392 .NOP 66 " (EX_NOINPUT)"
1393 A specified configuration file could not be loaded.
1394 .TP
1395 .NOP 70 " (EX_SOFTWARE)"
1396 libopts had an internal operational error.  Please report
1397 it to autogen-users@lists.sourceforge.net.  Thank you.
1398 .PP
1399 .SH "AUTHORS"
1400 The University of Delaware and Network Time Foundation
1401 .SH "COPYRIGHT"
1402 Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
1403 This program is released under the terms of the NTP license, <http://ntp.org/license>.
1404 .SH "BUGS"
1405 Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
1406 .SH "NOTES"
1407 This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP
1408 option definitions.