Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
\input texinfo    @c -*-texinfo-*-
@c %**start of header
@setfilename ntpq.info
@settitle ntpq: Network Time Protocol Query User's Manual
@include ../sntp/include/version.texi
@paragraphindent 2
@c %**end of header

@ifinfo
This file documents the use of the NTP Project's ntpq, a program for
querying the state of an NTP server.
@end ifinfo

@direntry
* ntpq: (ntpq).                               NTP Query program
@end direntry

@titlepage
@title ntpq: Network Time Protocol Query User's Manual
@subtitle ntpq, version @value{VERSION}, @value{UPDATED}
@c @author Max @email{foo@ntp.org}
@end titlepage

@c @page
@c @vskip 0pt plus 1filll

@shortcontents

@node Top, ntpq Description, (dir), (dir)
@top ntpq: Network Time Protocol Query User Manual

The @code{ntpq} utility program is used to
monitor the operational status
and determine the performance of
@code{ntpd}, the NTP daemon.

This document applies to version @value{VERSION} of @code{ntpq}.

@menu
* ntpq Description::            
* ntpq Invocation::             Invoking ntpq
* Usage::                       
* Internal Commands::           
* Control Message Commands::    
* Status Words and Kiss Codes::  
* System Variables::            
* Peer Variables::              
* Clock Variables::             
@end menu

@node ntpq Description, Usage, Top, Top
@comment  node-name,  next,  previous,  up
@section Description

The @code{ntpq} utility program is used to monitor NTP daemon @code{ntpd} operations and determine performance.
It uses the standard NTP mode 6 control message formats defined in
Appendix B of the NTPv3 specification RFC1305.
The same formats are used in NTPv4, although some of the variable names have changed and new ones added.
The description on this page is for the NTPv4 variables.

The program can be run either in interactive mode or controlled using command line arguments.  Requests to read and write arbitrary variables can be assembled, with raw and pretty-printed output options being available.  The @code{ntpq} can also obtain and print a list of peers in a common format by sending multiple queries to the server.

If one or more request options is included on the command line when @code{ntpq} is executed, each of the requests will be sent to the NTP servers running on each of the hosts given as command line arguments, or on localhost by default.  If no request options are given, @code{ntpq} will attempt to read commands from the standard input and execute these on the NTP server running on the first host given on the command line, again defaulting to localhost when no other host is specified.  @code{ntpq} will prompt for commands if the standard input is a terminal device.

@code{ntpq} uses NTP mode 6 packets to communicate with the NTP server, and hence can be used to query any compatible server on the network which permits it.  Note that since NTP is a UDP protocol this communication will be somewhat unreliable, especially over large distances in terms of network topology.  @code{ntpq} makes one attempt to retransmit requests, and will time requests out if the remote host is not heard from within a suitable timeout time.

Note that in contexts where a host name is expected, a @code{-4} qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a @code{-6} qualifier forces DNS resolution to the IPv6 namespace.

For examples and usage, see the @url{debug.html, NTP Debugging Techniques} page.

@include invoke-ntpq.texi

@node Usage, Internal Commands, ntpq Description, Top
@comment  node-name,  next,  previous,  up
@section Usage

@multitable @columnfractions .23 .23 .05 .15
@headitem What @tab Default @tab Flag @tab Option
@item configuration file
@tab @code{/etc/ntp.conf}
@tab @code{-c}
@tab @code{conffile}
@item frequency file
@tab none
@tab @code{-f}
@tab @code{driftfile}
@item leapseconds file
@tab none
@tab
@tab @code{leapfile}
@item process ID file
@tab none
@tab @code{-p}
@tab @code{pidfile}
@item log file
@tab system log
@tab @code{-l}
@tab @code{logfile}
@item include file
@tab none
@tab none
@tab @code{includefile}
@item statistics path
@tab @code{/var/NTP}
@tab @code{-s}
@tab @code{statsdir}
@item keys path
@tab @code{/usr/local/etc}
@tab @code{-k}
@tab @code{keysdir}
@end multitable

