ntpq.8 revision 290000
1158115Sume.Dd October 21 2015 2158115Sume.Dt NTPQ 8 User Commands 3158115Sume.Os 4158115Sume.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) 5158115Sume.\" 6158115Sume.\" $FreeBSD: releng/10.1/usr.sbin/ntp/doc/ntpq.8 290000 2015-10-26 11:37:31Z glebius $ 7158115Sume.\" 8158115Sume.\" It has been AutoGen-ed October 21, 2015 at 12:39:29 PM by AutoGen 5.18.5 9158115Sume.\" From the definitions ntpq-opts.def 10158115Sume.\" and the template file agmdoc-cmd.tpl 11158115Sume.Sh NAME 12158115Sume.Nm ntpq 13158115Sume.Nd standard NTP query program 14158115Sume.Sh SYNOPSIS 15158115Sume.Nm 16158115Sume.\" Mixture of short (flag) options and long options 17158115Sume.Op Fl flags 18158115Sume.Op Fl flag Op Ar value 19158115Sume.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc 20158115Sume[ host ...] 21158115Sume.Pp 22158115Sume.Sh DESCRIPTION 23158115SumeThe 24158115Sume.Nm 25158115Sumeutility program is used to query NTP servers which 26158115Sumeimplement the standard NTP mode 6 control message formats defined 27158115Sumein Appendix B of the NTPv3 specification RFC1305, requesting 28158115Sumeinformation about current state and/or changes in that state. 29158115SumeThe same formats are used in NTPv4, although some of the 30158115Sumevariables have changed and new ones added. The description on this 31158115Sumepage is for the NTPv4 variables. 32194093SdesThe program may be run either in interactive mode or controlled using 33194093Sdescommand line arguments. 34158115SumeRequests to read and write arbitrary 35158115Sumevariables can be assembled, with raw and pretty\-printed output 36158115Sumeoptions being available. 37194093SdesThe 38158115Sume.Nm 39158115Sumeutility can also obtain and print a 40158115Sumelist of peers in a common format by sending multiple queries to the 41158115Sumeserver. 42158115SumeIf one or more request options is included on the command line 43158115Sumewhen 44158115Sume.Nm 45158115Sumeis executed, each of the requests will be sent 46171795Sbushmanto the NTP servers running on each of the hosts given as command 47158115Sumeline arguments, or on localhost by default. 48158115SumeIf no request options 49171795Sbushmanare given, 50158115Sume.Nm 51171795Sbushmanwill attempt to read commands from the 52171795Sbushmanstandard input and execute these on the NTP server running on the 53171795Sbushmanfirst host given on the command line, again defaulting to localhost 54158115Sumewhen no other host is specified. 55158115SumeThe 56171795Sbushman.Nm 57158115Sumeutility will prompt for 58158115Sumecommands if the standard input is a terminal device. 59158115Sume.Nm 60158115Sumeuses NTP mode 6 packets to communicate with the 61158115SumeNTP server, and hence can be used to query any compatible server on 62158115Sumethe network which permits it. 63158115SumeNote that since NTP is a UDP protocol 64158115Sumethis communication will be somewhat unreliable, especially over 65158115Sumelarge distances in terms of network topology. 66158115SumeThe 67158115Sume.Nm 68171795Sbushmanutility makes 69158115Sumeone attempt to retransmit requests, and will time requests out if 70158115Sumethe remote host is not heard from within a suitable timeout 71158115Sumetime. 72158115SumeSpecifying a 73158115Sumecommand line option other than 74158115Sume.Fl i 75194096Sdesor 76194096Sdes.Fl n 77194096Sdeswill 78194096Sdescause the specified query (queries) to be sent to the indicated 79158115Sumehost(s) immediately. 80158115SumeOtherwise, 81158115Sume.Nm 82158115Sumewill attempt to read 83158115Sumeinteractive format commands from the standard input. 84158115Sume.Ss "Internal Commands" 85158115SumeInteractive format commands consist of a keyword followed by zero 86158115Sumeto four arguments. 87158115SumeOnly enough characters of the full keyword to 88158115Sumeuniquely identify the command need be typed. 89158115SumeA 90158115Sumenumber of interactive format commands are executed entirely within 91158115Sumethe 92158115Sume.Nm 93158115Sumeutility itself and do not result in NTP mode 6 94171795Sbushmanrequests being sent to a server. 95158115SumeThese are described following. 96158115Sume.Bl -tag -width "? [command_keyword]" -compact -offset indent 97158115Sume.It Ic ? Op Ar command_keyword 98158115Sume.It Ic help Op Ar command_keyword 99158115SumeA 100158115Sume.Ql \&? 101158115Sumeby itself will print a list of all the command 102158115Sumekeywords known to this incarnation of 103158115Sume.Nm . 104158115SumeA 105171795Sbushman.Ql \&? 106158115Sumefollowed by a command keyword will print function and usage 107158115Sumeinformation about the command. 108158115SumeThis command is probably a better 109158115Sumesource of information about 110158115Sume.Nm 111158115Sumethan this manual 112194096Sdespage. 113194096Sdes.It Ic addvars Ar variable_name Ns Xo Op Ic =value 114194096Sdes.Ic ... 115194096Sdes.Xc 116158115Sume.It Ic rmvars Ar variable_name Ic ... 117158115Sume.It Ic clearvars 118158115Sume.It Ic showvars 119158115SumeThe data carried by NTP mode 6 messages consists of a list of 120158115Sumeitems of the form 121158115Sume.Ql variable_name=value , 122158115Sumewhere the 123158115Sume.Ql =value 124158115Sumeis ignored, and can be omitted, 125158115Sumein requests to the server to read variables. 126158115SumeThe 127158115Sume.Nm 128158115Sumeutility maintains an internal list in which data to be included in control 129158115Sumemessages can be assembled, and sent using the 130158115Sume.Ic readlist 131171795Sbushmanand 132158115Sume.Ic writelist 133158115Sumecommands described below. 134158115SumeThe 135158115Sume.Ic addvars 136158115Sumecommand allows variables and their optional values to be added to 137158115Sumethe list. 138158115SumeIf more than one variable is to be added, the list should 139158115Sumebe comma\-separated and not contain white space. 140158115SumeThe 141158115Sume.Ic rmvars 142158115Sumecommand can be used to remove individual variables from the list, 143158115Sumewhile the 144158115Sume.Ic clearlist 145158115Sumecommand removes all variables from the 146158115Sumelist. 147158115SumeThe 148158115Sume.Ic showvars 149158115Sumecommand displays the current list of optional variables. 150158115Sume.It Ic authenticate Op yes | no 151158115SumeNormally 152158115Sume.Nm 153158115Sumedoes not authenticate requests unless 154158115Sumethey are write requests. 155158115SumeThe command 156158115Sume.Ql authenticate yes 157158115Sumecauses 158158115Sume.Nm 159158115Sumeto send authentication with all requests it 160158115Sumemakes. 161158115SumeAuthenticated requests causes some servers to handle 162158115Sumerequests slightly differently, and can occasionally melt the CPU in 163158115Sumefuzzballs if you turn authentication on before doing a 164158115Sume.Ic peer 165158115Sumedisplay. 166158115SumeThe command 167158115Sume.Ql authenticate 168158115Sumecauses 169158115Sume.Nm 170158115Sumeto display whether or not 171158115Sume.Nm 172158115Sumeis currently autheinticating requests. 173158115Sume.It Ic cooked 174158115SumeCauses output from query commands to be "cooked", so that 175158115Sumevariables which are recognized by 176158115Sume.Nm 177158115Sumewill have their 178158115Sumevalues reformatted for human consumption. 179158115SumeVariables which 180171795Sbushman.Nm 181171795Sbushmanthinks should have a decodable value but didn't are 182158115Sumemarked with a trailing 183171795Sbushman.Ql \&? . 184158115Sume.It Xo 185158115Sume.Ic debug 186158115Sume.Oo 187158115Sume.Cm more | 188158115Sume.Cm less | 189171795Sbushman.Cm off 190158115Sume.Oc 191158115Sume.Xc 192158115SumeWith no argument, displays the current debug level. 193158115SumeOtherwise, the debug level is changed to the indicated level. 194184188Sdelphij.It Ic delay Ar milliseconds 195158115SumeSpecify a time interval to be added to timestamps included in 196158115Sumerequests which require authentication. 197158115SumeThis is used to enable 198158115Sume(unreliable) server reconfiguration over long delay network paths 199158115Sumeor between machines whose clocks are unsynchronized. 200158115SumeActually the 201158115Sumeserver does not now require timestamps in authenticated requests, 202158115Sumeso this command may be obsolete. 203171795Sbushman.It Ic exit 204158115SumeExit 205158115Sume.Nm . 206158115Sume.It Ic host Ar hostname 207158115SumeSet the host to which future queries will be sent. 208194104Sdes.Ar hostname 209158115Sumemay be either a host name or a numeric address. 210158115Sume.It Ic hostnames Op Cm yes | Cm no 211158115SumeIf 212158115Sume.Cm yes 213158115Sumeis specified, host names are printed in 214158115Sumeinformation displays. 215158115SumeIf 216158115Sume.Cm no 217158115Sumeis specified, numeric 218158115Sumeaddresses are printed instead. 219158115SumeThe default is 220158115Sume.Cm yes , 221158115Sumeunless 222158115Sumemodified using the command line 223158115Sume.Fl n 224158115Sumeswitch. 225158115Sume.It Ic keyid Ar keyid 226158115SumeThis command allows the specification of a key number to be 227171795Sbushmanused to authenticate configuration requests. 228158115SumeThis must correspond 229158115Sumeto the 230158115Sume.Cm controlkey 231158115Sumekey number the server has been configured to use for this 232171795Sbushmanpurpose. 233158115Sume.It Ic keytype Xo Oo 234158115Sume.Cm md5 | 235171795Sbushman.Cm OpenSSLDigestType 236158115Sume.Oc 237158115Sume.Xc 238158115SumeSpecify the type of key to use for authenticating requests. 239158115Sume.Cm md5 240158115Sumeis alway supported. 241158115SumeIf 242171795Sbushman.Nm 243158115Sumewas built with OpenSSL support, 244158115Sumeany digest type supported by OpenSSL can also be provided. 245158115SumeIf no argument is given, the current 246171795Sbushman.Ic keytype 247158115Sumeis displayed. 248158115Sume.It Ic ntpversion Xo Oo 249158115Sume.Cm 1 | 250158115Sume.Cm 2 | 251158115Sume.Cm 3 | 252158115Sume.Cm 4 253171795Sbushman.Oc 254158115Sume.Xc 255158115SumeSets the NTP version number which 256158115Sume.Nm 257158115Sumeclaims in 258158115Sumepackets. 259158115SumeDefaults to 3, and note that mode 6 control messages (and 260158115Sumemodes, for that matter) didn't exist in NTP version 1. 261158115SumeThere appear 262158115Sumeto be no servers left which demand version 1. 263158115SumeWith no argument, displays the current NTP version that will be used 264158115Sumewhen communicating with servers. 265158115Sume.It Ic passwd 266158115SumeThis command prompts you to type in a password (which will not 267158115Sumebe echoed) which will be used to authenticate configuration 268158115Sumerequests. 269158115SumeThe password must correspond to the key configured for 270158115Sumeuse by the NTP server for this purpose if such requests are to be 271158115Sumesuccessful. 272158115Sume.\" Not yet implemented. 273158115Sume.\" .It Ic poll 274158115Sume.\" .Op Ar n 275158115Sume.\" .Op Ic verbose 276158115Sume.\" Poll an NTP server in client mode 277158115Sume.\" .Ar n 278158115Sume.\" times. 279158115Sume.It Ic quit 280158115SumeExit 281158115Sume.Nm . 282158115Sume.It Ic raw 283158115SumeCauses all output from query commands is printed as received 284158115Sumefrom the remote server. 285171795SbushmanThe only formating/interpretation done on 286158115Sumethe data is to transform nonascii data into a printable (but barely 287158115Sumeunderstandable) form. 288.It Ic timeout Ar milliseconds 289Specify a timeout period for responses to server queries. 290The 291default is about 5000 milliseconds. 292Note that since 293.Nm 294retries each query once after a timeout, the total waiting time for 295a timeout will be twice the timeout value set. 296.It Ic version 297Print the version of the 298.Nm 299program. 300.El 301.Ss "Control Message Commands" 302Association IDs are used to identify system, peer and clock variables. 303System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace. 304Most control commands send a single mode\-6 message to the server and expect a single response message. 305The exceptions are the 306.Li peers 307command, which sends a series of messages, 308and the 309.Li mreadlist 310and 311.Li mreadvar 312commands, which iterate over a range of associations. 313.Bl -tag -width "something" -compact -offset indent 314.It Cm associations 315Display a list of mobilized associations in the form: 316.Dl ind assid status conf reach auth condition last_event cnt 317.Bl -column -offset indent ".Sy Variable" ".Sy Description" 318.It Sy String Ta Sy Description 319.It Li ind Ta index on this list 320.It Li assid Ta association ID 321.It Li status Ta peer status word 322.It Li conf Ta Li yes : persistent, Li no : ephemeral 323.It Li reach Ta Li yes : reachable, Li no : unreachable 324.It Li auth Ta Li ok , Li yes , Li bad and Li none 325.It Li condition Ta selection status (see the Li select field of the peer status word) 326.It Li last_event Ta event report (see the Li event field of the peer status word) 327.It Li cnt Ta event count (see the Li count field of the peer status word) 328.El 329.It Cm authinfo 330Display the authentication statistics. 331.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ... 332.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ... 333Display a list of clock variables for those associations supporting a reference clock. 334.It Cm :config Op ... 335Send the remainder of the command line, including whitespace, to the server as a run\-time configuration command in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is of course required. 336.It Cm config\-from\-file Ar filename 337Send the each line of 338.Ar filename 339to the server as run\-time configuration commands in the same format as a line in the configuration file. This command is experimental until further notice and clarification. Authentication is required. 340.It Ic ifstats 341Display statistics for each local network address. Authentication is required. 342.It Ic iostats 343Display network and reference clock I/O statistics. 344.It Ic kerninfo 345Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable. 346.It Ic lassociations 347Perform the same function as the associations command, except display mobilized and unmobilized associations. 348.It Ic lopeers Xo 349.Oo Ic \-4 | 350.Ic \-6 351.Oc 352.Xc 353Obtain and print a list of all peers and clients showing 354.Ar dstadr 355(associated with any given IP version). 356.It Ic lpeers Xo 357.Oo Ic \-4 | 358.Ic \-6 359.Oc 360.Xc 361Print a peer spreadsheet for the appropriate IP version(s). 362.Ar dstadr 363(associated with any given IP version). 364.It Ic monstats 365Display monitor facility statistics. 366.It Ic mrulist Oo Ic limited | Ic kod | Ic mincount Ns = Ns Ar count | Ic laddr Ns = Ns Ar localaddr | Ic sort Ns = Ns Ar sortorder | Ic resany Ns = Ns Ar hexmask | Ic resall Ns = Ns Ar hexmask Oc 367Obtain and print traffic counts collected and maintained by the monitor facility. 368With the exception of 369.Cm sort Ns = Ns Ar sortorder , 370the options filter the list returned by 371.Cm ntpd. 372The 373.Cm limited 374and 375.Cm kod 376options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. 377The 378.Cm mincount Ns = Ns Ar count 379option filters entries representing less than 380.Ar count 381packets. 382The 383.Cm laddr Ns = Ns Ar localaddr 384option filters entries for packets received on any local address other than 385.Ar localaddr . 386.Cm resany Ns = Ns Ar hexmask 387and 388.Cm resall Ns = Ns Ar hexmask 389filter entries containing none or less than all, respectively, of the bits in 390.Ar hexmask , 391which must begin with 392.Cm 0x . 393The 394.Ar sortorder 395defaults to 396.Cm lstint 397and may be any of 398.Cm addr , 399.Cm count , 400.Cm avgint , 401.Cm lstint , 402or any of those preceded by a minus sign (hyphen) to reverse the sort order. 403The output columns are: 404.Bl -tag -width "something" -compact -offset indent 405.It Column 406Description 407.It Ic lstint 408Interval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by 409.Nm . 410.It Ic avgint 411Average interval in s between packets from this address. 412.It Ic rstr 413Restriction flags associated with this address. 414Most are copied unchanged from the matching 415.Ic restrict 416command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response. 417.It Ic r 418Rate control indicator, either 419a period, 420.Ic L 421or 422.Ic K 423for no rate control response, 424rate limiting by discarding, or rate limiting with a KoD response, respectively. 425.It Ic m 426Packet mode. 427.It Ic v 428Packet version number. 429.It Ic count 430Packets received from this address. 431.It Ic rport 432Source port of last packet from this address. 433.It Ic remote address 434DNS name, numeric address, or address followed by 435claimed DNS name which could not be verified in parentheses. 436.El 437.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ... 438.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ... 439Perform the same function as the 440.Ic readvar 441command, except for a range of association IDs. 442This range is determined from the association list cached by the most recent 443.Ic associations 444command. 445.It Ic opeers Xo 446.Oo Ic \-4 | 447.Ic \-6 448.Oc 449.Xc 450Obtain and print the old\-style list of all peers and clients showing 451.Ar dstadr 452(associated with any given IP version), 453rather than the 454.Ar refid . 455.It Ic passociations 456Perform the same function as the 457.Ic associations 458command, 459except that it uses previously stored data rather than making a new query. 460.It Ic peers 461Display a list of peers in the form: 462.Dl [tally]remote refid st t when pool reach delay offset jitter 463.Bl -tag -width "something" -compact -offset indent 464.It Variable 465Description 466.It Ic [tally] 467single\-character code indicating current value of the 468.Ic select 469field of the 470.Lk decode.html#peer "peer status word" 471.It Ic remote 472host name (or IP number) of peer. 473The value displayed will be truncated to 15 characters unless the 474.Fl w 475flag is given, in which case the full value will be displayed 476on the first line, 477and the remaining data is displayed on the next line. 478.It Ic refid 479association ID or 480.Lk decode.html#kiss "'kiss code" 481.It Ic st 482stratum 483.It Ic t 484.Ic u : 485unicast or manycast client, 486.Ic b : 487broadcast or multicast client, 488.Ic l : 489local (reference clock), 490.Ic s : 491symmetric (peer), 492.Ic A : 493manycast server, 494.Ic B : 495broadcast server, 496.Ic M : 497multicast server 498.It Ic when 499sec/min/hr since last received packet 500.It Ic poll 501poll interval (log2 s) 502.It Ic reach 503reach shift register (octal) 504.It Ic delay 505roundtrip delay 506.It Ic offset 507offset of server relative to this host 508.It Ic jitter 509jitter 510.El 511.It Ic apeers 512Display a list of peers in the form: 513.Dl [tally]remote refid assid st t when pool reach delay offset jitter 514where the output is just like the 515.Ic peers 516command except that the 517.Ic refid 518is displayed in hex format and the association number is also displayed. 519.It Ic pstats Ar assocID 520Show the statistics for the peer with the given 521.Ar assocID . 522.It Ic readlist Ar assocID 523.It Ic rl Ar assocID 524Read the system or peer variables included in the variable list. 525.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc 526.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc 527Display the specified variables. 528If 529.Ar assocID 530is zero, the variables are from the 531.Sx System Variables 532name space, otherwise they are from the 533.Sx Peer Variables 534name space. 535The 536.Ar assocID 537is required, as the same name can occur in both spaces. 538If no 539.Ar name 540is included, all operative variables in the name space are displayed. 541In this case only, if the 542.Ar assocID 543is omitted, it is assumed zero. 544Multiple names are specified with comma separators and without whitespace. 545Note that time values are represented in milliseconds 546and frequency values in parts\-per\-million (PPM). 547Some NTP timestamps are represented in the format 548YYYYMMDDTTTT , 549where YYYY is the year, 550MM the month of year, 551DD the day of month and 552TTTT the time of day. 553.It Ic reslist 554Show the access control (restrict) list for 555.Nm . 556.It Ic saveconfig Ar filename 557Write the current configuration, 558including any runtime modifications given with 559.Ic :config 560or 561.Ic config\-from\-file , 562to the ntpd host's file 563.Ar filename . 564This command will be rejected by the server unless 565.Lk miscopt.html#saveconfigdir "saveconfigdir" 566appears in the 567.Ic ntpd 568configuration file. 569.Ar filename 570can use 571.Xr strftime 572format specifies to substitute the current date and time, for example, 573.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] . 574The filename used is stored in system variable 575.Ic savedconfig . 576Authentication is required. 577.It Ic timerstats 578Display interval timer counters. 579.It Ic writelist Ar assocID 580Write the system or peer variables included in the variable list. 581.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ... 582Write the specified variables. 583If the 584.Ar assocID 585is zero, the variables are from the 586.Sx System Variables 587name space, otherwise they are from the 588.Sx Peer Variables 589name space. 590The 591.Ar assocID 592is required, as the same name can occur in both spaces. 593.It Ic sysinfo 594Display operational summary. 595.It Ic sysstats 596Print statistics counters maintained in the protocol module. 597.El 598.Ss Status Words and Kiss Codes 599The current state of the operating program is shown 600in a set of status words 601maintained by the system. 602Status information is also available on a per\-association basis. 603These words are displayed in the 604.Ic rv 605and 606.Ic as 607commands both in hexadecimal and in decoded short tip strings. 608The codes, tips and short explanations are documented on the 609.Lk decode.html "Event Messages and Status Words" 610page. 611The page also includes a list of system and peer messages, 612the code for the latest of which is included in the status word. 613.Pp 614Information resulting from protocol machine state transitions 615is displayed using an informal set of ASCII strings called 616.Lk decode.html#kiss "kiss codes" . 617The original purpose was for kiss\-o'\-death (KoD) packets 618sent by the server to advise the client of an unusual condition. 619They are now displayed, when appropriate, 620in the reference identifier field in various billboards. 621.Ss System Variables 622The following system variables appear in the 623.Ic rv 624billboard. 625Not all variables are displayed in some configurations. 626.Bl -tag -width "something" -compact -offset indent 627.It Variable 628Description 629.It Ic status 630.Lk decode.html#sys "system status word" 631.It Ic version 632NTP software version and build time 633.It Ic processor 634hardware platform and version 635.It Ic system 636operating system and version 637.It Ic leap 638leap warning indicator (0\-3) 639.It Ic stratum 640stratum (1\-15) 641.It Ic precision 642precision (log2 s) 643.It Ic rootdelay 644total roundtrip delay to the primary reference clock 645.It Ic rootdisp 646total dispersion to the primary reference clock 647.It Ic peer 648system peer association ID 649.It Ic tc 650time constant and poll exponent (log2 s) (3\-17) 651.It Ic mintc 652minimum time constant (log2 s) (3\-10) 653.It Ic clock 654date and time of day 655.It Ic refid 656reference ID or 657.Lk decode.html#kiss "kiss code" 658.It Ic reftime 659reference time 660.It Ic offset 661combined offset of server relative to this host 662.It Ic sys_jitter 663combined system jitter 664.It Ic frequency 665frequency offset (PPM) relative to hardware clock 666.It Ic clk_wander 667clock frequency wander (PPM) 668.It Ic clk_jitter 669clock jitter 670.It Ic tai 671TAI\-UTC offset (s) 672.It Ic leapsec 673NTP seconds when the next leap second is/was inserted 674.It Ic expire 675NTP seconds when the NIST leapseconds file expires 676.El 677The jitter and wander statistics are exponentially\-weighted RMS averages. 678The system jitter is defined in the NTPv4 specification; 679the clock jitter statistic is computed by the clock discipline module. 680.Pp 681When the NTPv4 daemon is compiled with the OpenSSL software library, 682additional system variables are displayed, 683including some or all of the following, 684depending on the particular Autokey dance: 685.Bl -tag -width "something" -compact -offset indent 686.It Variable 687Description 688.It Ic host 689Autokey host name for this host 690.It Ic ident 691Autokey group name for this host 692.It Ic flags 693host flags (see Autokey specification) 694.It Ic digest 695OpenSSL message digest algorithm 696.It Ic signature 697OpenSSL digest/signature scheme 698.It Ic update 699NTP seconds at last signature update 700.It Ic cert 701certificate subject, issuer and certificate flags 702.It Ic until 703NTP seconds when the certificate expires 704.El 705.Ss Peer Variables 706The following peer variables appear in the 707.Ic rv 708billboard for each association. 709Not all variables are displayed in some configurations. 710.Bl -tag -width "something" -compact -offset indent 711.It Variable 712Description 713.It Ic associd 714association ID 715.It Ic status 716.Lk decode.html#peer "peer status word" 717.It Ic srcadr 718source (remote) IP address 719.It Ic srcport 720source (remote) port 721.It Ic dstadr 722destination (local) IP address 723.It Ic dstport 724destination (local) port 725.It Ic leap 726leap indicator (0\-3) 727.It Ic stratum 728stratum (0\-15) 729.It Ic precision 730precision (log2 s) 731.It Ic rootdelay 732total roundtrip delay to the primary reference clock 733.It Ic rootdisp 734total root dispersion to the primary reference clock 735.It Ic refid 736reference ID or 737.Lk decode.html#kiss "kiss code" 738.It Ic reftime 739reference time 740.It Ic reach 741reach register (octal) 742.It Ic unreach 743unreach counter 744.It Ic hmode 745host mode (1\-6) 746.It Ic pmode 747peer mode (1\-5) 748.It Ic hpoll 749host poll exponent (log2 s) (3\-17) 750.It Ic ppoll 751peer poll exponent (log2 s) (3\-17) 752.It Ic headway 753headway (see 754.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" ) 755.It Ic flash 756.Lk decode.html#flash "flash status word" 757.It Ic offset 758filter offset 759.It Ic delay 760filter delay 761.It Ic dispersion 762filter dispersion 763.It Ic jitter 764filter jitter 765.It Ic ident 766Autokey group name for this association 767.It Ic bias 768unicast/broadcast bias 769.It Ic xleave 770interleave delay (see 771.Lk xleave.html "NTP Interleaved Modes" ) 772.El 773The 774.Ic bias 775variable is calculated when the first broadcast packet is received 776after the calibration volley. 777It represents the offset of the broadcast subgraph relative to the unicast subgraph. 778The 779.Ic xleave 780variable appears only for the interleaved symmetric and interleaved modes. 781It represents the internal queuing, buffering and transmission delays 782for the preceding packet. 783.Pp 784When the NTPv4 daemon is compiled with the OpenSSL software library, 785additional peer variables are displayed, including the following: 786.Bl -tag -width "something" -compact -offset indent 787.It Variable 788Description 789.It Ic flags 790peer flags (see Autokey specification) 791.It Ic host 792Autokey server name 793.It Ic flags 794peer flags (see Autokey specification) 795.It Ic signature 796OpenSSL digest/signature scheme 797.It Ic initsequence 798initial key ID 799.It Ic initkey 800initial key index 801.It Ic timestamp 802Autokey signature timestamp 803.El 804.Ss Clock Variables 805The following clock variables appear in the 806.Ic cv 807billboard for each association with a reference clock. 808Not all variables are displayed in some configurations. 809.Bl -tag -width "something" -compact -offset indent 810.It Variable 811Description 812.It Ic associd 813association ID 814.It Ic status 815.Lk decode.html#clock "clock status word" 816.It Ic device 817device description 818.It Ic timecode 819ASCII time code string (specific to device) 820.It Ic poll 821poll messages sent 822.It Ic noreply 823no reply 824.It Ic badformat 825bad format 826.It Ic baddata 827bad date or time 828.It Ic fudgetime1 829fudge time 1 830.It Ic fudgetime2 831fudge time 2 832.It Ic stratum 833driver stratum 834.It Ic refid 835driver reference ID 836.It Ic flags 837driver flags 838.El 839.Sh "OPTIONS" 840.Bl -tag 841.It Fl 4 , Fl \-ipv4 842Force IPv4 DNS name resolution. 843This option must not appear in combination with any of the following options: 844ipv6. 845.sp 846Force DNS resolution of following host names on the command line 847to the IPv4 namespace. 848.It Fl 6 , Fl \-ipv6 849Force IPv6 DNS name resolution. 850This option must not appear in combination with any of the following options: 851ipv4. 852.sp 853Force DNS resolution of following host names on the command line 854to the IPv6 namespace. 855.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd 856run a command and exit. 857This option may appear an unlimited number of times. 858.sp 859The following argument is interpreted as an interactive format command 860and is added to the list of commands to be executed on the specified 861host(s). 862.It Fl d , Fl \-debug\-level 863Increase debug verbosity level. 864This option may appear an unlimited number of times. 865.sp 866.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number 867Set the debug verbosity level. 868This option may appear an unlimited number of times. 869This option takes an integer number as its argument. 870.sp 871.It Fl i , Fl \-interactive 872Force ntpq to operate in interactive mode. 873This option must not appear in combination with any of the following options: 874command, peers. 875.sp 876Force \fBntpq\fP to operate in interactive mode. 877Prompts will be written to the standard output and 878commands read from the standard input. 879.It Fl n , Fl \-numeric 880numeric host addresses. 881.sp 882Output all host addresses in dotted\-quad numeric format rather than 883converting to the canonical host names. 884.It Fl \-old\-rv 885Always output status line with readvar. 886.sp 887By default, \fBntpq\fP now suppresses the \fBassocid=...\fP 888line that precedes the output of \fBreadvar\fP 889(alias \fBrv\fP) when a single variable is requested, such as 890\fBntpq \-c "rv 0 offset"\fP. 891This option causes \fBntpq\fP to include both lines of output 892for a single\-variable \fBreadvar\fP. 893Using an environment variable to 894preset this option in a script will enable both older and 895newer \fBntpq\fP to behave identically in this regard. 896.It Fl p , Fl \-peers 897Print a list of the peers. 898This option must not appear in combination with any of the following options: 899interactive. 900.sp 901Print a list of the peers known to the server as well as a summary 902of their state. This is equivalent to the 'peers' interactive command. 903.It Fl w , Fl \-wide 904Display the full 'remote' value. 905.sp 906Display the full value of the 'remote' value. If this requires 907more than 15 characters, display the full value, emit a newline, 908and continue the data display properly indented on the next line. 909.It Fl \&? , Fl \-help 910Display usage information and exit. 911.It Fl \&! , Fl \-more\-help 912Pass the extended usage information through a pager. 913.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc 914Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP 915configuration file listed in the \fBOPTION PRESETS\fP section, below. 916The command will exit after updating the config file. 917.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts 918Load options from \fIcfgfile\fP. 919The \fIno\-load\-opts\fP form will disable the loading 920of earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early, 921out of order. 922.It Fl \-version Op Brq Ar v|c|n 923Output version of program and exit. The default mode is `v', a simple 924version. The `c' mode will print copyright information and `n' will 925print the full copyright notice. 926.El 927.Sh "OPTION PRESETS" 928Any option that is not marked as \fInot presettable\fP may be preset 929by loading values from configuration ("RC" or ".INI") file(s) and values from 930environment variables named: 931.nf 932 \fBNTPQ_<option\-name>\fP or \fBNTPQ\fP 933.fi 934.ad 935The environmental presets take precedence (are processed later than) 936the configuration files. 937The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". 938If any of these are directories, then the file \fI.ntprc\fP 939is searched for within those directories. 940.Sh "ENVIRONMENT" 941See \fBOPTION PRESETS\fP for configuration environment variables. 942.Sh "FILES" 943See \fBOPTION PRESETS\fP for configuration files. 944.Sh "EXIT STATUS" 945One of the following exit values will be returned: 946.Bl -tag 947.It 0 " (EXIT_SUCCESS)" 948Successful program execution. 949.It 1 " (EXIT_FAILURE)" 950The operation failed or the command syntax was not valid. 951.It 66 " (EX_NOINPUT)" 952A specified configuration file could not be loaded. 953.It 70 " (EX_SOFTWARE)" 954libopts had an internal operational error. Please report 955it to autogen\-users@lists.sourceforge.net. Thank you. 956.El 957.Sh "AUTHORS" 958The University of Delaware and Network Time Foundation 959.Sh "COPYRIGHT" 960Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved. 961This program is released under the terms of the NTP license, <http://ntp.org/license>. 962.Sh "BUGS" 963Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org 964.Sh "NOTES" 965This manual page was \fIAutoGen\fP\-erated from the \fBntpq\fP 966option definitions. 967