1310419Sdelphij.Dd November 21 2016 2290001Sglebius.Dt NTPQ @NTPQ_MS@ User Commands 3290001Sglebius.Os 4290001Sglebius.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc) 5290001Sglebius.\" 6310419Sdelphij.\" It has been AutoGen-ed November 21, 2016 at 08:03:08 AM by AutoGen 5.18.5 7290001Sglebius.\" From the definitions ntpq-opts.def 8290001Sglebius.\" and the template file agmdoc-cmd.tpl 9290001Sglebius.Sh NAME 10290001Sglebius.Nm ntpq 11290001Sglebius.Nd standard NTP query program 12290001Sglebius.Sh SYNOPSIS 13290001Sglebius.Nm 14290001Sglebius.\" Mixture of short (flag) options and long options 15290001Sglebius.Op Fl flags 16290001Sglebius.Op Fl flag Op Ar value 17290001Sglebius.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc 18290001Sglebius[ host ...] 19290001Sglebius.Pp 20290001Sglebius.Sh DESCRIPTION 21290001SglebiusThe 22290001Sglebius.Nm 23290001Sglebiusutility program is used to query NTP servers which 24290001Sglebiusimplement the standard NTP mode 6 control message formats defined 25290001Sglebiusin Appendix B of the NTPv3 specification RFC1305, requesting 26290001Sglebiusinformation about current state and/or changes in that state. 27290001SglebiusThe same formats are used in NTPv4, although some of the 28290001Sglebiusvariables have changed and new ones added. The description on this 29290001Sglebiuspage is for the NTPv4 variables. 30290001SglebiusThe program may be run either in interactive mode or controlled using 31290001Sglebiuscommand line arguments. 32290001SglebiusRequests to read and write arbitrary 33290001Sglebiusvariables can be assembled, with raw and pretty\-printed output 34290001Sglebiusoptions being available. 35290001SglebiusThe 36290001Sglebius.Nm 37290001Sglebiusutility can also obtain and print a 38290001Sglebiuslist of peers in a common format by sending multiple queries to the 39290001Sglebiusserver. 40290001SglebiusIf one or more request options is included on the command line 41290001Sglebiuswhen 42290001Sglebius.Nm 43290001Sglebiusis executed, each of the requests will be sent 44290001Sglebiusto the NTP servers running on each of the hosts given as command 45290001Sglebiusline arguments, or on localhost by default. 46290001SglebiusIf no request options 47290001Sglebiusare given, 48290001Sglebius.Nm 49290001Sglebiuswill attempt to read commands from the 50290001Sglebiusstandard input and execute these on the NTP server running on the 51290001Sglebiusfirst host given on the command line, again defaulting to localhost 52290001Sglebiuswhen no other host is specified. 53290001SglebiusThe 54290001Sglebius.Nm 55290001Sglebiusutility will prompt for 56290001Sglebiuscommands if the standard input is a terminal device. 57290001Sglebius.Nm 58290001Sglebiususes NTP mode 6 packets to communicate with the 59290001SglebiusNTP server, and hence can be used to query any compatible server on 60290001Sglebiusthe network which permits it. 61290001SglebiusNote that since NTP is a UDP protocol 62290001Sglebiusthis communication will be somewhat unreliable, especially over 63290001Sglebiuslarge distances in terms of network topology. 64290001SglebiusThe 65290001Sglebius.Nm 66290001Sglebiusutility makes 67290001Sglebiusone attempt to retransmit requests, and will time requests out if 68290001Sglebiusthe remote host is not heard from within a suitable timeout 69290001Sglebiustime. 70290001SglebiusSpecifying a 71290001Sglebiuscommand line option other than 72290001Sglebius.Fl i 73290001Sglebiusor 74290001Sglebius.Fl n 75290001Sglebiuswill 76290001Sglebiuscause the specified query (queries) to be sent to the indicated 77290001Sglebiushost(s) immediately. 78290001SglebiusOtherwise, 79290001Sglebius.Nm 80290001Sglebiuswill attempt to read 81290001Sglebiusinteractive format commands from the standard input. 82290001Sglebius.Ss "Internal Commands" 83290001SglebiusInteractive format commands consist of a keyword followed by zero 84290001Sglebiusto four arguments. 85290001SglebiusOnly enough characters of the full keyword to 86290001Sglebiusuniquely identify the command need be typed. 87290001SglebiusA 88290001Sglebiusnumber of interactive format commands are executed entirely within 89290001Sglebiusthe 90290001Sglebius.Nm 91290001Sglebiusutility itself and do not result in NTP mode 6 92290001Sglebiusrequests being sent to a server. 93290001SglebiusThese are described following. 94290001Sglebius.Bl -tag -width "? [command_keyword]" -compact -offset indent 95290001Sglebius.It Ic ? Op Ar command_keyword 96290001Sglebius.It Ic help Op Ar command_keyword 97290001SglebiusA 98290001Sglebius.Ql \&? 99290001Sglebiusby itself will print a list of all the command 100290001Sglebiuskeywords known to this incarnation of 101290001Sglebius.Nm . 102290001SglebiusA 103290001Sglebius.Ql \&? 104290001Sglebiusfollowed by a command keyword will print function and usage 105290001Sglebiusinformation about the command. 106290001SglebiusThis command is probably a better 107290001Sglebiussource of information about 108290001Sglebius.Nm 109290001Sglebiusthan this manual 110290001Sglebiuspage. 111290001Sglebius.It Ic addvars Ar variable_name Ns Xo Op Ic =value 112290001Sglebius.Ic ... 113290001Sglebius.Xc 114290001Sglebius.It Ic rmvars Ar variable_name Ic ... 115290001Sglebius.It Ic clearvars 116290001Sglebius.It Ic showvars 117290001SglebiusThe data carried by NTP mode 6 messages consists of a list of 118290001Sglebiusitems of the form 119290001Sglebius.Ql variable_name=value , 120290001Sglebiuswhere the 121290001Sglebius.Ql =value 122290001Sglebiusis ignored, and can be omitted, 123290001Sglebiusin requests to the server to read variables. 124290001SglebiusThe 125290001Sglebius.Nm 126290001Sglebiusutility maintains an internal list in which data to be included in control 127290001Sglebiusmessages can be assembled, and sent using the 128290001Sglebius.Ic readlist 129290001Sglebiusand 130290001Sglebius.Ic writelist 131290001Sglebiuscommands described below. 132290001SglebiusThe 133290001Sglebius.Ic addvars 134290001Sglebiuscommand allows variables and their optional values to be added to 135290001Sglebiusthe list. 136290001SglebiusIf more than one variable is to be added, the list should 137290001Sglebiusbe comma\-separated and not contain white space. 138290001SglebiusThe 139290001Sglebius.Ic rmvars 140290001Sglebiuscommand can be used to remove individual variables from the list, 141290001Sglebiuswhile the 142290001Sglebius.Ic clearlist 143290001Sglebiuscommand removes all variables from the 144290001Sglebiuslist. 145290001SglebiusThe 146290001Sglebius.Ic showvars 147290001Sglebiuscommand displays the current list of optional variables. 148290001Sglebius.It Ic authenticate Op yes | no 149290001SglebiusNormally 150290001Sglebius.Nm 151290001Sglebiusdoes not authenticate requests unless 152290001Sglebiusthey are write requests. 153290001SglebiusThe command 154290001Sglebius.Ql authenticate yes 155290001Sglebiuscauses 156290001Sglebius.Nm 157290001Sglebiusto send authentication with all requests it 158290001Sglebiusmakes. 159290001SglebiusAuthenticated requests causes some servers to handle 160290001Sglebiusrequests slightly differently, and can occasionally melt the CPU in 161290001Sglebiusfuzzballs if you turn authentication on before doing a 162290001Sglebius.Ic peer 163290001Sglebiusdisplay. 164290001SglebiusThe command 165290001Sglebius.Ql authenticate 166290001Sglebiuscauses 167290001Sglebius.Nm 168290001Sglebiusto display whether or not 169290001Sglebius.Nm 170290001Sglebiusis currently autheinticating requests. 171290001Sglebius.It Ic cooked 172290001SglebiusCauses output from query commands to be "cooked", so that 173290001Sglebiusvariables which are recognized by 174290001Sglebius.Nm 175290001Sglebiuswill have their 176290001Sglebiusvalues reformatted for human consumption. 177290001SglebiusVariables which 178290001Sglebius.Nm 179290001Sglebiusthinks should have a decodable value but didn't are 180290001Sglebiusmarked with a trailing 181290001Sglebius.Ql \&? . 182290001Sglebius.It Xo 183290001Sglebius.Ic debug 184290001Sglebius.Oo 185290001Sglebius.Cm more | 186290001Sglebius.Cm less | 187290001Sglebius.Cm off 188290001Sglebius.Oc 189290001Sglebius.Xc 190290001SglebiusWith no argument, displays the current debug level. 191290001SglebiusOtherwise, the debug level is changed to the indicated level. 192290001Sglebius.It Ic delay Ar milliseconds 193290001SglebiusSpecify a time interval to be added to timestamps included in 194290001Sglebiusrequests which require authentication. 195290001SglebiusThis is used to enable 196290001Sglebius(unreliable) server reconfiguration over long delay network paths 197290001Sglebiusor between machines whose clocks are unsynchronized. 198290001SglebiusActually the 199290001Sglebiusserver does not now require timestamps in authenticated requests, 200290001Sglebiusso this command may be obsolete. 201290001Sglebius.It Ic exit 202290001SglebiusExit 203290001Sglebius.Nm . 204290001Sglebius.It Ic host Ar hostname 205290001SglebiusSet the host to which future queries will be sent. 206290001Sglebius.Ar hostname 207290001Sglebiusmay be either a host name or a numeric address. 208290001Sglebius.It Ic hostnames Op Cm yes | Cm no 209290001SglebiusIf 210290001Sglebius.Cm yes 211290001Sglebiusis specified, host names are printed in 212290001Sglebiusinformation displays. 213290001SglebiusIf 214290001Sglebius.Cm no 215290001Sglebiusis specified, numeric 216290001Sglebiusaddresses are printed instead. 217290001SglebiusThe default is 218290001Sglebius.Cm yes , 219290001Sglebiusunless 220290001Sglebiusmodified using the command line 221290001Sglebius.Fl n 222290001Sglebiusswitch. 223290001Sglebius.It Ic keyid Ar keyid 224290001SglebiusThis command allows the specification of a key number to be 225290001Sglebiusused to authenticate configuration requests. 226290001SglebiusThis must correspond 227290001Sglebiusto the 228290001Sglebius.Cm controlkey 229290001Sglebiuskey number the server has been configured to use for this 230290001Sglebiuspurpose. 231290001Sglebius.It Ic keytype Xo Oo 232290001Sglebius.Cm md5 | 233290001Sglebius.Cm OpenSSLDigestType 234290001Sglebius.Oc 235290001Sglebius.Xc 236290001SglebiusSpecify the type of key to use for authenticating requests. 237290001Sglebius.Cm md5 238290001Sglebiusis alway supported. 239290001SglebiusIf 240290001Sglebius.Nm 241290001Sglebiuswas built with OpenSSL support, 242290001Sglebiusany digest type supported by OpenSSL can also be provided. 243290001SglebiusIf no argument is given, the current 244290001Sglebius.Ic keytype 245290001Sglebiusis displayed. 246290001Sglebius.It Ic ntpversion Xo Oo 247290001Sglebius.Cm 1 | 248290001Sglebius.Cm 2 | 249290001Sglebius.Cm 3 | 250290001Sglebius.Cm 4 251290001Sglebius.Oc 252290001Sglebius.Xc 253290001SglebiusSets the NTP version number which 254290001Sglebius.Nm 255290001Sglebiusclaims in 256290001Sglebiuspackets. 257290001SglebiusDefaults to 3, and note that mode 6 control messages (and 258290001Sglebiusmodes, for that matter) didn't exist in NTP version 1. 259290001SglebiusThere appear 260290001Sglebiusto be no servers left which demand version 1. 261290001SglebiusWith no argument, displays the current NTP version that will be used 262290001Sglebiuswhen communicating with servers. 263290001Sglebius.It Ic passwd 264290001SglebiusThis command prompts you to type in a password (which will not 265290001Sglebiusbe echoed) which will be used to authenticate configuration 266290001Sglebiusrequests. 267290001SglebiusThe password must correspond to the key configured for 268290001Sglebiususe by the NTP server for this purpose if such requests are to be 269290001Sglebiussuccessful. 270290001Sglebius.\" Not yet implemented. 271290001Sglebius.\" .It Ic poll 272290001Sglebius.\" .Op Ar n 273290001Sglebius.\" .Op Ic verbose 274290001Sglebius.\" Poll an NTP server in client mode 275290001Sglebius.\" .Ar n 276290001Sglebius.\" times. 277290001Sglebius.It Ic quit 278290001SglebiusExit 279290001Sglebius.Nm . 280290001Sglebius.It Ic raw 281290001SglebiusCauses all output from query commands is printed as received 282290001Sglebiusfrom the remote server. 283290001SglebiusThe only formating/interpretation done on 284290001Sglebiusthe data is to transform nonascii data into a printable (but barely 285290001Sglebiusunderstandable) form. 286290001Sglebius.It Ic timeout Ar milliseconds 287290001SglebiusSpecify a timeout period for responses to server queries. 288290001SglebiusThe 289290001Sglebiusdefault is about 5000 milliseconds. 290290001SglebiusNote that since 291290001Sglebius.Nm 292290001Sglebiusretries each query once after a timeout, the total waiting time for 293290001Sglebiusa timeout will be twice the timeout value set. 294290001Sglebius.It Ic version 295290001SglebiusPrint the version of the 296290001Sglebius.Nm 297290001Sglebiusprogram. 298290001Sglebius.El 299290001Sglebius.Ss "Control Message Commands" 300290001SglebiusAssociation IDs are used to identify system, peer and clock variables. 301290001SglebiusSystem variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace. 302290001SglebiusMost control commands send a single mode\-6 message to the server and expect a single response message. 303290001SglebiusThe exceptions are the 304290001Sglebius.Li peers 305290001Sglebiuscommand, which sends a series of messages, 306290001Sglebiusand the 307290001Sglebius.Li mreadlist 308290001Sglebiusand 309290001Sglebius.Li mreadvar 310290001Sglebiuscommands, which iterate over a range of associations. 311290001Sglebius.Bl -tag -width "something" -compact -offset indent 312290001Sglebius.It Cm associations 313290001SglebiusDisplay a list of mobilized associations in the form: 314290001Sglebius.Dl ind assid status conf reach auth condition last_event cnt 315290001Sglebius.Bl -column -offset indent ".Sy Variable" ".Sy Description" 316290001Sglebius.It Sy String Ta Sy Description 317290001Sglebius.It Li ind Ta index on this list 318290001Sglebius.It Li assid Ta association ID 319290001Sglebius.It Li status Ta peer status word 320290001Sglebius.It Li conf Ta Li yes : persistent, Li no : ephemeral 321290001Sglebius.It Li reach Ta Li yes : reachable, Li no : unreachable 322290001Sglebius.It Li auth Ta Li ok , Li yes , Li bad and Li none 323290001Sglebius.It Li condition Ta selection status (see the Li select field of the peer status word) 324290001Sglebius.It Li last_event Ta event report (see the Li event field of the peer status word) 325290001Sglebius.It Li cnt Ta event count (see the Li count field of the peer status word) 326290001Sglebius.El 327290001Sglebius.It Cm authinfo 328290001SglebiusDisplay the authentication statistics. 329290001Sglebius.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ... 330290001Sglebius.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ... 331290001SglebiusDisplay a list of clock variables for those associations supporting a reference clock. 332290001Sglebius.It Cm :config Op ... 333290001SglebiusSend 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. 334290001Sglebius.It Cm config\-from\-file Ar filename 335290001SglebiusSend the each line of 336290001Sglebius.Ar filename 337290001Sglebiusto 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. 338290001Sglebius.It Ic ifstats 339290001SglebiusDisplay statistics for each local network address. Authentication is required. 340290001Sglebius.It Ic iostats 341290001SglebiusDisplay network and reference clock I/O statistics. 342290001Sglebius.It Ic kerninfo 343290001SglebiusDisplay 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. 344290001Sglebius.It Ic lassociations 345290001SglebiusPerform the same function as the associations command, except display mobilized and unmobilized associations. 346290001Sglebius.It Ic lopeers Xo 347290001Sglebius.Oo Ic \-4 | 348290001Sglebius.Ic \-6 349290001Sglebius.Oc 350290001Sglebius.Xc 351290001SglebiusObtain and print a list of all peers and clients showing 352290001Sglebius.Ar dstadr 353290001Sglebius(associated with any given IP version). 354290001Sglebius.It Ic lpeers Xo 355290001Sglebius.Oo Ic \-4 | 356290001Sglebius.Ic \-6 357290001Sglebius.Oc 358290001Sglebius.Xc 359290001SglebiusPrint a peer spreadsheet for the appropriate IP version(s). 360290001Sglebius.Ar dstadr 361290001Sglebius(associated with any given IP version). 362290001Sglebius.It Ic monstats 363290001SglebiusDisplay monitor facility statistics. 364290001Sglebius.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 365290001SglebiusObtain and print traffic counts collected and maintained by the monitor facility. 366290001SglebiusWith the exception of 367290001Sglebius.Cm sort Ns = Ns Ar sortorder , 368290001Sglebiusthe options filter the list returned by 369290001Sglebius.Cm ntpd. 370290001SglebiusThe 371290001Sglebius.Cm limited 372290001Sglebiusand 373290001Sglebius.Cm kod 374290001Sglebiusoptions return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. 375290001SglebiusThe 376290001Sglebius.Cm mincount Ns = Ns Ar count 377290001Sglebiusoption filters entries representing less than 378290001Sglebius.Ar count 379290001Sglebiuspackets. 380290001SglebiusThe 381290001Sglebius.Cm laddr Ns = Ns Ar localaddr 382290001Sglebiusoption filters entries for packets received on any local address other than 383290001Sglebius.Ar localaddr . 384290001Sglebius.Cm resany Ns = Ns Ar hexmask 385290001Sglebiusand 386290001Sglebius.Cm resall Ns = Ns Ar hexmask 387290001Sglebiusfilter entries containing none or less than all, respectively, of the bits in 388290001Sglebius.Ar hexmask , 389290001Sglebiuswhich must begin with 390290001Sglebius.Cm 0x . 391290001SglebiusThe 392290001Sglebius.Ar sortorder 393290001Sglebiusdefaults to 394290001Sglebius.Cm lstint 395290001Sglebiusand may be any of 396290001Sglebius.Cm addr , 397290001Sglebius.Cm count , 398290001Sglebius.Cm avgint , 399290001Sglebius.Cm lstint , 400290001Sglebiusor any of those preceded by a minus sign (hyphen) to reverse the sort order. 401290001SglebiusThe output columns are: 402290001Sglebius.Bl -tag -width "something" -compact -offset indent 403290001Sglebius.It Column 404290001SglebiusDescription 405290001Sglebius.It Ic lstint 406290001SglebiusInterval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by 407290001Sglebius.Nm . 408290001Sglebius.It Ic avgint 409290001SglebiusAverage interval in s between packets from this address. 410290001Sglebius.It Ic rstr 411290001SglebiusRestriction flags associated with this address. 412290001SglebiusMost are copied unchanged from the matching 413290001Sglebius.Ic restrict 414290001Sglebiuscommand, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response. 415290001Sglebius.It Ic r 416290001SglebiusRate control indicator, either 417290001Sglebiusa period, 418290001Sglebius.Ic L 419290001Sglebiusor 420290001Sglebius.Ic K 421290001Sglebiusfor no rate control response, 422290001Sglebiusrate limiting by discarding, or rate limiting with a KoD response, respectively. 423290001Sglebius.It Ic m 424290001SglebiusPacket mode. 425290001Sglebius.It Ic v 426290001SglebiusPacket version number. 427290001Sglebius.It Ic count 428290001SglebiusPackets received from this address. 429290001Sglebius.It Ic rport 430290001SglebiusSource port of last packet from this address. 431290001Sglebius.It Ic remote address 432290001SglebiusDNS name, numeric address, or address followed by 433290001Sglebiusclaimed DNS name which could not be verified in parentheses. 434290001Sglebius.El 435290001Sglebius.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ... 436290001Sglebius.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ... 437290001SglebiusPerform the same function as the 438290001Sglebius.Ic readvar 439290001Sglebiuscommand, except for a range of association IDs. 440290001SglebiusThis range is determined from the association list cached by the most recent 441290001Sglebius.Ic associations 442290001Sglebiuscommand. 443290001Sglebius.It Ic opeers Xo 444290001Sglebius.Oo Ic \-4 | 445290001Sglebius.Ic \-6 446290001Sglebius.Oc 447290001Sglebius.Xc 448290001SglebiusObtain and print the old\-style list of all peers and clients showing 449290001Sglebius.Ar dstadr 450290001Sglebius(associated with any given IP version), 451290001Sglebiusrather than the 452290001Sglebius.Ar refid . 453290001Sglebius.It Ic passociations 454290001SglebiusPerform the same function as the 455290001Sglebius.Ic associations 456290001Sglebiuscommand, 457290001Sglebiusexcept that it uses previously stored data rather than making a new query. 458290001Sglebius.It Ic peers 459290001SglebiusDisplay a list of peers in the form: 460290001Sglebius.Dl [tally]remote refid st t when pool reach delay offset jitter 461290001Sglebius.Bl -tag -width "something" -compact -offset indent 462290001Sglebius.It Variable 463290001SglebiusDescription 464290001Sglebius.It Ic [tally] 465290001Sglebiussingle\-character code indicating current value of the 466290001Sglebius.Ic select 467290001Sglebiusfield of the 468290001Sglebius.Lk decode.html#peer "peer status word" 469290001Sglebius.It Ic remote 470290001Sglebiushost name (or IP number) of peer. 471290001SglebiusThe value displayed will be truncated to 15 characters unless the 472290001Sglebius.Fl w 473290001Sglebiusflag is given, in which case the full value will be displayed 474290001Sglebiuson the first line, 475290001Sglebiusand the remaining data is displayed on the next line. 476290001Sglebius.It Ic refid 477290001Sglebiusassociation ID or 478290001Sglebius.Lk decode.html#kiss "'kiss code" 479290001Sglebius.It Ic st 480290001Sglebiusstratum 481290001Sglebius.It Ic t 482290001Sglebius.Ic u : 483290001Sglebiusunicast or manycast client, 484290001Sglebius.Ic b : 485290001Sglebiusbroadcast or multicast client, 486290001Sglebius.Ic l : 487290001Sglebiuslocal (reference clock), 488290001Sglebius.Ic s : 489290001Sglebiussymmetric (peer), 490290001Sglebius.Ic A : 491290001Sglebiusmanycast server, 492290001Sglebius.Ic B : 493290001Sglebiusbroadcast server, 494290001Sglebius.Ic M : 495290001Sglebiusmulticast server 496290001Sglebius.It Ic when 497290001Sglebiussec/min/hr since last received packet 498290001Sglebius.It Ic poll 499290001Sglebiuspoll interval (log2 s) 500290001Sglebius.It Ic reach 501290001Sglebiusreach shift register (octal) 502290001Sglebius.It Ic delay 503290001Sglebiusroundtrip delay 504290001Sglebius.It Ic offset 505290001Sglebiusoffset of server relative to this host 506290001Sglebius.It Ic jitter 507290001Sglebiusjitter 508290001Sglebius.El 509290001Sglebius.It Ic apeers 510290001SglebiusDisplay a list of peers in the form: 511290001Sglebius.Dl [tally]remote refid assid st t when pool reach delay offset jitter 512290001Sglebiuswhere the output is just like the 513290001Sglebius.Ic peers 514290001Sglebiuscommand except that the 515290001Sglebius.Ic refid 516290001Sglebiusis displayed in hex format and the association number is also displayed. 517290001Sglebius.It Ic pstats Ar assocID 518290001SglebiusShow the statistics for the peer with the given 519290001Sglebius.Ar assocID . 520290001Sglebius.It Ic readlist Ar assocID 521290001Sglebius.It Ic rl Ar assocID 522290001SglebiusRead the system or peer variables included in the variable list. 523290001Sglebius.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc 524290001Sglebius.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc 525290001SglebiusDisplay the specified variables. 526290001SglebiusIf 527290001Sglebius.Ar assocID 528290001Sglebiusis zero, the variables are from the 529290001Sglebius.Sx System Variables 530290001Sglebiusname space, otherwise they are from the 531290001Sglebius.Sx Peer Variables 532290001Sglebiusname space. 533290001SglebiusThe 534290001Sglebius.Ar assocID 535290001Sglebiusis required, as the same name can occur in both spaces. 536290001SglebiusIf no 537290001Sglebius.Ar name 538290001Sglebiusis included, all operative variables in the name space are displayed. 539290001SglebiusIn this case only, if the 540290001Sglebius.Ar assocID 541290001Sglebiusis omitted, it is assumed zero. 542290001SglebiusMultiple names are specified with comma separators and without whitespace. 543290001SglebiusNote that time values are represented in milliseconds 544290001Sglebiusand frequency values in parts\-per\-million (PPM). 545290001SglebiusSome NTP timestamps are represented in the format 546290001SglebiusYYYYMMDDTTTT , 547290001Sglebiuswhere YYYY is the year, 548290001SglebiusMM the month of year, 549290001SglebiusDD the day of month and 550290001SglebiusTTTT the time of day. 551290001Sglebius.It Ic reslist 552290001SglebiusShow the access control (restrict) list for 553290001Sglebius.Nm . 554290001Sglebius.It Ic saveconfig Ar filename 555290001SglebiusWrite the current configuration, 556290001Sglebiusincluding any runtime modifications given with 557290001Sglebius.Ic :config 558290001Sglebiusor 559290001Sglebius.Ic config\-from\-file , 560290001Sglebiusto the ntpd host's file 561290001Sglebius.Ar filename . 562290001SglebiusThis command will be rejected by the server unless 563290001Sglebius.Lk miscopt.html#saveconfigdir "saveconfigdir" 564290001Sglebiusappears in the 565290001Sglebius.Ic ntpd 566290001Sglebiusconfiguration file. 567290001Sglebius.Ar filename 568290001Sglebiuscan use 569290001Sglebius.Xr strftime 570290001Sglebiusformat specifies to substitute the current date and time, for example, 571290001Sglebius.Ic q]saveconfig ntp\-%Y%m%d\-%H%M%S.confq] . 572290001SglebiusThe filename used is stored in system variable 573290001Sglebius.Ic savedconfig . 574290001SglebiusAuthentication is required. 575290001Sglebius.It Ic timerstats 576290001SglebiusDisplay interval timer counters. 577290001Sglebius.It Ic writelist Ar assocID 578290001SglebiusWrite the system or peer variables included in the variable list. 579290001Sglebius.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ... 580290001SglebiusWrite the specified variables. 581290001SglebiusIf the 582290001Sglebius.Ar assocID 583290001Sglebiusis zero, the variables are from the 584290001Sglebius.Sx System Variables 585290001Sglebiusname space, otherwise they are from the 586290001Sglebius.Sx Peer Variables 587290001Sglebiusname space. 588290001SglebiusThe 589290001Sglebius.Ar assocID 590290001Sglebiusis required, as the same name can occur in both spaces. 591290001Sglebius.It Ic sysinfo 592290001SglebiusDisplay operational summary. 593290001Sglebius.It Ic sysstats 594290001SglebiusPrint statistics counters maintained in the protocol module. 595290001Sglebius.El 596290001Sglebius.Ss Status Words and Kiss Codes 597290001SglebiusThe current state of the operating program is shown 598290001Sglebiusin a set of status words 599290001Sglebiusmaintained by the system. 600290001SglebiusStatus information is also available on a per\-association basis. 601290001SglebiusThese words are displayed in the 602290001Sglebius.Ic rv 603290001Sglebiusand 604290001Sglebius.Ic as 605290001Sglebiuscommands both in hexadecimal and in decoded short tip strings. 606290001SglebiusThe codes, tips and short explanations are documented on the 607290001Sglebius.Lk decode.html "Event Messages and Status Words" 608290001Sglebiuspage. 609290001SglebiusThe page also includes a list of system and peer messages, 610290001Sglebiusthe code for the latest of which is included in the status word. 611290001Sglebius.Pp 612290001SglebiusInformation resulting from protocol machine state transitions 613290001Sglebiusis displayed using an informal set of ASCII strings called 614290001Sglebius.Lk decode.html#kiss "kiss codes" . 615290001SglebiusThe original purpose was for kiss\-o'\-death (KoD) packets 616290001Sglebiussent by the server to advise the client of an unusual condition. 617290001SglebiusThey are now displayed, when appropriate, 618290001Sglebiusin the reference identifier field in various billboards. 619290001Sglebius.Ss System Variables 620290001SglebiusThe following system variables appear in the 621290001Sglebius.Ic rv 622290001Sglebiusbillboard. 623290001SglebiusNot all variables are displayed in some configurations. 624290001Sglebius.Bl -tag -width "something" -compact -offset indent 625290001Sglebius.It Variable 626290001SglebiusDescription 627290001Sglebius.It Ic status 628290001Sglebius.Lk decode.html#sys "system status word" 629290001Sglebius.It Ic version 630290001SglebiusNTP software version and build time 631290001Sglebius.It Ic processor 632290001Sglebiushardware platform and version 633290001Sglebius.It Ic system 634290001Sglebiusoperating system and version 635290001Sglebius.It Ic leap 636290001Sglebiusleap warning indicator (0\-3) 637290001Sglebius.It Ic stratum 638290001Sglebiusstratum (1\-15) 639290001Sglebius.It Ic precision 640290001Sglebiusprecision (log2 s) 641290001Sglebius.It Ic rootdelay 642290001Sglebiustotal roundtrip delay to the primary reference clock 643290001Sglebius.It Ic rootdisp 644290001Sglebiustotal dispersion to the primary reference clock 645290001Sglebius.It Ic peer 646290001Sglebiussystem peer association ID 647290001Sglebius.It Ic tc 648290001Sglebiustime constant and poll exponent (log2 s) (3\-17) 649290001Sglebius.It Ic mintc 650290001Sglebiusminimum time constant (log2 s) (3\-10) 651290001Sglebius.It Ic clock 652290001Sglebiusdate and time of day 653290001Sglebius.It Ic refid 654290001Sglebiusreference ID or 655290001Sglebius.Lk decode.html#kiss "kiss code" 656290001Sglebius.It Ic reftime 657290001Sglebiusreference time 658290001Sglebius.It Ic offset 659290001Sglebiuscombined offset of server relative to this host 660290001Sglebius.It Ic sys_jitter 661290001Sglebiuscombined system jitter 662290001Sglebius.It Ic frequency 663290001Sglebiusfrequency offset (PPM) relative to hardware clock 664290001Sglebius.It Ic clk_wander 665290001Sglebiusclock frequency wander (PPM) 666290001Sglebius.It Ic clk_jitter 667290001Sglebiusclock jitter 668290001Sglebius.It Ic tai 669290001SglebiusTAI\-UTC offset (s) 670290001Sglebius.It Ic leapsec 671290001SglebiusNTP seconds when the next leap second is/was inserted 672290001Sglebius.It Ic expire 673290001SglebiusNTP seconds when the NIST leapseconds file expires 674290001Sglebius.El 675290001SglebiusThe jitter and wander statistics are exponentially\-weighted RMS averages. 676290001SglebiusThe system jitter is defined in the NTPv4 specification; 677290001Sglebiusthe clock jitter statistic is computed by the clock discipline module. 678290001Sglebius.Pp 679290001SglebiusWhen the NTPv4 daemon is compiled with the OpenSSL software library, 680290001Sglebiusadditional system variables are displayed, 681290001Sglebiusincluding some or all of the following, 682290001Sglebiusdepending on the particular Autokey dance: 683290001Sglebius.Bl -tag -width "something" -compact -offset indent 684290001Sglebius.It Variable 685290001SglebiusDescription 686290001Sglebius.It Ic host 687290001SglebiusAutokey host name for this host 688290001Sglebius.It Ic ident 689290001SglebiusAutokey group name for this host 690290001Sglebius.It Ic flags 691290001Sglebiushost flags (see Autokey specification) 692290001Sglebius.It Ic digest 693290001SglebiusOpenSSL message digest algorithm 694290001Sglebius.It Ic signature 695290001SglebiusOpenSSL digest/signature scheme 696290001Sglebius.It Ic update 697290001SglebiusNTP seconds at last signature update 698290001Sglebius.It Ic cert 699290001Sglebiuscertificate subject, issuer and certificate flags 700290001Sglebius.It Ic until 701290001SglebiusNTP seconds when the certificate expires 702290001Sglebius.El 703290001Sglebius.Ss Peer Variables 704290001SglebiusThe following peer variables appear in the 705290001Sglebius.Ic rv 706290001Sglebiusbillboard for each association. 707290001SglebiusNot all variables are displayed in some configurations. 708290001Sglebius.Bl -tag -width "something" -compact -offset indent 709290001Sglebius.It Variable 710290001SglebiusDescription 711290001Sglebius.It Ic associd 712290001Sglebiusassociation ID 713290001Sglebius.It Ic status 714290001Sglebius.Lk decode.html#peer "peer status word" 715290001Sglebius.It Ic srcadr 716290001Sglebiussource (remote) IP address 717290001Sglebius.It Ic srcport 718290001Sglebiussource (remote) port 719290001Sglebius.It Ic dstadr 720290001Sglebiusdestination (local) IP address 721290001Sglebius.It Ic dstport 722290001Sglebiusdestination (local) port 723290001Sglebius.It Ic leap 724290001Sglebiusleap indicator (0\-3) 725290001Sglebius.It Ic stratum 726290001Sglebiusstratum (0\-15) 727290001Sglebius.It Ic precision 728290001Sglebiusprecision (log2 s) 729290001Sglebius.It Ic rootdelay 730290001Sglebiustotal roundtrip delay to the primary reference clock 731290001Sglebius.It Ic rootdisp 732290001Sglebiustotal root dispersion to the primary reference clock 733290001Sglebius.It Ic refid 734290001Sglebiusreference ID or 735290001Sglebius.Lk decode.html#kiss "kiss code" 736290001Sglebius.It Ic reftime 737290001Sglebiusreference time 738290001Sglebius.It Ic reach 739290001Sglebiusreach register (octal) 740290001Sglebius.It Ic unreach 741290001Sglebiusunreach counter 742290001Sglebius.It Ic hmode 743290001Sglebiushost mode (1\-6) 744290001Sglebius.It Ic pmode 745290001Sglebiuspeer mode (1\-5) 746290001Sglebius.It Ic hpoll 747290001Sglebiushost poll exponent (log2 s) (3\-17) 748290001Sglebius.It Ic ppoll 749290001Sglebiuspeer poll exponent (log2 s) (3\-17) 750290001Sglebius.It Ic headway 751290001Sglebiusheadway (see 752290001Sglebius.Lk rate.html "Rate Management and the Kiss\-o'\-Death Packet" ) 753290001Sglebius.It Ic flash 754290001Sglebius.Lk decode.html#flash "flash status word" 755290001Sglebius.It Ic offset 756290001Sglebiusfilter offset 757290001Sglebius.It Ic delay 758290001Sglebiusfilter delay 759290001Sglebius.It Ic dispersion 760290001Sglebiusfilter dispersion 761290001Sglebius.It Ic jitter 762290001Sglebiusfilter jitter 763290001Sglebius.It Ic ident 764290001SglebiusAutokey group name for this association 765290001Sglebius.It Ic bias 766290001Sglebiusunicast/broadcast bias 767290001Sglebius.It Ic xleave 768290001Sglebiusinterleave delay (see 769290001Sglebius.Lk xleave.html "NTP Interleaved Modes" ) 770290001Sglebius.El 771290001SglebiusThe 772290001Sglebius.Ic bias 773290001Sglebiusvariable is calculated when the first broadcast packet is received 774290001Sglebiusafter the calibration volley. 775290001SglebiusIt represents the offset of the broadcast subgraph relative to the unicast subgraph. 776290001SglebiusThe 777290001Sglebius.Ic xleave 778290001Sglebiusvariable appears only for the interleaved symmetric and interleaved modes. 779290001SglebiusIt represents the internal queuing, buffering and transmission delays 780290001Sglebiusfor the preceding packet. 781290001Sglebius.Pp 782290001SglebiusWhen the NTPv4 daemon is compiled with the OpenSSL software library, 783290001Sglebiusadditional peer variables are displayed, including the following: 784290001Sglebius.Bl -tag -width "something" -compact -offset indent 785290001Sglebius.It Variable 786290001SglebiusDescription 787290001Sglebius.It Ic flags 788290001Sglebiuspeer flags (see Autokey specification) 789290001Sglebius.It Ic host 790290001SglebiusAutokey server name 791290001Sglebius.It Ic flags 792290001Sglebiuspeer flags (see Autokey specification) 793290001Sglebius.It Ic signature 794290001SglebiusOpenSSL digest/signature scheme 795290001Sglebius.It Ic initsequence 796290001Sglebiusinitial key ID 797290001Sglebius.It Ic initkey 798290001Sglebiusinitial key index 799290001Sglebius.It Ic timestamp 800290001SglebiusAutokey signature timestamp 801290001Sglebius.El 802290001Sglebius.Ss Clock Variables 803290001SglebiusThe following clock variables appear in the 804290001Sglebius.Ic cv 805290001Sglebiusbillboard for each association with a reference clock. 806290001SglebiusNot all variables are displayed in some configurations. 807290001Sglebius.Bl -tag -width "something" -compact -offset indent 808290001Sglebius.It Variable 809290001SglebiusDescription 810290001Sglebius.It Ic associd 811290001Sglebiusassociation ID 812290001Sglebius.It Ic status 813290001Sglebius.Lk decode.html#clock "clock status word" 814290001Sglebius.It Ic device 815290001Sglebiusdevice description 816290001Sglebius.It Ic timecode 817290001SglebiusASCII time code string (specific to device) 818290001Sglebius.It Ic poll 819290001Sglebiuspoll messages sent 820290001Sglebius.It Ic noreply 821290001Sglebiusno reply 822290001Sglebius.It Ic badformat 823290001Sglebiusbad format 824290001Sglebius.It Ic baddata 825290001Sglebiusbad date or time 826290001Sglebius.It Ic fudgetime1 827290001Sglebiusfudge time 1 828290001Sglebius.It Ic fudgetime2 829290001Sglebiusfudge time 2 830290001Sglebius.It Ic stratum 831290001Sglebiusdriver stratum 832290001Sglebius.It Ic refid 833290001Sglebiusdriver reference ID 834290001Sglebius.It Ic flags 835290001Sglebiusdriver flags 836290001Sglebius.El 837290001Sglebius.Sh "OPTIONS" 838290001Sglebius.Bl -tag 839290001Sglebius.It Fl 4 , Fl \-ipv4 840290001SglebiusForce IPv4 DNS name resolution. 841290001SglebiusThis option must not appear in combination with any of the following options: 842290001Sglebiusipv6. 843290001Sglebius.sp 844290001SglebiusForce DNS resolution of following host names on the command line 845290001Sglebiusto the IPv4 namespace. 846290001Sglebius.It Fl 6 , Fl \-ipv6 847290001SglebiusForce IPv6 DNS name resolution. 848290001SglebiusThis option must not appear in combination with any of the following options: 849290001Sglebiusipv4. 850290001Sglebius.sp 851290001SglebiusForce DNS resolution of following host names on the command line 852290001Sglebiusto the IPv6 namespace. 853290001Sglebius.It Fl c Ar cmd , Fl \-command Ns = Ns Ar cmd 854290001Sglebiusrun a command and exit. 855290001SglebiusThis option may appear an unlimited number of times. 856290001Sglebius.sp 857290001SglebiusThe following argument is interpreted as an interactive format command 858290001Sglebiusand is added to the list of commands to be executed on the specified 859290001Sglebiushost(s). 860290001Sglebius.It Fl d , Fl \-debug\-level 861290001SglebiusIncrease debug verbosity level. 862290001SglebiusThis option may appear an unlimited number of times. 863290001Sglebius.sp 864290001Sglebius.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number 865290001SglebiusSet the debug verbosity level. 866290001SglebiusThis option may appear an unlimited number of times. 867290001SglebiusThis option takes an integer number as its argument. 868290001Sglebius.sp 869290001Sglebius.It Fl i , Fl \-interactive 870290001SglebiusForce ntpq to operate in interactive mode. 871290001SglebiusThis option must not appear in combination with any of the following options: 872290001Sglebiuscommand, peers. 873290001Sglebius.sp 874290001SglebiusForce \fBntpq\fP to operate in interactive mode. 875290001SglebiusPrompts will be written to the standard output and 876290001Sglebiuscommands read from the standard input. 877290001Sglebius.It Fl n , Fl \-numeric 878290001Sglebiusnumeric host addresses. 879290001Sglebius.sp 880290001SglebiusOutput all host addresses in dotted\-quad numeric format rather than 881290001Sglebiusconverting to the canonical host names. 882290001Sglebius.It Fl \-old\-rv 883290001SglebiusAlways output status line with readvar. 884290001Sglebius.sp 885290001SglebiusBy default, \fBntpq\fP now suppresses the \fBassocid=...\fP 886290001Sglebiusline that precedes the output of \fBreadvar\fP 887290001Sglebius(alias \fBrv\fP) when a single variable is requested, such as 888290001Sglebius\fBntpq \-c "rv 0 offset"\fP. 889290001SglebiusThis option causes \fBntpq\fP to include both lines of output 890290001Sglebiusfor a single\-variable \fBreadvar\fP. 891290001SglebiusUsing an environment variable to 892290001Sglebiuspreset this option in a script will enable both older and 893290001Sglebiusnewer \fBntpq\fP to behave identically in this regard. 894290001Sglebius.It Fl p , Fl \-peers 895290001SglebiusPrint a list of the peers. 896290001SglebiusThis option must not appear in combination with any of the following options: 897290001Sglebiusinteractive. 898290001Sglebius.sp 899290001SglebiusPrint a list of the peers known to the server as well as a summary 900290001Sglebiusof their state. This is equivalent to the 'peers' interactive command. 901298770Sdelphij.It Fl r Ar keyword , Fl \-refid Ns = Ns Ar keyword 902298770SdelphijSet default display type for S2+ refids. 903298770SdelphijThis option takes a keyword as its argument. The argument sets an enumeration value that can 904298770Sdelphijbe tested by comparing them against the option value macro. 905298770SdelphijThe available keywords are: 906298770Sdelphij.in +4 907298770Sdelphij.nf 908298770Sdelphij.na 909298770Sdelphijhash ipv4 910298770Sdelphij.fi 911298770Sdelphijor their numeric equivalent. 912298770Sdelphij.in -4 913298770Sdelphij.sp 914298770SdelphijThe default 915298770Sdelphij.Ar keyword 916298770Sdelphijfor this option is: 917298770Sdelphij.ti +4 918298770Sdelphij ipv4 919298770Sdelphij.sp 920298770SdelphijSet the default display format for S2+ refids. 921290001Sglebius.It Fl w , Fl \-wide 922290001SglebiusDisplay the full 'remote' value. 923290001Sglebius.sp 924290001SglebiusDisplay the full value of the 'remote' value. If this requires 925290001Sglebiusmore than 15 characters, display the full value, emit a newline, 926290001Sglebiusand continue the data display properly indented on the next line. 927290001Sglebius.It Fl \&? , Fl \-help 928290001SglebiusDisplay usage information and exit. 929290001Sglebius.It Fl \&! , Fl \-more\-help 930290001SglebiusPass the extended usage information through a pager. 931290001Sglebius.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc 932290001SglebiusSave the option state to \fIcfgfile\fP. The default is the \fIlast\fP 933290001Sglebiusconfiguration file listed in the \fBOPTION PRESETS\fP section, below. 934290001SglebiusThe command will exit after updating the config file. 935290001Sglebius.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts 936290001SglebiusLoad options from \fIcfgfile\fP. 937290001SglebiusThe \fIno\-load\-opts\fP form will disable the loading 938290001Sglebiusof earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early, 939290001Sglebiusout of order. 940290001Sglebius.It Fl \-version Op Brq Ar v|c|n 941290001SglebiusOutput version of program and exit. The default mode is `v', a simple 942290001Sglebiusversion. The `c' mode will print copyright information and `n' will 943290001Sglebiusprint the full copyright notice. 944290001Sglebius.El 945290001Sglebius.Sh "OPTION PRESETS" 946290001SglebiusAny option that is not marked as \fInot presettable\fP may be preset 947290001Sglebiusby loading values from configuration ("RC" or ".INI") file(s) and values from 948290001Sglebiusenvironment variables named: 949290001Sglebius.nf 950290001Sglebius \fBNTPQ_<option\-name>\fP or \fBNTPQ\fP 951290001Sglebius.fi 952290001Sglebius.ad 953290001SglebiusThe environmental presets take precedence (are processed later than) 954290001Sglebiusthe configuration files. 955290001SglebiusThe \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". 956290001SglebiusIf any of these are directories, then the file \fI.ntprc\fP 957290001Sglebiusis searched for within those directories. 958290001Sglebius.Sh "ENVIRONMENT" 959290001SglebiusSee \fBOPTION PRESETS\fP for configuration environment variables. 960290001Sglebius.Sh "FILES" 961290001SglebiusSee \fBOPTION PRESETS\fP for configuration files. 962290001Sglebius.Sh "EXIT STATUS" 963290001SglebiusOne of the following exit values will be returned: 964290001Sglebius.Bl -tag 965290001Sglebius.It 0 " (EXIT_SUCCESS)" 966290001SglebiusSuccessful program execution. 967290001Sglebius.It 1 " (EXIT_FAILURE)" 968290001SglebiusThe operation failed or the command syntax was not valid. 969290001Sglebius.It 66 " (EX_NOINPUT)" 970290001SglebiusA specified configuration file could not be loaded. 971290001Sglebius.It 70 " (EX_SOFTWARE)" 972290001Sglebiuslibopts had an internal operational error. Please report 973290001Sglebiusit to autogen\-users@lists.sourceforge.net. Thank you. 974290001Sglebius.El 975290001Sglebius.Sh "AUTHORS" 976290001SglebiusThe University of Delaware and Network Time Foundation 977290001Sglebius.Sh "COPYRIGHT" 978294905SdelphijCopyright (C) 1992\-2016 The University of Delaware and Network Time Foundation all rights reserved. 979290001SglebiusThis program is released under the terms of the NTP license, <http://ntp.org/license>. 980290001Sglebius.Sh "BUGS" 981290001SglebiusPlease send bug reports to: http://bugs.ntp.org, bugs@ntp.org 982290001Sglebius.Sh "NOTES" 983290001SglebiusThis manual page was \fIAutoGen\fP\-erated from the \fBntpq\fP 984290001Sglebiusoption definitions. 985