@node Internal Commands, Control Message Commands, Usage, Top
@comment  node-name,  next,  previous,  up
@section Internal Commands

Interactive format commands consist of a keyword followed by zero to four arguments.  Only enough characters of the full keyword to uniquely identify the command need be typed.  The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a @code{>}, followed by a file name, to the command line.  A number of interactive format commands are executed entirely within the @code{ntpq} program itself and do not result in NTP mode-6 requests being sent to a server.  These are described following.

@table @code

@item @anchor{help} @code{? [}@kbd{command_keyword}@code{]}
@itemx @code{help [}@kbd{command_keyword}@code{]}
A @code{?} by itself will print a list of all the command keywords known to @code{ntpq}.  A @code{?} followed by a command keyword will print function and usage information about the command.

@item @anchor{addvars} >@code{addvars @kbd{name} [ = @kbd{value}] [...]}
@itemx @code{rmvars @kbd{name} [...]}
@itemx @code{clearvars}</dt>
The arguments to these commands consist of a list of items of the form
@code{@kbd{name} = @kbd{value}}, where the @code{= @kbd{value}} is ignored,
and can be omitted in read requests.
@code{ntpq} maintains an internal list in which data to be included
in control messages can be assembled, and sent using the @code{readlist}
and @code{writelist} commands described below.
The @code{addvars} command allows variables and optional values
to be added to the list.
If more than one variable is to be added
the list should be comma-separated and not contain white space.
The @code{rmvars} command can be used to remove individual variables
from the list,
while the @code{clearlist} command removes all variables from the list.

@item @anchor{cooked} @code{cooked}
Display server messages in prettyprint format.

@item @anchor{debug} @code{debug more | less | off}
Turns internal query program debugging on and off.

@item @anchor{delay} @code{delay @kbd{milliseconds}}
Specify a time interval to be added to timestamps included in requests which require authentication.  This is used to enable (unreliable) server reconfiguration over long delay network paths or between machines whose clocks are unsynchronized.  Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete.

@item @anchor{host} @code{host @kbd{name}}
Set the host to which future queries will be sent.
The name may be either a DNS name or a numeric address.

@item @anchor{hostnames} @code{hostnames [yes | no]}
If @code{yes} is specified, host names are printed in information displays.
If @code{no} is specified, numeric addresses are printed instead.
The default is @code{yes},
unless modified using the command line @code{-n} switch.

@item @anchor{keyid} @code{keyid @kbd{keyid}}
This command specifies the key number to be used
to authenticate configuration requests.
This must correspond to a key ID configured in @code{ntp.conf} for this purpose.

@item @anchor{keytype} @code{keytype}
Specify the digest algorithm to use for authenticated requests,
with default @code{MD5}.
If the OpenSSL library is installed,
digest can be be any message digest algorithm supported by the library.
The current selections are: @code{AES128CMAC}, @code{MD2}, @code{MD4}, @code{MD5}, @code{MDC2}, @code{RIPEMD160}, @code{SHA} and @code{SHA1}.

@item @anchor{ntpversion} @code{ntpversion 1 | 2 | 3 | 4}
Sets the NTP version number which @code{ntpq} claims in packets.
Defaults to 2.
Note that mode-6 control messages (and modes, for that matter)
didn't exist in NTP version 1.

@item @anchor{passwd} @code{passwd}
This command prompts for a password to authenticate requests.
The password must correspond to the key ID configured in @code{ntp.conf} for this purpose.

@item @anchor{quit} @code{quit}
Exit @code{ntpq}.

@item @anchor{raw} @code{raw}
Display server messages as received and without reformatting.

@item @anchor{timeout} @code{timeout @kbd{milliseconds}}
Specify a timeout period for responses to server queries.
The default is about 5000 milliseconds.
Note that since @code{ntpq} retries each query once after a timeout
the total waiting time for a timeout will be twice the timeout value set.

@end table

@node Control Message Commands, Status Words and Kiss Codes, Internal Commands, Top
@comment  node-name,  next,  previous,  up
@section Control Message Commands

