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 adresses by: Names passed to ntpd, then names reverse
92 resolved from addresses and finally, ip addresses themselves
93
94 -S, --srcnumber
95 Output host adresses 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]:: Obtain and print traffic counts collected and
350 maintained by the monitor facility. This is useful for tracking who
351 uses or abuses your server.
352
353 + Except for sort=sortorder, the options filter the list returned by
354 ntpd. The limited and kod options return only entries representing
355 client addresses from which the last packet received triggered either
356 discarding or a KoD response. the addr.num= option adds specific
357 addresses to retrieve when limit=1. Values of 0 to 15 are supported for
358 num. Also, used internally with last.num=hextime to select the starting
359 point for retrieving continued response. the frags=frags option limits
360 the number of datagrams (fragments) in response. Used by newer ntpq
361 versions instead of limit= when retrieving multiple entries. The limit=
362 option limits the MRU entries returned per response. limit=1 is a
363 special case: Instead of fetching beginning with the supplied starting
364 points (provided by a last.x and addr.x where 0 ⇐ x ⇐ 15, default the
365 beginning of time) newer neighbor, fetch the supplied entries. This
366 enables fetching multiple entries from given IP addresses (provided by
367 addr.x= entries where 0 ⇐ x ⇐ 15). When limit is not one and frags= is
368 provided, the fragment limit controls. NOTE: a single mrulist command
369 may cause many query/response rounds allowing limits as low as 3 to
370 potentially retrieve thousands of entries in responses. The
371 mincount=count option filters out entries that have received less than
372 count packets. The mindrop=drop option filters out entries that have
373 dropped less than drop packets. The minscore=score option filters out
374 entries with a score less than score. The maxlstint=seconds option
375 filters out entries where no packets have arrived within seconds. The
376 minlstint=seconds option filters out entries with a packet has arrived
377 within seconds. The laddr=localaddr option filters out entries for
378 packets received on any local address other than localaddr.
379 resany=hexmask and resall=hexmask filter entries containing none or
380 less than all, respectively, of the bits in hexmask, which must begin
381 with 0x.
382
383 + The sortorder defaults to lstint and may be any of addr, count,
384 avgint, lstint, score, drop or any of those preceded by a minus sign
385 (hyphen) to reverse the sort order. The output columns are:
386
387 +
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 pstats assocID
579 Show the statistics for the peer with the given assocID.
580
581 readvar assocID [ name ] [,...], rv assocID [ name ] [,...]
582 Display the specified variables. If assocID is zero, the variables
583 are from the system variables <#system> name space, otherwise they
584 are from the peer variables <#peer> name space. The assocID is
585 required, as the same name can occur in both spaces. If no name is
586 included, all operative variables in the name space are displayed.
587 In this case only, if the assocID is omitted, it is assumed zero.
588 Multiple names are specified with comma separators and without
589 whitespace. Note that time values are represented in milliseconds
590 and frequency values in parts-per-million (PPM). Some NTP
591 timestamps are represented in the format YYYYMMDDTTTT, where YYYY
592 is the year, MM the month of the year, DD the day of the month and
593 TTTT the time of day.
594
595 reslist
596 Show the access control (restrict) list for ntpq.
597
598 timerstats
599 Display interval timer counters.
600
601 writelist assocID
602 Write the system or peer variables included in the variable list.
603
604 writevar assocID name = value [,...]
605 Write the specified variables. If the assocID is zero, the
606 variables are from the system variables <#system> name space,
607 otherwise they are from the peer variables <#peer> name space. The
608 assocID is required, as the same name can occur in both spaces.
609
610 sysinfo
611 Display operational summary.
612
613 sysstats
614 Print statistics counters maintained in the protocol module. Note
615 that the relationships among these counters can look unlikely
616 because packets can get flagged for inclusion in exception
617 statistics in more than one way, for example by having both a bad
618 length and an old version.
619
620 ntsinfo
621 Display a summary of the NTS state, including both the the NTS
622 client and NTS server components. Note that the format of the
623 output text may change as this feature is developed. This command
624 is experimental until further notice and clarification.
625
627 Four commands require authentication to the server: config-from-file,
628 config, ifstats, and reslist. An authkey file must be in place and a
629 control key declared in ntp.conf for these commands to work.
630
631 If you are running as root or otherwise have read access to the authkey
632 and ntp.conf file, ntpq will mine the required credentials for you.
633 Otherwise, you will be prompted to enter a key ID and password.
634
635 Credentials once entered, are retained and used for the duration of
636 your ntpq session.
637
639 The current state of the operating program is shown in a set of status
640 words maintained by the system and each association separately. These
641 words are displayed in the rv and as commands both in hexadecimal and
642 decoded short tip strings. The codes, tips, and short explanations are
643 on the Event Messages and Status Words <decode.html> page. The page
644 also includes a list of system and peer messages, the code for the
645 latest of which is included in the status word.
646
647 Information resulting from protocol machine state transitions is
648 displayed using an informal set of ASCII strings called kiss codes
649 <decode.html#kiss>. The original purpose was for kiss-o'-death (KoD)
650 packets sent by the server to advise the client of an unusual
651 condition. They are now displayed, when appropriate, in the reference
652 identifier field in various billboards.
653
655 The following system variables appear in the rv billboard. Not all
656 variables are displayed in some configurations.
657
658 ┌───────────┬────────────────────────────┐
659 │ │ │
660 │Variable │ Description │
661 ├───────────┼────────────────────────────┤
662 │ │ │
663 │status │ system status word │
664 │ │ <decode.html#sys> │
665 ├───────────┼────────────────────────────┤
666 │ │ │
667 │version │ NTP software version and │
668 │ │ build time │
669 ├───────────┼────────────────────────────┤
670 │ │ │
671 │processor │ hardware platform and │
672 │ │ version │
673 ├───────────┼────────────────────────────┤
674 │ │ │
675 │system │ operating system and │
676 │ │ version │
677 ├───────────┼────────────────────────────┤
678 │ │ │
679 │leap │ leap warning indicator │
680 │ │ (0-3) │
681 ├───────────┼────────────────────────────┤
682 │ │ │
683 │stratum │ stratum (1-15) │
684 ├───────────┼────────────────────────────┤
685 │ │ │
686 │precision │ precision (log2 s) │
687 ├───────────┼────────────────────────────┤
688 │ │ │
689 │rootdelay │ total roundtrip delay to │
690 │ │ the primary reference │
691 │ │ clock │
692 ├───────────┼────────────────────────────┤
693 │ │ │
694 │rootdisp │ total dispersion to the │
695 │ │ primary reference clock │
696 ├───────────┼────────────────────────────┤
697 │ │ │
698 │peer │ system peer association ID │
699 ├───────────┼────────────────────────────┤
700 │ │ │
701 │tc │ time constant and poll │
702 │ │ exponent (log2 s) (3-17) │
703 ├───────────┼────────────────────────────┤
704 │ │ │
705 │mintc │ minimum time constant │
706 │ │ (log2 s) (3-10) │
707 ├───────────┼────────────────────────────┤
708 │ │ │
709 │clock │ date and time of day │
710 ├───────────┼────────────────────────────┤
711 │ │ │
712 │refid │ reference ID or kiss code │
713 │ │ <decode.html#kiss> │
714 ├───────────┼────────────────────────────┤
715 │ │ │
716 │reftime │ reference time │
717 ├───────────┼────────────────────────────┤
718 │ │ │
719 │offset │ combined offset of server │
720 │ │ relative to this host │
721 ├───────────┼────────────────────────────┤
722 │ │ │
723 │sys_jitter │ combined system jitter │
724 ├───────────┼────────────────────────────┤
725 │ │ │
726 │frequency │ frequency offset (PPM) │
727 │ │ relative to hardware clock │
728 ├───────────┼────────────────────────────┤
729 │ │ │
730 │clk_wander │ clock frequency wander │
731 │ │ (PPM) │
732 ├───────────┼────────────────────────────┤
733 │ │ │
734 │clk_jitter │ clock jitter │
735 ├───────────┼────────────────────────────┤
736 │ │ │
737 │tai │ TAI-UTC offset (s) │
738 ├───────────┼────────────────────────────┤
739 │ │ │
740 │leapsec │ NTP seconds when the next │
741 │ │ leap second is/was │
742 │ │ inserted │
743 ├───────────┼────────────────────────────┤
744 │ │ │
745 │expire │ NTP seconds when the NIST │
746 │ │ leapseconds file expires │
747 └───────────┴────────────────────────────┘
748
749 The jitter and wander statistics are exponentially-weighted RMS
750 averages. The system jitter is defined in the NTPv4 specification; the
751 clock jitter statistic is computed by the clock discipline module.
752
754 The following peer variables appear in the rv billboard for each
755 association. Not all variables are displayed in some configurations.
756
757 ┌───────────────┬────────────────────────────┐
758 │ │ │
759 │Variable │ Description │
760 ├───────────────┼────────────────────────────┤
761 │ │ │
762 │associd │ association ID │
763 ├───────────────┼────────────────────────────┤
764 │ │ │
765 │status │ peer status word │
766 │ │ <decode.html#peer> │
767 ├───────────────┼────────────────────────────┤
768 │ │ │
769 │srcadr srcport │ source (remote) IP address │
770 │ │ and port │
771 ├───────────────┼────────────────────────────┤
772 │ │ │
773 │dstadr dstport │ destination (local) IP │
774 │ │ address and port │
775 ├───────────────┼────────────────────────────┤
776 │ │ │
777 │leap │ leap indicator (0-3) │
778 ├───────────────┼────────────────────────────┤
779 │ │ │
780 │stratum │ stratum (0-15) │
781 ├───────────────┼────────────────────────────┤
782 │ │ │
783 │precision │ precision (log2 s) │
784 ├───────────────┼────────────────────────────┤
785 │ │ │
786 │rootdelay │ total roundtrip delay to │
787 │ │ the primary reference │
788 │ │ clock │
789 ├───────────────┼────────────────────────────┤
790 │ │ │
791 │rootdisp │ total root dispersion to │
792 │ │ the primary reference │
793 │ │ clock │
794 ├───────────────┼────────────────────────────┤
795 │ │ │
796 │refid │ reference ID or kiss code │
797 │ │ <decode.html#kiss> │
798 ├───────────────┼────────────────────────────┤
799 │ │ │
800 │reftime │ reference time │
801 ├───────────────┼────────────────────────────┤
802 │ │ │
803 │reach │ reach register (octal) │
804 ├───────────────┼────────────────────────────┤
805 │ │ │
806 │unreach │ unreach counter │
807 ├───────────────┼────────────────────────────┤
808 │ │ │
809 │hmode │ host mode (1-6) │
810 ├───────────────┼────────────────────────────┤
811 │ │ │
812 │pmode │ peer mode (1-5) │
813 ├───────────────┼────────────────────────────┤
814 │ │ │
815 │hpoll │ host poll exponent (log2 │
816 │ │ s) (3-17) │
817 ├───────────────┼────────────────────────────┤
818 │ │ │
819 │ppoll │ peer poll exponent (log2 │
820 │ │ s) (3-17) │
821 ├───────────────┼────────────────────────────┤
822 │ │ │
823 │headway │ headway (see Rate │
824 │ │ Management and <rate.html> │
825 │ │ the Kiss-o'-Death Packet)" │
826 ├───────────────┼────────────────────────────┤
827 │ │ │
828 │flash │ flash status word │
829 │ │ <decode.html#flash> │
830 ├───────────────┼────────────────────────────┤
831 │ │ │
832 │offset │ filter offset │
833 ├───────────────┼────────────────────────────┤
834 │ │ │
835 │delay │ filter delay │
836 ├───────────────┼────────────────────────────┤
837 │ │ │
838 │dispersion │ filter dispersion │
839 ├───────────────┼────────────────────────────┤
840 │ │ │
841 │jitter │ filter jitter │
842 ├───────────────┼────────────────────────────┤
843 │ │ │
844 │bias │ fudge for asymmetric │
845 │ │ links/paths │
846 └───────────────┴────────────────────────────┘
847
849 The following clock variables appear in the cv billboard for each
850 association with a reference clock. Not all variables are displayed in
851 some configurations.
852
853 ┌───────────┬────────────────────────┐
854 │ │ │
855 │Variable │ Description │
856 ├───────────┼────────────────────────┤
857 │ │ │
858 │associd │ association ID │
859 ├───────────┼────────────────────────┤
860 │ │ │
861 │status │ clock status word │
862 │ │ <decode.html#clock> │
863 ├───────────┼────────────────────────┤
864 │ │ │
865 │device │ device description │
866 ├───────────┼────────────────────────┤
867 │ │ │
868 │timecode │ ASCII time code string │
869 │ │ (specific to device) │
870 ├───────────┼────────────────────────┤
871 │ │ │
872 │poll │ poll messages sent │
873 ├───────────┼────────────────────────┤
874 │ │ │
875 │noreply │ no reply │
876 ├───────────┼────────────────────────┤
877 │ │ │
878 │badformat │ bad format │
879 ├───────────┼────────────────────────┤
880 │ │ │
881 │baddata │ bad date or time │
882 ├───────────┼────────────────────────┤
883 │ │ │
884 │fudgetime1 │ fudge time 1 │
885 ├───────────┼────────────────────────┤
886 │ │ │
887 │fudgetime2 │ fudge time 2 │
888 ├───────────┼────────────────────────┤
889 │ │ │
890 │stratum │ driver stratum │
891 ├───────────┼────────────────────────┤
892 │ │ │
893 │refid │ driver reference ID │
894 ├───────────┼────────────────────────┤
895 │ │ │
896 │flags │ driver flags │
897 └───────────┴────────────────────────┘
898
900 When listing refids, addresses of the form 127.127.x.x are no longer
901 automatically interpreted as local refclocks as in older versions of
902 ntpq. Instead, a clock-format display is requested by the NTPsec daemon
903 when appropriate (by setting the srcaddr peer variable). This means
904 that when used to query legacy versions of ntpd, which do not know how
905 to request this, this program will do a slightly wrong thing.
906
907 In older versions, the type variable associated with a reference clock
908 was a numeric driver type index. It has been replaced by name, a
909 shortname for the driver type.
910
911 In older versions, no count of control packets was listed under
912 sysstats.
913
914 The -O (--old-rv) option of legacy versions has been retired.
915
917 It is possible for a ":config unpeer" command to fail silently,
918 yielding "Config Succeeded", if it is given a peer identifier that
919 looks like a driver type name or a hostname not present in the peer
920 list. The error will, however, be reported in the system log.
921
922 The config command cannot be used to change a server’s default
923 restrictions.
924
925 Under some circumstances python 2 cannot emit unicode. When true, the
926 display of units is downgraded to non-unicode alternatives. One place a
927 user is likely to encounter this is when diverting output through a
928 pipe. Attempts have been made to force the use of UTF-8, all of which
929 break the command history feature.
930
931 When using the -u option, very old xterms may fail to render μ
932 correctly. If this happens, be sure your xterm is started with the -u8
933 option, or the utf8 resource', and that your console font contains the
934 UTF-8 &mu character. Also confirm your LANG environment variable is set
935 to a UTF-8 language, like this: "export LANG=en_US.utf8".
936
937 Timestamp interpretation in this program is likely to fail in flaky
938 ways if the local system clock has not already been approximately
939 synchronized to UTC. Querying a server based in a different NTP era
940 than the current one is especially likely to fail.
941
942 This program will behave in apparently buggy and only semi-predictable
943 ways when fetching MRU lists from any server with sufficiently high
944 traffic.
945
946 The problem is fundamental. The Mode 6 protocol can’t ship (and your
947 client cannot accept) MRU records as fast as the daemon accepts
948 incoming traffic. Under these circumstances, the daemon will repeatedly
949 fail to ship an entire report, leading to long hangs as your client
950 repeatedly re-sends the request. Eventually the Mode 6 client library
951 will throw an error indicating that a maximum number of restarts has
952 been exceeded.
953
954 To avoid this problem, avoid monitoring over links that don’t have
955 enough capacity to handle the monitored server’s entire NTP load.
956
957 You may be able to retrieve partial data in very high-traffic
958 conditions by using the direct option.
959
961 One of the following exit values will be returned:
962
963 0 (EXIT_SUCCESS)
964 Successful program execution.
965
966 1 (EXIT_FAILURE)
967 The operation failed or the command syntax was not valid.
968
969
970
971NTPsec 2021-02-01 NTPQ(1)