1NTPQ(1) NTPsec NTPQ(1)
2
3
4
6 ntpq - standard NTP query program
7
9 ntpq [-46adhinpkwWu] [-c command] [host] [...]
10
12 The ntpq utility program is used to monitor NTP daemon ntpd operations
13 and determine performance. It uses the standard NTP mode 6 control
14 message formats defined in Appendix B of the NTPv3 specification RFC
15 1305. The same formats are used in NTPv4, although some of the variable
16 names have changed, and new ones added. The description on this page is
17 for the NTPv4 variables.
18
19 The program can be run either in interactive mode or controlled using
20 command line arguments. Requests to read and write arbitrary variables
21 can be assembled, with raw and pretty-printed output options being
22 available. It can also obtain and print a list of peers in a common
23 format by sending multiple queries to the server.
24
25 If one or more request options are included on the command line when
26 ntpq is executed, each of the requests will be sent to the NTP servers
27 running on each of the hosts given as command line arguments, or on
28 localhost by default. If no request options are given, ntpq will
29 attempt to read commands from the standard input and execute these on
30 the NTP server running on the first host given on the command line,
31 again defaulting to localhost when no other host is specified. ntpq
32 will prompt for commands if the standard input is a terminal device.
33
34 ntpq uses NTP mode 6 packets to communicate with the NTP server, and
35 hence can be used to query any compatible server on the network which
36 permits it. Note that since NTP is a UDP protocol this communication
37 will be somewhat unreliable, especially over large distances in terms
38 of network topology. ntpq makes one attempt to retransmit requests and
39 will time requests out if the remote host is not heard from within a
40 suitable timeout time.
41
42 Note that in contexts where a host name is expected, a -4 qualifier
43 preceding the host name forces DNS resolution to the IPv4 namespace,
44 while a -6 qualifier forces DNS resolution to the IPv6 namespace.
45
46 For examples and usage, see the NTP Debugging <debug.html> Techniques"
47 page.
48
49 For a simpler near-real-time monitor, see ntpmon(1).
50
52 Command line options are described following. Specifying the command
53 line options -c or -p will cause the specified query (queries) to be
54 sent to the indicated host(s) immediately. Otherwise, ntpq will attempt
55 to read interactive format commands from the standard input.
56
57 -4, --ipv4
58 Force DNS resolution of following host names on the command line to
59 the IPv4 namespace.
60
61 -6, --ipv6
62 Force DNS resolution of following host names on the command line to
63 the IPv6 namespace.
64
65 -a num, --authentication=num
66 Enable authentication with the numbered key.
67
68 -c cmd, --command=cmd
69 The following argument is interpreted as an interactive format
70 command and is added to the list of commands to be executed on the
71 specified host(s). Multiple -c options may be given.
72
73 -d, --debug
74 Increase debugging level by 1.
75
76 -D num, --set-debug-level=num
77 The debug level is set to the following integer argument.
78
79 -l filename, --logfile=filename
80 Log debugging output to the specified file.
81
82 -h, --help
83 Print a usage message summarizing options end exit.
84
85 -n, --numeric
86 Output all host addresses in numeric format rather than converting
87 to the canonical host names. You may get hostnames anyway for peers
88 in the initialization phase before DNS has resolved the peer name.
89
90 -s, --srcname
91 Output host addresses by: Names passed to ntpd, then names reverse
92 resolved from addresses and finally, IP addresses themselves
93
94 -S, --srcnumber
95 Output host addresses by: Names passed to ntpd, then IP addresses
96 themselves
97
98 -p, --peers
99 Print a list of the peers known to the server as well as a summary
100 of their state; this is equivalent to the peers interactive
101 command. The refid field is as described under "Event Messages and
102 Status Words" in the NTP documentation on the Web.
103
104 -k filename, --keyfile=filename
105 Specify a keyfile. ntpq will look in this file for the key
106 specified with -a.
107
108 -V, --version
109 Print the version string and exit.
110
111 -w, --wide
112 Wide mode: if the host name or IP Address doesn’t fit, write the
113 full name/address and indent the next line, so columns line up. The
114 default truncates the name or address.
115
116 -W num, --width=num
117 Force the terminal width. Only relevant for composition of the
118 peers display.
119
120 -u, --units
121 Display timing information with units.
122
124 Interactive format commands consist of a keyword followed by zero to
125 four arguments. Only enough characters of the full keyword to uniquely
126 identify the command need be typed. The output of a command is normally
127 sent to the standard output, but optionally the output of individual
128 commands may be sent to a file by appending a >, followed by a file
129 name, to the command line. Some interactive format commands are
130 executed entirely within the ntpq program itself and do not result in
131 NTP mode 6 requests being sent to a server. These are described as
132 following.
133
134 ? [command_keyword], help [command_keyword]
135 A ? by itself will print a list of all the command keywords known
136 to ntpq. A ? followed by a command keyword will print function and
137 usage information about the command.
138
139 addvars name [ = value] [...]; rmvars name [...]; clearvars
140 The arguments to this command consist of a list of items of the
141 form name = value, where the = value is ignored and can be omitted
142 in read requests. ntpq maintains an internal list in which data to
143 be included in control messages can be assembled and sent using the
144 readlist and writelist commands described below. The addvars
145 command allows variables and optional values to be added to the
146 list. If more than one variable is to be added, the list should be
147 comma-separated and not contain white space. The rmvars command can
148 be used to remove individual variables from the list, while the
149 clearlist command removes all variables from the list.
150
151 authenticate [yes | no]
152 Normally ntpq does not authenticate requests unless they are write
153 requests. The command authenticate yes causes ntpq to send
154 authentication with all requests it makes. Authenticated requests
155 causes some servers to handle requests slightly differently. The
156 command authenticate without arguments causes ntpq to display
157 whether or not ntpq is currently authenticating requests.
158
159 cooked
160 Display server messages in prettyprint format.
161
162 debug more | less | off
163 Turns internal query program debugging on and off.
164
165 noflake, +doflake probability
166 Disables or enables the dropping of control packets by ntpq for
167 testing. Probabilities 0 and 1 should be certainly accepted and
168 discarded respectively. No default, but 0.1 should be a one in ten
169 loss rate.
170
171 logfile <stderr> | filename
172 Displays or sets the file for debug logging. <stderr> will send
173 logs to standard error.
174
175 delay milliseconds
176 Specify a time interval to be added to timestamps included in
177 requests which require authentication; this is used to enable
178 (unreliable) server reconfiguration over long delay network paths
179 or between machines whose clocks are unsynchronized. The server
180 does not now require timestamps in authenticated requests so that
181 this command may be obsolete.
182
183 exit
184 Exit ntpq.
185
186 host name
187 Set the host to which future queries will be sent. The name may be
188 either a DNS name or a numeric address.
189
190 hostnames [yes | no]
191 If yes is specified, host names are printed in information
192 displays. If no is specified, numeric addresses are printed
193 instead. The default is yes unless modified using the command line
194 -n switch.
195
196 keyid keyid
197 This command specifies the key number to be used to authenticate
198 configuration requests; this must correspond to a key ID configured
199 with the controlkey command in the server’s ntp.conf
200
201 keytype
202 Specify the digest algorithm to use for authenticated requests,
203 with default MD5. The keytype must match what the server is
204 expecting for the specified key ID.
205
206 ntpversion 1 | 2 | 3 | 4
207 Sets the NTP version number which ntpq claims in packets. Defaults
208 to 2, Note that mode 6 control messages (and modes, for that
209 matter) didn’t exist in NTP version 1.
210
211 passwd
212 This command prompts for a password to authenticate requests. The
213 password must match what the server is expecting. Passwords longer
214 than 20 bytes are assumed to be hex encoding.
215
216 quit
217 Exit ntpq.
218
219 raw
220 Display server messages as received and without reformatting. The
221 only formatting/interpretation done on the data is to transform
222 non-ASCII data into a printable (but barely understandable) form.
223
224 timeout milliseconds
225 Specify a timeout period for responses to server queries. The
226 default is about 5000 milliseconds. Note that since ntpq retries
227 each query once after a timeout, the total waiting time for a
228 timeout will be twice the timeout value set.
229
230 units
231 Toggle whether times in the peers display are shown with units.
232
233 version
234 Print the version of the ntpq program.
235
237 Association IDs are used to identify system, peer and clock variables.
238 System variables are assigned an association ID of zero and system name
239 space, while each association is assigned a nonzero association ID and
240 peer namespace. Most control commands send a single mode 6 message to
241 the server and expect a single response message. The exceptions are the
242 peers command, which sends a series of messages, and the mreadlist and
243 mreadvar commands, which iterate over a range of associations.
244
245 associations
246 Display a list of mobilized associations in the form
247
248 ind assid status conf reach auth condition last_event cnt
249
250 ┌───────────┬────────────────────────────┐
251 │ │ │
252 │Variable │ Description │
253 ├───────────┼────────────────────────────┤
254 │ │ │
255 │ind │ index on this list │
256 ├───────────┼────────────────────────────┤
257 │ │ │
258 │assid │ association ID │
259 ├───────────┼────────────────────────────┤
260 │ │ │
261 │status │ peer status word │
262 │ │ <decode.html#peer> │
263 ├───────────┼────────────────────────────┤
264 │ │ │
265 │conf │ yes: persistent, no: │
266 │ │ ephemeral │
267 ├───────────┼────────────────────────────┤
268 │ │ │
269 │reach │ yes: reachable, no: │
270 │ │ unreachable │
271 ├───────────┼────────────────────────────┤
272 │ │ │
273 │auth │ ok, yes, bad and none │
274 ├───────────┼────────────────────────────┤
275 │ │ │
276 │condition │ selection status (see the │
277 │ │ select field of the peer │
278 │ │ status word │
279 │ │ <decode.html#peer>) │
280 ├───────────┼────────────────────────────┤
281 │ │ │
282 │last_event │ event report (see the │
283 │ │ event field of the peer │
284 │ │ <decode.html#peer> status │
285 │ │ word" ) │
286 ├───────────┼────────────────────────────┤
287 │ │ │
288 │cnt │ event count (see the count │
289 │ │ field of the peer │
290 │ │ <decode.html#peer> status │
291 │ │ word" ) │
292 └───────────┴────────────────────────────┘
293
294 authinfo
295 Display the authentication statistics.
296
297 clockvar assocID [name [ = value [...] ][...], cv assocID [name [ =
298 value [...] ][...]
299 Display a list of clock variables <#clock> for those associations
300 supporting a reference clock.
301
302 :config [...]
303 Send the remainder of the command line, including whitespace, to
304 the server as a run-time configuration command in the same format
305 as the configuration file. This command is experimental until
306 further notice and clarification. Authentication is of course
307 required.
308
309 config-from-file filename
310 Send each line of filename to the server as run-time configuration
311 commands in the same format as the configuration file. This command
312 is experimental until further notice and clarification.
313 Authentication is required.
314
315 ifstats
316 Display statistics for each local network address. Authentication
317 is required.
318
319 iostats
320 Display network and reference clock I/O statistics.
321
322 kerninfo
323 Display kernel loop and PPS statistics. As with other ntpq output,
324 times are in milliseconds. The precision value displayed is in
325 milliseconds as well, unlike the precision system variable.
326
327 lassociations
328 Perform the same function as the associations command, except
329 display mobilized and unmobilized associations.
330
331 lpeers [-4 | -6]
332 Print a peer spreadsheet for the appropriate IP version(s). dstadr
333 (associated with any given IP version).
334
335 monstats
336 Display monitor facility statistics.
337
338 direct
339 Normally, the mrulist command retrieves an entire MRU report
340 (possibly consisting of more than one MRU span), sorts it, and
341 presents the result. But attempting to fetch an entire MRU report
342 may fail on a server so loaded that none of its MRU entries age out
343 before they are shipped. With this option, each segment is reported
344 as it arrives.
345
346 mrulist [limited | kod | mincount=count | mindrop=drop | minscore=score
347 | maxlstint=seconds | minlstint=seconds | laddr=localaddr |
348 sort=sortorder | resany=hexmask | resall=hexmask | limit=limit |
349 addr.num=address]
350 Obtain and print traffic counts collected and maintained by the
351 monitor facility. This is useful for tracking who uses or abuses
352 your server.
353
354 Except for sort=sortorder, the options filter the list returned by
355 ntpd. The limited and kod options return only entries representing
356 client addresses from which the last packet received triggered
357 either discarding or a KoD response. the addr.num= option adds
358 specific addresses to retrieve when limit=1. Values of 0 to 15 are
359 supported for num. Also, used internally with last.num=hextime to
360 select the starting point for retrieving continued response. the
361 frags=frags option limits the number of datagrams (fragments) in
362 response. Used by newer ntpq versions instead of limit= when
363 retrieving multiple entries. The limit= option limits the MRU
364 entries returned per response. limit=1 is a special case: Instead
365 of fetching beginning with the supplied starting points (provided
366 by a last.x and addr.x where 0 ⇐ x ⇐ 15, default the beginning of
367 time) newer neighbor, fetch the supplied entries. This enables
368 fetching multiple entries from given IP addresses (provided by
369 addr.x= entries where 0 ⇐ x ⇐ 15). When limit is not one and frags=
370 is provided, the fragment limit controls. NOTE: a single mrulist
371 command may cause many query/response rounds allowing limits as low
372 as 3 to potentially retrieve thousands of entries in responses. The
373 mincount=count option filters out entries that have received less
374 than count packets. The mindrop=drop option filters out entries
375 that have dropped less than drop packets. The minscore=score option
376 filters out entries with a score less than score. The
377 maxlstint=seconds option filters out entries where no packets have
378 arrived within seconds. The minlstint=seconds option filters out
379 entries with a packet has arrived within seconds. The
380 laddr=localaddr option filters out entries for packets received on
381 any local address other than localaddr. resany=hexmask and
382 resall=hexmask filter entries containing none or less than all,
383 respectively, of the bits in hexmask, which must begin with 0x.
384
385 The sortorder defaults to lstint and may be any of addr, count,
386 avgint, lstint, score, drop or any of those preceded by a minus
387 sign (hyphen) to reverse the sort order. The output columns are:
388
389 ┌───────────────┬────────────────────────────┐
390 │ │ │
391 │Column │ Description │
392 ├───────────────┼────────────────────────────┤
393 │ │ │
394 │lstint │ Interval in s between the │
395 │ │ receipt of the most recent │
396 │ │ packet from this address │
397 │ │ and the completion of the │
398 │ │ retrieval of the MRU list │
399 │ │ by ntpq. │
400 ├───────────────┼────────────────────────────┤
401 │ │ │
402 │avgint │ Average interval in s │
403 │ │ between packets from this │
404 │ │ address. │
405 ├───────────────┼────────────────────────────┤
406 │ │ │
407 │rstr │ Restriction flags │
408 │ │ associated with this │
409 │ │ address. Most are copied │
410 │ │ unchanged from the │
411 │ │ matching restrict command, │
412 │ │ however 0x400 (kod) and │
413 │ │ 0x20 (limited) flags are │
414 │ │ cleared unless the last │
415 │ │ packet from this address │
416 │ │ triggered a rate control │
417 │ │ response. │
418 ├───────────────┼────────────────────────────┤
419 │ │ │
420 │r │ Rate control indicator, │
421 │ │ either a period, L or K │
422 │ │ for no rate control │
423 │ │ response, rate limiting by │
424 │ │ discarding, or rate │
425 │ │ limiting with a KoD │
426 │ │ response, respectively. │
427 ├───────────────┼────────────────────────────┤
428 │ │ │
429 │m │ Packet mode. │
430 ├───────────────┼────────────────────────────┤
431 │ │ │
432 │v │ Packet version number. │
433 ├───────────────┼────────────────────────────┤
434 │ │ │
435 │count │ Packets received from this │
436 │ │ address. │
437 ├───────────────┼────────────────────────────┤
438 │ │ │
439 │score │ Packets per second │
440 │ │ (averaged with exponential │
441 │ │ decay). │
442 ├───────────────┼────────────────────────────┤
443 │ │ │
444 │drop │ Packets dropped (or KoDed) │
445 │ │ from this address. │
446 ├───────────────┼────────────────────────────┤
447 │ │ │
448 │rport │ Source port of last packet │
449 │ │ from this address. │
450 ├───────────────┼────────────────────────────┤
451 │ │ │
452 │remote address │ DNS name, numeric address, │
453 │ │ or address followed by │
454 │ │ claimed DNS name which │
455 │ │ could not be verified in │
456 │ │ parentheses. │
457 └───────────────┴────────────────────────────┘
458
459 mreadvar assocID assocID [ variable_name [ = value[ ... ], mrv assocID
460 assocID [ variable_name [ = value[ ... ]
461 Perform the same function as the readvar command, except for a
462 range of association IDs. This range is determined from the
463 association list cached by the most recent associations command.
464
465 opeers
466 Obtain and print the old-style list of all peers and clients
467 showing dstadr (associated with any given IP version), rather than
468 the refid.
469
470 passociations
471 Perform the same function as the associations command, except that
472 it uses previously stored data rather than making a new query.
473
474 peers
475 Display a list of peers in the form
476
477 tally remote refid st t when pool reach delay offset jitter
478
479 ┌─────────┬────────────────────────────┐
480 │ │ │
481 │Variable │ Description │
482 ├─────────┼────────────────────────────┤
483 │ │ │
484 │tally │ single-character code │
485 │ │ indicating current value │
486 │ │ of the select field of the │
487 │ │ peer status word │
488 │ │ <decode.html#peer> │
489 ├─────────┼────────────────────────────┤
490 │ │ │
491 │remote │ host name (or IP number) │
492 │ │ of peer │
493 ├─────────┼────────────────────────────┤
494 │ │ │
495 │refid │ association ID or kiss │
496 │ │ code <decode.html#kiss> │
497 ├─────────┼────────────────────────────┤
498 │ │ │
499 │st │ stratum │
500 ├─────────┼────────────────────────────┤
501 │ │ │
502 │t │ u: unicast or manycast │
503 │ │ client, l: local │
504 │ │ (reference clock), s: │
505 │ │ symmetric (peer), server, │
506 │ │ B: broadcast server, 1-8 │
507 │ │ NTS unicast with this │
508 │ │ number of cookies stored. │
509 ├─────────┼────────────────────────────┤
510 │ │ │
511 │when │ sec/min/hr since last │
512 │ │ received packet │
513 ├─────────┼────────────────────────────┤
514 │ │ │
515 │poll │ poll interval (log2 s) │
516 ├─────────┼────────────────────────────┤
517 │ │ │
518 │reach │ reach shift register │
519 │ │ (octal) │
520 ├─────────┼────────────────────────────┤
521 │ │ │
522 │delay │ roundtrip delay │
523 ├─────────┼────────────────────────────┤
524 │ │ │
525 │offset │ offset of server relative │
526 │ │ to this host │
527 ├─────────┼────────────────────────────┤
528 │ │ │
529 │jitter │ jitter │
530 └─────────┴────────────────────────────┘
531
532 The tally code is one of the following:
533
534 ┌─────┬───────────────────────────┐
535 │ │ │
536 │Code │ Description │
537 ├─────┼───────────────────────────┤
538 │ │ │
539 │ │ discarded as not valid │
540 ├─────┼───────────────────────────┤
541 │ │ │
542 │x │ discarded by intersection │
543 │ │ algorithm │
544 ├─────┼───────────────────────────┤
545 │ │ │
546 │. │ discarded by table │
547 │ │ overflow (not used) │
548 ├─────┼───────────────────────────┤
549 │ │ │
550 │- │ discarded by the cluster │
551 │ │ algorithm │
552 ├─────┼───────────────────────────┤
553 │ │ │
554 │+ │ included by the combine │
555 │ │ algorithm │
556 ├─────┼───────────────────────────┤
557 │ │ │
558 │# │ backup (more than tos │
559 │ │ maxclock sources) │
560 ├─────┼───────────────────────────┤
561 │ │ │
562 │* │ system peer │
563 ├─────┼───────────────────────────┤
564 │ │ │
565 │o │ PPS peer (when the prefer │
566 │ │ peer is valid) │
567 └─────┴───────────────────────────┘
568
569 apeers
570 Display a list of peers in the form:
571
572 [tally]remote refid assid st t when pool reach delay offset jitter
573
574 where the output is just like the peers command except that the
575 refid is displayed in hex format and the association number is also
576 displayed.
577
578 rpeers
579 Display a list of peers in the form
580
581 st t when pool reach delay offset jitter refid tally remote
582
583 pstats assocID
584 Show the statistics for the peer with the given assocID.
585
586 readvar assocID [ name ] [,...], rv assocID [ name ] [,...]
587 Display the specified variables. If assocID is zero, the variables
588 are from the system variables <#system> name space, otherwise they
589 are from the peer variables <#peer> name space. The assocID is
590 required, as the same name can occur in both spaces. If no name is
591 included, all operative variables in the name space are displayed.
592 In this case only, if the assocID is omitted, it is assumed zero.
593 Multiple names are specified with comma separators and without
594 whitespace. Note that time values are represented in milliseconds
595 and frequency values in parts-per-million (PPM). Some NTP
596 timestamps are represented in the format YYYYMMDDTTTT, where YYYY
597 is the year, MM the month of the year, DD the day of the month and
598 TTTT the time of day.
599
600 reslist
601 Show the access control (restrict) list for ntpq.
602
603 timerstats
604 Display interval timer counters.
605
606 writelist assocID
607 Write the system or peer variables included in the variable list.
608
609 writevar assocID name = value [,...]
610 Write the specified variables. If the assocID is zero, the
611 variables are from the system variables <#system> name space,
612 otherwise they are from the peer variables <#peer> name space. The
613 assocID is required, as the same name can occur in both spaces.
614
615 sysinfo
616 Display operational summary.
617
618 sysstats
619 Print statistics counters maintained in the protocol module. Note
620 that the relationships among these counters can look unlikely
621 because packets can get flagged for inclusion in exception
622 statistics in more than one way, for example by having both a bad
623 length and an old version.
624
625 ntsinfo
626 Display a summary of the NTS state, including both the the NTS
627 client and NTS server components. Note that the format of the
628 output text may change as this feature is developed. This command
629 is experimental until further notice and clarification.
630
632 Four commands require authentication to the server: config-from-file,
633 config, ifstats, and reslist. An authkey file must be in place and a
634 control key declared in ntp.conf for these commands to work.
635
636 If you are running as root or otherwise have read access to the authkey
637 and ntp.conf file, ntpq will mine the required credentials for you.
638 Otherwise, you will be prompted to enter a key ID and password.
639
640 Credentials once entered, are retained and used for the duration of
641 your ntpq session.
642
644 The current state of the operating program is shown in a set of status
645 words maintained by the system and each association separately. These
646 words are displayed in the rv and as commands both in hexadecimal and
647 decoded short tip strings. The codes, tips, and short explanations are
648 on the Event Messages and Status Words <decode.html> page. The page
649 also includes a list of system and peer messages, the code for the
650 latest of which is included in the status word.
651
652 Information resulting from protocol machine state transitions is
653 displayed using an informal set of ASCII strings called kiss codes
654 <decode.html#kiss>. The original purpose was for kiss-o'-death (KoD)
655 packets sent by the server to advise the client of an unusual
656 condition. They are now displayed, when appropriate, in the reference
657 identifier field in various billboards.
658
660 The following system variables appear in the rv billboard. Not all
661 variables are displayed in some configurations.
662
663 ┌───────────┬────────────────────────────┐
664 │ │ │
665 │Variable │ Description │
666 ├───────────┼────────────────────────────┤
667 │ │ │
668 │status │ system status word │
669 │ │ <decode.html#sys> │
670 ├───────────┼────────────────────────────┤
671 │ │ │
672 │version │ NTP software version and │
673 │ │ build time │
674 ├───────────┼────────────────────────────┤
675 │ │ │
676 │processor │ hardware platform and │
677 │ │ version │
678 ├───────────┼────────────────────────────┤
679 │ │ │
680 │system │ operating system and │
681 │ │ version │
682 ├───────────┼────────────────────────────┤
683 │ │ │
684 │leap │ leap warning indicator │
685 │ │ (0-3) │
686 ├───────────┼────────────────────────────┤
687 │ │ │
688 │stratum │ stratum (1-15) │
689 ├───────────┼────────────────────────────┤
690 │ │ │
691 │precision │ precision (log2 s) │
692 ├───────────┼────────────────────────────┤
693 │ │ │
694 │rootdelay │ total roundtrip delay to │
695 │ │ the primary reference │
696 │ │ clock │
697 ├───────────┼────────────────────────────┤
698 │ │ │
699 │rootdisp │ total dispersion to the │
700 │ │ primary reference clock │
701 ├───────────┼────────────────────────────┤
702 │ │ │
703 │peer │ system peer association ID │
704 ├───────────┼────────────────────────────┤
705 │ │ │
706 │tc │ time constant and poll │
707 │ │ exponent (log2 s) (3-17) │
708 ├───────────┼────────────────────────────┤
709 │ │ │
710 │mintc │ minimum time constant │
711 │ │ (log2 s) (3-10) │
712 ├───────────┼────────────────────────────┤
713 │ │ │
714 │clock │ date and time of day │
715 ├───────────┼────────────────────────────┤
716 │ │ │
717 │refid │ reference ID or kiss code │
718 │ │ <decode.html#kiss> │
719 ├───────────┼────────────────────────────┤
720 │ │ │
721 │reftime │ reference time │
722 ├───────────┼────────────────────────────┤
723 │ │ │
724 │offset │ combined offset of server │
725 │ │ relative to this host │
726 ├───────────┼────────────────────────────┤
727 │ │ │
728 │sys_jitter │ combined system jitter │
729 ├───────────┼────────────────────────────┤
730 │ │ │
731 │frequency │ frequency offset (PPM) │
732 │ │ relative to hardware clock │
733 ├───────────┼────────────────────────────┤
734 │ │ │
735 │clk_wander │ clock frequency wander │
736 │ │ (PPM) │
737 ├───────────┼────────────────────────────┤
738 │ │ │
739 │clk_jitter │ clock jitter │
740 ├───────────┼────────────────────────────┤
741 │ │ │
742 │tai │ TAI-UTC offset (s) │
743 ├───────────┼────────────────────────────┤
744 │ │ │
745 │leapsec │ NTP seconds when the next │
746 │ │ leap second is/was │
747 │ │ inserted │
748 ├───────────┼────────────────────────────┤
749 │ │ │
750 │expire │ NTP seconds when the NIST │
751 │ │ leapseconds file expires │
752 └───────────┴────────────────────────────┘
753
754 The jitter and wander statistics are exponentially-weighted RMS
755 averages. The system jitter is defined in the NTPv4 specification; the
756 clock jitter statistic is computed by the clock discipline module.
757
759 The following peer variables appear in the rv billboard for each
760 association. Not all variables are displayed in some configurations.
761
762 ┌───────────────┬────────────────────────────┐
763 │ │ │
764 │Variable │ Description │
765 ├───────────────┼────────────────────────────┤
766 │ │ │
767 │associd │ association ID │
768 ├───────────────┼────────────────────────────┤
769 │ │ │
770 │status │ peer status word │
771 │ │ <decode.html#peer> │
772 ├───────────────┼────────────────────────────┤
773 │ │ │
774 │srcadr srcport │ source (remote) IP address │
775 │ │ and port │
776 ├───────────────┼────────────────────────────┤
777 │ │ │
778 │dstadr dstport │ destination (local) IP │
779 │ │ address and port │
780 ├───────────────┼────────────────────────────┤
781 │ │ │
782 │leap │ leap indicator (0-3) │
783 ├───────────────┼────────────────────────────┤
784 │ │ │
785 │stratum │ stratum (0-15) │
786 ├───────────────┼────────────────────────────┤
787 │ │ │
788 │precision │ precision (log2 s) │
789 ├───────────────┼────────────────────────────┤
790 │ │ │
791 │rootdelay │ total roundtrip delay to │
792 │ │ the primary reference │
793 │ │ clock │
794 ├───────────────┼────────────────────────────┤
795 │ │ │
796 │rootdisp │ total root dispersion to │
797 │ │ the primary reference │
798 │ │ clock │
799 ├───────────────┼────────────────────────────┤
800 │ │ │
801 │refid │ reference ID or kiss code │
802 │ │ <decode.html#kiss> │
803 ├───────────────┼────────────────────────────┤
804 │ │ │
805 │reftime │ reference time │
806 ├───────────────┼────────────────────────────┤
807 │ │ │
808 │reach │ reach register (octal) │
809 ├───────────────┼────────────────────────────┤
810 │ │ │
811 │unreach │ unreach counter │
812 ├───────────────┼────────────────────────────┤
813 │ │ │
814 │hmode │ host mode (1-6) │
815 ├───────────────┼────────────────────────────┤
816 │ │ │
817 │pmode │ peer mode (1-5) │
818 ├───────────────┼────────────────────────────┤
819 │ │ │
820 │hpoll │ host poll exponent (log2 │
821 │ │ s) (3-17) │
822 ├───────────────┼────────────────────────────┤
823 │ │ │
824 │ppoll │ peer poll exponent (log2 │
825 │ │ s) (3-17) │
826 ├───────────────┼────────────────────────────┤
827 │ │ │
828 │headway │ headway (see Rate │
829 │ │ Management and <rate.html> │
830 │ │ the Kiss-o'-Death Packet)" │
831 ├───────────────┼────────────────────────────┤
832 │ │ │
833 │flash │ flash status word │
834 │ │ <decode.html#flash> │
835 ├───────────────┼────────────────────────────┤
836 │ │ │
837 │offset │ filter offset │
838 ├───────────────┼────────────────────────────┤
839 │ │ │
840 │delay │ filter delay │
841 ├───────────────┼────────────────────────────┤
842 │ │ │
843 │dispersion │ filter dispersion │
844 ├───────────────┼────────────────────────────┤
845 │ │ │
846 │jitter │ filter jitter │
847 ├───────────────┼────────────────────────────┤
848 │ │ │
849 │bias │ fudge for asymmetric │
850 │ │ links/paths │
851 └───────────────┴────────────────────────────┘
852
854 The following clock variables appear in the cv billboard for each
855 association with a reference clock. Not all variables are displayed in
856 some configurations.
857
858 ┌───────────┬────────────────────────┐
859 │ │ │
860 │Variable │ Description │
861 ├───────────┼────────────────────────┤
862 │ │ │
863 │associd │ association ID │
864 ├───────────┼────────────────────────┤
865 │ │ │
866 │status │ clock status word │
867 │ │ <decode.html#clock> │
868 ├───────────┼────────────────────────┤
869 │ │ │
870 │device │ device description │
871 ├───────────┼────────────────────────┤
872 │ │ │
873 │timecode │ ASCII time code string │
874 │ │ (specific to device) │
875 ├───────────┼────────────────────────┤
876 │ │ │
877 │poll │ poll messages sent │
878 ├───────────┼────────────────────────┤
879 │ │ │
880 │noreply │ no reply │
881 ├───────────┼────────────────────────┤
882 │ │ │
883 │badformat │ bad format │
884 ├───────────┼────────────────────────┤
885 │ │ │
886 │baddata │ bad date or time │
887 ├───────────┼────────────────────────┤
888 │ │ │
889 │fudgetime1 │ fudge time 1 │
890 ├───────────┼────────────────────────┤
891 │ │ │
892 │fudgetime2 │ fudge time 2 │
893 ├───────────┼────────────────────────┤
894 │ │ │
895 │stratum │ driver stratum │
896 ├───────────┼────────────────────────┤
897 │ │ │
898 │refid │ driver reference ID │
899 ├───────────┼────────────────────────┤
900 │ │ │
901 │flags │ driver flags │
902 └───────────┴────────────────────────┘
903
905 When listing refids, addresses of the form 127.127.x.x are no longer
906 automatically interpreted as local refclocks as in older versions of
907 ntpq. Instead, a clock-format display is requested by the NTPsec daemon
908 when appropriate (by setting the srcaddr peer variable). This means
909 that when used to query legacy versions of ntpd, which do not know how
910 to request this, this program will do a slightly wrong thing.
911
912 In older versions, the type variable associated with a reference clock
913 was a numeric driver type index. It has been replaced by name, a
914 shortname for the driver type.
915
916 In older versions, no count of control packets was listed under
917 sysstats.
918
919 The -O (--old-rv) option of legacy versions has been retired.
920
922 It is possible for a ":config unpeer" command to fail silently,
923 yielding "Config Succeeded", if it is given a peer identifier that
924 looks like a driver type name or a hostname not present in the peer
925 list. The error will, however, be reported in the system log.
926
927 The config command cannot be used to change a server’s default
928 restrictions.
929
930 Under some circumstances python 2 cannot emit unicode. When true, the
931 display of units is downgraded to non-unicode alternatives. One place a
932 user is likely to encounter this is when diverting output through a
933 pipe. Attempts have been made to force the use of UTF-8, all of which
934 break the command history feature.
935
936 When using the -u option, very old xterms may fail to render μ
937 correctly. If this happens, be sure your xterm is started with the -u8
938 option, or the utf8 resource', and that your console font contains the
939 UTF-8 μ character. Also confirm your LANG environment variable is
940 set to a UTF-8 language, like this: "export LANG=en_US.utf8".
941
942 Timestamp interpretation in this program is likely to fail in flaky
943 ways if the local system clock has not already been approximately
944 synchronized to UTC. Querying a server based in a different NTP era
945 than the current one is especially likely to fail.
946
947 This program will behave in apparently buggy and only semi-predictable
948 ways when fetching MRU lists from any server with sufficiently high
949 traffic.
950
951 The problem is fundamental. The Mode 6 protocol can’t ship (and your
952 client cannot accept) MRU records as fast as the daemon accepts
953 incoming traffic. Under these circumstances, the daemon will repeatedly
954 fail to ship an entire report, leading to long hangs as your client
955 repeatedly re-sends the request. Eventually the Mode 6 client library
956 will throw an error indicating that a maximum number of restarts has
957 been exceeded.
958
959 To avoid this problem, avoid monitoring over links that don’t have
960 enough capacity to handle the monitored server’s entire NTP load.
961
962 You may be able to retrieve partial data in very high-traffic
963 conditions by using the direct option.
964
966 One of the following exit values will be returned:
967
968 0 (EXIT_SUCCESS)
969 Successful program execution.
970
971 1 (EXIT_FAILURE)
972 The operation failed or the command syntax was not valid.
973
974
975
976NTPsec 2023-08-03 NTPQ(1)