Association IDs are used to identify system, peer and clock variables.
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.
Most control commands send a single mode-6 message to the server
and expect a single response message.
The exceptions are the @code{peers} command,
which sends a series of messages,
and the @code{mreadlist} and @code{mreadvar} commands,
which iterate over a range of associations.

@anchor{as}
@table @code
@item @code{associations}
Display a list of mobilized associations in the form:
@*
@code{ind assid status conf reach auth condition last_event cnt}

@multitable @columnfractions .1 .4
@headitem Variable @tab Description

@item @code{ind}
@tab index on this list

@item @code{assid}
@tab association ID

@item @code{status}
@tab @url{decode.html#peer, peer status word}

@item @code{conf}
@tab @code{yes}: persistent, @code{no}: ephemeral

@item @code{reach}
@tab @code{yes}: reachable, @code{no}: unreachable

@item @code{auth}
@tab @code{ok}, @code{yes}, @code{bad} and @code{none}

@item @code{condition}
@tab selection status (see the @code{select} field of the @url{decode.html#peer, peer status word})

@item @code{last_event}
@tab event report (see the @code{event} field of the @url{decode.html#peer, peer status word})

@item @code{cnt}
event count (see the @code{count} field of the @url{decode.html#peer, peer status word})

@end multitable

@item @anchor{cv} clockvar @kbd{assocID} [@kbd{name} [ = @kbd{value} [...]] [...]]
@itemx cv @kbd{assocID} [@kbd{name} [ = @kbd{value} [...] ][...]]
Display a list of @ref{clock,,clock variables} for those associations supporting a reference clock.

@item @anchor{:config} :config [...]
Send the remainder of the command line, including whitespace, to the server
as a run-time configuration command in the same format
as the configuration file.
This command is experimental until further notice and clarification.
Authentication is of course required.

@item @anchor{config-from-file} config-from-file @kbd{filename}
Send the each line of @kbd{filename} to the server as
run-time configuration commands in the same format as the configuration file.
This command is experimental until further notice and clarification.
Authentication is required.

@item @anchor{ifstats} ifstats
Display statistics for each local network address.
Authentication is required.

@item @anchor{iostats} iostats
Display network and reference clock I/O statistics.

@item @anchor{kerninfo} kerninfo
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.

@item @anchor{lassoc} lassociations
Perform the same function as the associations command,
except display mobilized and unmobilized associations.

@item @anchor{monstats} monstats
Display monitor facility statistics.

@item @anchor{mrulist} mrulist [limited | kod | mincount=@kbd{count} | laddr=@kbd{localaddr} | sort=@kbd{sortorder} | resany=@kbd{hexmask} | resall=@kbd{hexmask}]
Obtain and print traffic counts collected and maintained by
the monitor facility.
With the exception of @code{sort=@kbd{sortorder}},
the options filter the list returned by @code{ntpd}.
The @code{limited} and @code{kod} options return only entries
representing client addresses from which the last packet received
triggered either discarding or a KoD response.
The @code{mincount=@kbd{count}} option filters entries representing
less than @code{@kbd{count}} packets.
The @code{laddr=@kbd{localaddr}} option filters entries for packets
received on any local address other than @code{@kbd{localaddr}}.
@code{resany=@kbd{hexmask}} and @code{resall=@kbd{hexmask}}
filter entries containing none or less than all, respectively,
of the bits in @code{@kbd{hexmask}}, which must begin with @code{0x}.
@*
The @code{@kbd{sortorder}} defaults to @code{lstint} and may be any of
@code{addr}, @code{count}, @code{avgint}, @code{lstint}, or
any of those preceded by a minus sign (hyphen) to reverse the sort order.
The output columns are:

@multitable @columnfractions .1 .4
@headitem Column @tab Description

@item @code{lstint}
@tab
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 @code{ntpq}

@item @code{avgint}
@tab
Average interval in s between packets from this address.

@item @code{rstr}
@tab
Restriction flags associated with this address.
Most are copied unchanged from the matching @code{restrict} command,
however 0x400 (kod) and 0x20 (limited) flags are cleared unless
the last packet from this address triggered a rate control response.

@item @code{r}
@tab
Rate control indicator, either a period, @code{L} or @code{K} for
no rate control response, rate limiting by discarding, or
rate limiting with a KoD response, respectively.

@item @code{m}
@tab
Packet mode.
@item @code{v}
@tab
Packet version number.

@item @code{count}
@tab
Packets received from this address.

@item @code{rport}
@tab
Source port of last packet from this address.

@item @code{remote address}
@tab
DNS name, numeric address, or address followed by claimed DNS name which
could not be verified in parentheses.

@end multitable

@item @anchor{mreadvar} @code{mreadvar @kbd{assocID} @kbd{assocID} [ @kbd{variable_name} [ = @kbd{value}[ ... ]}
@itemx @anchor{mrv} @code{mrv @kbd{assocID} @kbd{assocID} [ @kbd{variable_name} [ = @kbd{value}[ ... ]}
Perform the same function as the @code{readvar} command,
except for a range of association IDs.
This range is determined from the association list cached by
the most recent @code{associations} command.

@item @anchor{passoc} @code{passociations}
Perform the same function as the @code{associations command}, except that
it uses previously stored data rather than making a new query.

@item @anchor{pe} @code{peers}
Display a list of peers in the form:
@*
@code{[tally]remote refid st t when pool reach delay offset jitter}

@multitable @columnfractions .1 .2
@headitem Variable @tab Description
@item @code{[tally]}
@tab
single-character code indicating current value of the @code{select} field
of the @url{decode.html#peer, peer status word}.

@item @code{remote}
@tab
host name (or IP number) of peer

@item @code{refid}
@tab
association ID or @url{decode.html#kiss, kiss code}.

@item @code{st}
@tab
stratum

@item @code{t}
@tab
@code{u}: unicast or manycast client,
@code{b}: broadcast or multicast client,
@code{l}: local (reference clock),
@code{s}: symmetric (peer),
@code{A}: manycast server,
@code{B}: broadcast server,
@code{M}: multicast server.

@item @code{when}
@tab
sec/min/hr since last received packet

@item @code{poll}
@tab
poll interval (log(2) s)

@item @code{reach}
@tab
reach shift register (octal)

@item @code{delay}
@tab
roundtrip delay

@item @code{offset}
@tab
offset of server relative to this host

@item @code{jitter}
@tab
jitter

@end multitable

@item @anchor{rv} readvar @kbd{assocID} @kbd{name} [ = @kbd{value} ] [,...]
@itemx rv @kbd{assocID} [ @kbd{name} ] [,...]
Display the specified variables.
If @code{@kbd{assocID}} is zero,
the variables are from the @ref{system, system variables} name space,
otherwise they are from the @ref{peer, peer variables} name space.
The @kbd{assocID} is required, as the same name can occur in both spaces.
If no @kbd{name} is included,
all operative variables in the name space are displayed.
In this case only, if the @code{@kbd{assocID}} is omitted, it is assumed zero.
Multiple names are specified with comma separators and without whitespace.
Note that time values are represented in milliseconds and
frequency values in parts-per-million (PPM).
Some NTP timestamps are represented in the format YYYYMMDDTTTT,
where YYYY is the year, MM the month of year, DD the day of month and
TTTT the time of day.

@item @anchor{saveconfig} @code{saveconfig @kbd{filename}}
Write the current configuration, including any runtime modifications
given with @code{:config} or @code{config-from-file},
to the ntpd host's file @kbd{filename}.
This command will be rejected by the server unless
@url{miscopt.html#saveconfigdir, saveconfigdir}
appears in the @code{ntpd} configuration file.
@kbd{filename} can use @code{strftime()} format specifiers
to substitute the current date and time, for example,
@code{saveconfig ntp-%Y%m%d-%H%M%S.conf}.
The filename used is stored in system variable @code{savedconfig}.
Authentication is required.

@item @anchor{writevar} writevar @kbd{assocID} @kbd{name} = @kbd{value} [,...]
Write the specified variables.
If the @code{@kbd{assocID}} is zero, the variables are from the
@ref{system, system variables} name space, otherwise they are from the
@ref{peer, peer variables} name	space.
The @code{@kbd{assocID}} is required,
as the same name can occur in both spaces.

@item @anchor{sysinfo} @code{sysinfo}
Display operational summary.

@item @anchor{sysstats} @code{sysstats}
Print statistics counters maintained in the protocol module.

@end table

@node Status Words and Kiss Codes, System Variables, Control Message Commands, Top
@comment  node-name,  next,  previous,  up
@section Status Words and Kiss Codes

The current state of the operating program is shown
in a set of status words maintained by the system
and each association separately.
These words are displayed in the @code{rv} and @code{as} commands
both in hexadecimal and decoded short tip strings.
The codes, tips and short explanations are on the
@url{decode.html, Event Messages and Status Words} page.
The page also includes a list of system and peer messages,
the code for the latest of which is included in the status word.

Information resulting from protocol machine state transitions
is displayed using an informal set of ASCII strings called
@url{decode.html#kiss, kiss codes}.
The original purpose was for kiss-o'-death (KoD) packets sent
by the server to advise the client of an unusual condition.
They are now displayed, when appropriate,
in the reference identifier field in various billboards.

@node System Variables, Peer Variables, Status Words and Kiss Codes, Top
@comment  node-name,  next,  previous,  up
@section System Variables

The following system variables appear in the @code{rv} billboard.
Not all variables are displayed in some configurations.

@multitable @columnfractions .1 .2
@headitem Variable @tab Description

@item @code{status}
@tab
@url{decode.html#sys, system status word}

@item @code{version}
@tab
NTP software version and build time

@item @code{processor}
@tab
hardware platform and version
    
@item @code{system}
@tab
operating system and version

@item @code{leap}
@tab
leap warning indicator (0-3)

@item @code{stratum}
@tab
stratum (1-15)

@item @code{precision}
@tab
precision (log(2) s)

@item @code{rootdelay}
@tab
total roundtrip delay to the primary reference clock

@item @code{rootdisp}
@tab
total dispersion to the primary reference clock

@item @code{peer}
@tab
system peer association ID

@item @code{tc}
time constant and poll exponent (log(2) s) (3-17)

@item @code{mintc}
minimum time constant (log(2) s) (3-10)

@item @code{clock}
@tab
date and time of day

@item @code{refid}
reference ID or @url{decode.html#kiss, kiss code}

@item @code{reftime}
@tab
reference time

@item @code{offset}
@tab
combined offset of server relative to this host

@item @code{sys_jitter}
@tab
combined system jitter

@item @code{frequency}
@tab
frequency offset (PPM) relative to hardware clock

@item @code{clk_wander}
@tab
clock frequency wander (PPM)

@item @code{clk_jitter}
@tab
clock jitter

@item @code{tai}
@tab
TAI-UTC offset (s)

@item @code{leapsec}
@tab
NTP seconds when the next leap second is/was inserted

@item @code{expire}
@tab
NTP seconds when the NIST leapseconds file expires

@end multitable

The jitter and wander statistics are exponentially-weighted RMS averages.
The system jitter is defined in the NTPv4 specification;
the clock jitter statistic is computed by the clock discipline module.

When the NTPv4 daemon is compiled with the OpenSSL software library,
additional system variables are displayed, including some or all of the
following, depending on the particular Autokey dance:

@multitable @columnfractions .1 .2
@headitem Variable @tab Description

@item @code{host}
@tab
Autokey host name for this host

@item @code{ident}
@tab
Autokey group name for this host

@item @code{flags}
@tab
host flags  (see Autokey specification)

@item @code{digest}
@tab
OpenSSL message digest algorithm

@item @code{signature}
@tab
OpenSSL digest/signature scheme

@item @code{update}
@tab
NTP seconds at last signature update

@item @code{cert}
@tab
certificate subject, issuer and certificate flags

@item @code{until}
@tab
NTP seconds when the certificate expires

@end multitable

@node Peer Variables, Clock Variables, System Variables, Top
@comment  node-name,  next,  previous,  up
@section Peer Variables

The following peer variables appear in the @code{rv} billboard
for each association.
Not all variables are displayed in some configurations.

@multitable @columnfractions .1 .2
@headitem Variable @tab Description

@item @code{associd}
@tab
association ID

@item @code{status}
@tab
@url{decode.html#peer, peer status word}

@item @code{srcadr}
@itemx @code{srcport}
@tab
source (remote) IP address and port

@item @code{dstadr}
@itemx @code{dstport}
@tab
destination (local) IP address and port

@item @code{leap}
@tab
leap indicator (0-3)

@item @code{stratum}
@tab
stratum (0-15)

@item @code{precision}
@tab
precision (log(2) s)

@item @code{rootdelay}
@tab
total roundtrip delay to the primary reference clock

@item @code{rootdisp}
@tab total root dispersion to the primary reference clock

@item @code{refid}
@tab
reference ID or @url{decode.html#kiss, kiss code}

@item @code{reftime}
@tab
reference time

@item @code{reach}
@tab
reach register (octal)

@item @code{unreach}
@tab
unreach counter

@item @code{hmode}
@tab
host mode (1-6)

@item @code{pmode}
@tab
peer mode (1-5)

@item @code{hpoll}
@tab
host poll exponent (log(2) s) (3-17)
@item @code{ppoll}
@tab
peer poll exponent (log(2) s) (3-17)

@item @code{headway}
@tab
headway (see @url{rate.html, Rate Management and the Kiss-o'-Death Packet})

@item @code{flash}
@tab
@url{decode.html#flash, flash status word}

@item @code{offset}
@tab
filter offset

@item @code{delay}
@tab
filter delay

@item @code{dispersion}
@tab
filter dispersion

@item @code{jitter}
@tab
filter jitter

@item @code{ident}
@tab
Autokey group name for this association

@item @code{bias}
@tab
unicast/broadcast bias

@item @code{xleave}
@tab
interleave delay (see @url{xleave.html, NTP Interleaved Modes})

@end multitable

The bias variable is calculated when the first broadcast packet is received
after the calibration volley.  It represents the offset of the broadcast
subgraph relative to the unicast subgraph.  The xleave variable appears
only the interleaved symmetric and interleaved modes.  It represents
the internal queuing, buffering and transmission delays for the preceding
packet.

When the NTPv4 daemon is compiled with the OpenSSL software library,
additional peer variables are displayed, including the following:

@multitable @columnfractions .1 .2
@headitem Variable @tab Description

@item @code{flags}
@tab
peer flags (see Autokey specification)

@item @code{host}
@tab
Autokey server name

@item @code{flags}
@tab
peer flags (see Autokey specification)

@item @code{signature}
@tab
OpenSSL digest/signature scheme

@item @code{initsequence}
@tab
initial key ID

@item @code{initkey}
@tab
initial key index

@item @code{timestamp}
@tab
Autokey signature timestamp

@end multitable

@node Clock Variables,  , Peer Variables, Top
@comment  node-name,  next,  previous,  up
@section Clock Variables

The following clock variables appear in the @code{cv} billboard for each association with a reference clock.  Not all variables are displayed in some configurations.

@multitable @columnfractions .1 .2
@headitem Variable @tab Description
@item @code{associd}
@tab association ID
@item @code{status}
@tab @url{decode.html#clock, clock status word}
@item @code{device}
@tab device description
@item @code{timecode}
@tab ASCII time code string (specific to device)
@item @code{poll}
@tab poll messages sent
@item @code{noreply}
@tab no reply
@item @code{badformat}
@tab bad format
@item @code{baddata}
@tab bad date or time
@item @code{fudgetime1}
@tab fudge time 1
@item @code{fudgetime2}
@tab fudge time 2
@item @code{stratum}
@tab driver stratum
@item @code{refid}
@tab driver reference ID
@item @code{flags}
@tab driver flags
@end multitable