ntpq-opts.def revision 285169
1181834Sroberto/* -*- Mode: Text -*- */ 2181834Sroberto 3181834Srobertoautogen definitions options; 4181834Sroberto 5181834Sroberto#include copyright.def 6181834Sroberto#include homerc.def 7181834Sroberto#include autogen-version.def 8181834Sroberto 9181834Srobertoprog-name = "ntpq"; 10181834Srobertoprog-title = "standard NTP query program"; 11181834Srobertoargument = '[ host ...]'; 12181834Sroberto 13181834Srobertoflag = { 14181834Sroberto name = ipv4; 15280849Scy flags-cant = ipv6; 16181834Sroberto value = 4; 17181834Sroberto descrip = "Force IPv4 DNS name resolution"; 18181834Sroberto doc = <<- _EndOfDoc_ 19181834Sroberto Force DNS resolution of following host names on the command line 20181834Sroberto to the IPv4 namespace. 21181834Sroberto _EndOfDoc_; 22181834Sroberto}; 23181834Sroberto 24181834Srobertoflag = { 25181834Sroberto name = ipv6; 26280849Scy flags-cant = ipv4; 27181834Sroberto value = 6; 28181834Sroberto descrip = "Force IPv6 DNS name resolution"; 29181834Sroberto doc = <<- _EndOfDoc_ 30181834Sroberto Force DNS resolution of following host names on the command line 31181834Sroberto to the IPv6 namespace. 32181834Sroberto _EndOfDoc_; 33181834Sroberto}; 34181834Sroberto 35181834Srobertoflag = { 36181834Sroberto name = command; 37181834Sroberto value = c; 38181834Sroberto arg-type = string; 39181834Sroberto descrip = "run a command and exit"; 40181834Sroberto max = NOLIMIT; 41181834Sroberto arg-name = cmd; 42280849Scy call-proc = ntpq_custom_opt_handler; 43181834Sroberto doc = <<- _EndOfDoc_ 44181834Sroberto The following argument is interpreted as an interactive format command 45181834Sroberto and is added to the list of commands to be executed on the specified 46181834Sroberto host(s). 47181834Sroberto _EndOfDoc_; 48181834Sroberto}; 49181834Sroberto 50181834Sroberto#include debug-opt.def 51181834Sroberto 52181834Srobertoflag = { 53181834Sroberto name = interactive; 54181834Sroberto value = i; 55181834Sroberto flags-cant = command, peers; 56181834Sroberto descrip = "Force ntpq to operate in interactive mode"; 57181834Sroberto doc = <<- _EndOfDoc_ 58280849Scy Force @code{ntpq} to operate in interactive mode. 59280849Scy Prompts will be written to the standard output and 60280849Scy commands read from the standard input. 61181834Sroberto _EndOfDoc_; 62181834Sroberto}; 63181834Sroberto 64181834Srobertoflag = { 65181834Sroberto name = numeric; 66181834Sroberto value = n; 67181834Sroberto descrip = "numeric host addresses"; 68181834Sroberto doc = <<- _EndOfDoc_ 69181834Sroberto Output all host addresses in dotted-quad numeric format rather than 70181834Sroberto converting to the canonical host names. 71181834Sroberto _EndOfDoc_; 72181834Sroberto}; 73181834Sroberto 74280849Scyflag = { 75280849Scy name = old-rv; 76280849Scy descrip = "Always output status line with readvar"; 77280849Scy doc = <<- _EndOfDoc_ 78280849Scy By default, @code{ntpq} now suppresses the @code{associd=...} 79280849Scy line that precedes the output of @code{readvar} 80280849Scy (alias @code{rv}) when a single variable is requested, such as 81280849Scy @code{ntpq -c "rv 0 offset"}. 82280849Scy This option causes @code{ntpq} to include both lines of output 83280849Scy for a single-variable @code{readvar}. 84280849Scy Using an environment variable to 85280849Scy preset this option in a script will enable both older and 86280849Scy newer @code{ntpq} to behave identically in this regard. 87280849Scy _EndOfDoc_; 88280849Scy}; 89181834Sroberto 90280849Scyflag = { 91280849Scy name = peers; 92280849Scy value = p; 93280849Scy descrip = "Print a list of the peers"; 94280849Scy flags-cant = interactive; 95280849Scy call-proc = ntpq_custom_opt_handler; 96280849Scy doc = <<- _EndOfDoc_ 97280849Scy Print a list of the peers known to the server as well as a summary 98280849Scy of their state. This is equivalent to the 'peers' interactive command. 99280849Scy _EndOfDoc_; 100280849Scy}; 101181834Sroberto 102280849Scyflag = { 103280849Scy name = wide; 104280849Scy value = w; 105280849Scy descrip = "Display the full 'remote' value"; 106280849Scy doc = <<- _EndOfDoc_ 107280849Scy Display the full value of the 'remote' value. If this requires 108280849Scy more than 15 characters, display the full value, emit a newline, 109280849Scy and continue the data display properly indented on the next line. 110280849Scy _EndOfDoc_; 111280849Scy}; 112181834Sroberto 113280849Scydoc-section = { 114280849Scy ds-type = 'DESCRIPTION'; 115280849Scy ds-format = 'mdoc'; 116280849Scy ds-text = <<- _END_PROG_MDOC_DESCRIP 117181834Sroberto 118280849ScyThe 119280849Scy.Nm 120280849Scyutility program is used to query NTP servers which 121280849Scyimplement the standard NTP mode 6 control message formats defined 122280849Scyin Appendix B of the NTPv3 specification RFC1305, requesting 123280849Scyinformation about current state and/or changes in that state. 124280849ScyThe same formats are used in NTPv4, although some of the 125280849Scyvariables have changed and new ones added. The description on this 126280849Scypage is for the NTPv4 variables. 127280849ScyThe program may be run either in interactive mode or controlled using 128280849Scycommand line arguments. 129280849ScyRequests to read and write arbitrary 130280849Scyvariables can be assembled, with raw and pretty-printed output 131280849Scyoptions being available. 132280849ScyThe 133280849Scy.Nm 134280849Scyutility can also obtain and print a 135280849Scylist of peers in a common format by sending multiple queries to the 136280849Scyserver. 137181834Sroberto 138280849ScyIf one or more request options is included on the command line 139280849Scywhen 140280849Scy.Nm 141280849Scyis executed, each of the requests will be sent 142280849Scyto the NTP servers running on each of the hosts given as command 143280849Scyline arguments, or on localhost by default. 144280849ScyIf no request options 145280849Scyare given, 146280849Scy.Nm 147280849Scywill attempt to read commands from the 148280849Scystandard input and execute these on the NTP server running on the 149280849Scyfirst host given on the command line, again defaulting to localhost 150280849Scywhen no other host is specified. 151280849ScyThe 152280849Scy.Nm 153280849Scyutility will prompt for 154280849Scycommands if the standard input is a terminal device. 155181834Sroberto 156280849Scy.Nm 157280849Scyuses NTP mode 6 packets to communicate with the 158280849ScyNTP server, and hence can be used to query any compatible server on 159280849Scythe network which permits it. 160280849ScyNote that since NTP is a UDP protocol 161280849Scythis communication will be somewhat unreliable, especially over 162280849Scylarge distances in terms of network topology. 163280849ScyThe 164280849Scy.Nm 165280849Scyutility makes 166280849Scyone attempt to retransmit requests, and will time requests out if 167280849Scythe remote host is not heard from within a suitable timeout 168280849Scytime. 169280849Scy 170280849ScySpecifying a 171280849Scycommand line option other than 172280849Scy.Fl i 173280849Scyor 174280849Scy.Fl n 175280849Scywill 176280849Scycause the specified query (queries) to be sent to the indicated 177280849Scyhost(s) immediately. 178280849ScyOtherwise, 179280849Scy.Nm 180280849Scywill attempt to read 181280849Scyinteractive format commands from the standard input. 182280849Scy.Ss "Internal Commands" 183280849ScyInteractive format commands consist of a keyword followed by zero 184280849Scyto four arguments. 185280849ScyOnly enough characters of the full keyword to 186280849Scyuniquely identify the command need be typed. 187280849Scy 188280849ScyA 189280849Scynumber of interactive format commands are executed entirely within 190280849Scythe 191280849Scy.Nm 192280849Scyutility itself and do not result in NTP mode 6 193280849Scyrequests being sent to a server. 194280849ScyThese are described following. 195280849Scy.Bl -tag -width "? [command_keyword]" -compact -offset indent 196280849Scy.It Ic ? Op Ar command_keyword 197280849Scy.It Ic help Op Ar command_keyword 198280849ScyA 199280849Scy.Ql \&? 200280849Scyby itself will print a list of all the command 201280849Scykeywords known to this incarnation of 202280849Scy.Nm . 203280849ScyA 204280849Scy.Ql \&? 205280849Scyfollowed by a command keyword will print function and usage 206280849Scyinformation about the command. 207280849ScyThis command is probably a better 208280849Scysource of information about 209280849Scy.Nm 210280849Scythan this manual 211280849Scypage. 212280849Scy.It Ic addvars Ar variable_name Ns Xo Op Ic =value 213280849Scy.Ic ... 214280849Scy.Xc 215280849Scy.It Ic rmvars Ar variable_name Ic ... 216280849Scy.It Ic clearvars 217280849Scy.It Ic showvars 218280849ScyThe data carried by NTP mode 6 messages consists of a list of 219280849Scyitems of the form 220280849Scy.Ql variable_name=value , 221280849Scywhere the 222280849Scy.Ql =value 223280849Scyis ignored, and can be omitted, 224280849Scyin requests to the server to read variables. 225280849ScyThe 226280849Scy.Nm 227280849Scyutility maintains an internal list in which data to be included in control 228280849Scymessages can be assembled, and sent using the 229280849Scy.Ic readlist 230280849Scyand 231280849Scy.Ic writelist 232280849Scycommands described below. 233280849ScyThe 234280849Scy.Ic addvars 235280849Scycommand allows variables and their optional values to be added to 236280849Scythe list. 237280849ScyIf more than one variable is to be added, the list should 238280849Scybe comma-separated and not contain white space. 239280849ScyThe 240280849Scy.Ic rmvars 241280849Scycommand can be used to remove individual variables from the list, 242280849Scywhile the 243280849Scy.Ic clearlist 244280849Scycommand removes all variables from the 245280849Scylist. 246280849ScyThe 247280849Scy.Ic showvars 248280849Scycommand displays the current list of optional variables. 249280849Scy.It Ic authenticate Op yes | no 250280849ScyNormally 251280849Scy.Nm 252280849Scydoes not authenticate requests unless 253280849Scythey are write requests. 254280849ScyThe command 255280849Scy.Ql authenticate yes 256280849Scycauses 257280849Scy.Nm 258280849Scyto send authentication with all requests it 259280849Scymakes. 260280849ScyAuthenticated requests causes some servers to handle 261280849Scyrequests slightly differently, and can occasionally melt the CPU in 262280849Scyfuzzballs if you turn authentication on before doing a 263280849Scy.Ic peer 264280849Scydisplay. 265280849ScyThe command 266280849Scy.Ql authenticate 267280849Scycauses 268280849Scy.Nm 269280849Scyto display whether or not 270280849Scy.Nm 271280849Scyis currently autheinticating requests. 272280849Scy.It Ic cooked 273280849ScyCauses output from query commands to be "cooked", so that 274280849Scyvariables which are recognized by 275280849Scy.Nm 276280849Scywill have their 277280849Scyvalues reformatted for human consumption. 278280849ScyVariables which 279280849Scy.Nm 280280849Scythinks should have a decodable value but didn't are 281280849Scymarked with a trailing 282280849Scy.Ql \&? . 283280849Scy.It Xo 284280849Scy.Ic debug 285280849Scy.Oo 286280849Scy.Cm more | 287280849Scy.Cm less | 288280849Scy.Cm off 289280849Scy.Oc 290280849Scy.Xc 291280849ScyWith no argument, displays the current debug level. 292280849ScyOtherwise, the debug level is changed to the indicated level. 293280849Scy.It Ic delay Ar milliseconds 294280849ScySpecify a time interval to be added to timestamps included in 295280849Scyrequests which require authentication. 296280849ScyThis is used to enable 297280849Scy(unreliable) server reconfiguration over long delay network paths 298280849Scyor between machines whose clocks are unsynchronized. 299280849ScyActually the 300280849Scyserver does not now require timestamps in authenticated requests, 301280849Scyso this command may be obsolete. 302280849Scy.It Ic exit 303280849ScyExit 304280849Scy.Nm . 305280849Scy.It Ic host Ar hostname 306280849ScySet the host to which future queries will be sent. 307280849Scy.Ar hostname 308280849Scymay be either a host name or a numeric address. 309280849Scy.It Ic hostnames Op Cm yes | Cm no 310280849ScyIf 311280849Scy.Cm yes 312280849Scyis specified, host names are printed in 313280849Scyinformation displays. 314280849ScyIf 315280849Scy.Cm no 316280849Scyis specified, numeric 317280849Scyaddresses are printed instead. 318280849ScyThe default is 319280849Scy.Cm yes , 320280849Scyunless 321280849Scymodified using the command line 322280849Scy.Fl n 323280849Scyswitch. 324280849Scy.It Ic keyid Ar keyid 325280849ScyThis command allows the specification of a key number to be 326280849Scyused to authenticate configuration requests. 327280849ScyThis must correspond 328285169Scyto the 329285169Scy.Cm controlkey 330285169Scykey number the server has been configured to use for this 331280849Scypurpose. 332280849Scy.It Ic keytype Xo Oo 333280849Scy.Cm md5 | 334280849Scy.Cm OpenSSLDigestType 335280849Scy.Oc 336280849Scy.Xc 337280849ScySpecify the type of key to use for authenticating requests. 338280849Scy.Cm md5 339280849Scyis alway supported. 340280849ScyIf 341280849Scy.Nm 342280849Scywas built with OpenSSL support, 343280849Scyany digest type supported by OpenSSL can also be provided. 344280849ScyIf no argument is given, the current 345280849Scy.Ic keytype 346280849Scyis displayed. 347280849Scy.It Ic ntpversion Xo Oo 348280849Scy.Cm 1 | 349280849Scy.Cm 2 | 350280849Scy.Cm 3 | 351280849Scy.Cm 4 352280849Scy.Oc 353280849Scy.Xc 354280849ScySets the NTP version number which 355280849Scy.Nm 356280849Scyclaims in 357280849Scypackets. 358280849ScyDefaults to 3, and note that mode 6 control messages (and 359280849Scymodes, for that matter) didn't exist in NTP version 1. 360280849ScyThere appear 361280849Scyto be no servers left which demand version 1. 362280849ScyWith no argument, displays the current NTP version that will be used 363280849Scywhen communicating with servers. 364280849Scy.It Ic passwd 365280849ScyThis command prompts you to type in a password (which will not 366280849Scybe echoed) which will be used to authenticate configuration 367280849Scyrequests. 368280849ScyThe password must correspond to the key configured for 369280849Scyuse by the NTP server for this purpose if such requests are to be 370280849Scysuccessful. 371280849Scy.\" Not yet implemented. 372280849Scy.\" .It Ic poll 373280849Scy.\" .Op Ar n 374280849Scy.\" .Op Ic verbose 375280849Scy.\" Poll an NTP server in client mode 376280849Scy.\" .Ar n 377280849Scy.\" times. 378280849Scy.It Ic quit 379280849ScyExit 380280849Scy.Nm . 381280849Scy.It Ic raw 382280849ScyCauses all output from query commands is printed as received 383280849Scyfrom the remote server. 384280849ScyThe only formating/interpretation done on 385280849Scythe data is to transform nonascii data into a printable (but barely 386280849Scyunderstandable) form. 387280849Scy.It Ic timeout Ar milliseconds 388280849ScySpecify a timeout period for responses to server queries. 389280849ScyThe 390280849Scydefault is about 5000 milliseconds. 391280849ScyNote that since 392280849Scy.Nm 393280849Scyretries each query once after a timeout, the total waiting time for 394280849Scya timeout will be twice the timeout value set. 395280849Scy.It Ic version 396280849ScyPrint the version of the 397280849Scy.Nm 398280849Scyprogram. 399280849Scy.El 400280849Scy 401280849Scy.Ss "Control Message Commands" 402280849ScyAssociation IDs are used to identify system, peer and clock variables. 403280849ScySystem variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace. 404280849ScyMost control commands send a single mode-6 message to the server and expect a single response message. 405280849ScyThe exceptions are the 406280849Scy.Li peers 407280849Scycommand, which sends a series of messages, 408280849Scyand the 409280849Scy.Li mreadlist 410280849Scyand 411280849Scy.Li mreadvar 412280849Scycommands, which iterate over a range of associations. 413280849Scy.Bl -tag -width "something" -compact -offset indent 414280849Scy.It Cm associations 415280849ScyDisplay a list of mobilized associations in the form: 416280849Scy.Dl ind assid status conf reach auth condition last_event cnt 417280849Scy.Bl -column -offset indent ".Sy Variable" ".Sy Description" 418280849Scy.It Sy String Ta Sy Description 419280849Scy.It Li ind Ta index on this list 420280849Scy.It Li assid Ta association ID 421280849Scy.It Li status Ta peer status word 422280849Scy.It Li conf Ta Li yes : persistent, Li no : ephemeral 423280849Scy.It Li reach Ta Li yes : reachable, Li no : unreachable 424280849Scy.It Li auth Ta Li ok , Li yes , Li bad and Li none 425280849Scy.It Li condition Ta selection status (see the Li select field of the peer status word) 426280849Scy.It Li last_event Ta event report (see the Li event field of the peer status word) 427280849Scy.It Li cnt Ta event count (see the Li count field of the peer status word) 428280849Scy.El 429280849Scy.It Cm authinfo 430280849ScyDisplay the authentication statistics. 431280849Scy.It Cm clockvar Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ... 432280849Scy.It Cm cv Ar assocID Oo Ar name Ns Oo Cm = Ns Ar value Oc Oc Op ... 433280849ScyDisplay a list of clock variables for those associations supporting a reference clock. 434280849Scy.It Cm :config Op ... 435280849ScySend 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. 436280849Scy.It Cm config-from-file Ar filename 437280849ScySend the each line of 438280849Scy.Ar filename 439280849Scyto 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. 440280849Scy.It Ic ifstats 441280849ScyDisplay statistics for each local network address. Authentication is required. 442280849Scy.It Ic iostats 443280849ScyDisplay network and reference clock I/O statistics. 444280849Scy.It Ic kerninfo 445280849ScyDisplay 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. 446280849Scy.It Ic lassociations 447280849ScyPerform the same function as the associations command, except display mobilized and unmobilized associations. 448280849Scy.It Ic lopeers Xo 449280849Scy.Oo Ic -4 | 450280849Scy.Ic -6 451280849Scy.Oc 452280849Scy.Xc 453280849ScyObtain and print a list of all peers and clients showing 454280849Scy.Ar dstadr 455280849Scy(associated with any given IP version). 456280849Scy.It Ic lpeers Xo 457280849Scy.Oo Ic -4 | 458280849Scy.Ic -6 459280849Scy.Oc 460280849Scy.Xc 461280849ScyPrint a peer spreadsheet for the appropriate IP version(s). 462280849Scy.Ar dstadr 463280849Scy(associated with any given IP version). 464280849Scy.It Ic monstats 465280849ScyDisplay monitor facility statistics. 466280849Scy.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 467280849ScyObtain and print traffic counts collected and maintained by the monitor facility. 468280849ScyWith the exception of 469280849Scy.Cm sort Ns = Ns Ar sortorder , 470280849Scythe options filter the list returned by 471280849Scy.Cm ntpd. 472280849ScyThe 473280849Scy.Cm limited 474280849Scyand 475280849Scy.Cm kod 476280849Scyoptions return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. 477280849ScyThe 478280849Scy.Cm mincount Ns = Ns Ar count 479280849Scyoption filters entries representing less than 480280849Scy.Ar count 481280849Scypackets. 482280849ScyThe 483280849Scy.Cm laddr Ns = Ns Ar localaddr 484280849Scyoption filters entries for packets received on any local address other than 485280849Scy.Ar localaddr . 486280849Scy.Cm resany Ns = Ns Ar hexmask 487280849Scyand 488280849Scy.Cm resall Ns = Ns Ar hexmask 489280849Scyfilter entries containing none or less than all, respectively, of the bits in 490280849Scy.Ar hexmask , 491280849Scywhich must begin with 492280849Scy.Cm 0x . 493280849ScyThe 494280849Scy.Ar sortorder 495280849Scydefaults to 496280849Scy.Cm lstint 497280849Scyand may be any of 498280849Scy.Cm addr , 499280849Scy.Cm count , 500280849Scy.Cm avgint , 501280849Scy.Cm lstint , 502280849Scyor any of those preceded by a minus sign (hyphen) to reverse the sort order. 503280849ScyThe output columns are: 504280849Scy.Bl -tag -width "something" -compact -offset indent 505280849Scy.It Column 506280849ScyDescription 507280849Scy.It Ic lstint 508280849ScyInterval in s between the receipt of the most recent packet from this address and the completion of the retrieval of the MRU list by 509280849Scy.Nm . 510280849Scy.It Ic avgint 511280849ScyAverage interval in s between packets from this address. 512280849Scy.It Ic rstr 513280849ScyRestriction flags associated with this address. 514280849ScyMost are copied unchanged from the matching 515280849Scy.Ic restrict 516280849Scycommand, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this address triggered a rate control response. 517280849Scy.It Ic r 518280849ScyRate control indicator, either 519280849Scya period, 520280849Scy.Ic L 521280849Scyor 522280849Scy.Ic K 523280849Scyfor no rate control response, 524280849Scyrate limiting by discarding, or rate limiting with a KoD response, respectively. 525280849Scy.It Ic m 526280849ScyPacket mode. 527280849Scy.It Ic v 528280849ScyPacket version number. 529280849Scy.It Ic count 530280849ScyPackets received from this address. 531280849Scy.It Ic rport 532280849ScySource port of last packet from this address. 533280849Scy.It Ic remote address 534280849ScyDNS name, numeric address, or address followed by 535280849Scyclaimed DNS name which could not be verified in parentheses. 536280849Scy.El 537280849Scy.It Ic mreadvar assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ... 538280849Scy.It Ic mrv assocID assocID Oo Ar variable_name Ns Oo = Ns Ar value Oc Oc ... 539280849ScyPerform the same function as the 540280849Scy.Ic readvar 541280849Scycommand, except for a range of association IDs. 542280849ScyThis range is determined from the association list cached by the most recent 543280849Scy.Ic associations 544280849Scycommand. 545280849Scy.It Ic opeers Xo 546280849Scy.Oo Ic -4 | 547280849Scy.Ic -6 548280849Scy.Oc 549280849Scy.Xc 550280849ScyObtain and print the old-style list of all peers and clients showing 551280849Scy.Ar dstadr 552280849Scy(associated with any given IP version), 553280849Scyrather than the 554280849Scy.Ar refid . 555280849Scy.It Ic passociations 556280849ScyPerform the same function as the 557280849Scy.Ic associations 558280849Scycommand, 559280849Scyexcept that it uses previously stored data rather than making a new query. 560280849Scy.It Ic peers 561280849ScyDisplay a list of peers in the form: 562280849Scy.Dl [tally]remote refid st t when pool reach delay offset jitter 563280849Scy.Bl -tag -width "something" -compact -offset indent 564280849Scy.It Variable 565280849ScyDescription 566280849Scy.It Ic [tally] 567280849Scysingle-character code indicating current value of the 568280849Scy.Ic select 569280849Scyfield of the 570280849Scy.Lk decode.html#peer "peer status word" 571280849Scy.It Ic remote 572280849Scyhost name (or IP number) of peer. 573280849ScyThe value displayed will be truncated to 15 characters unless the 574280849Scy.Fl w 575280849Scyflag is given, in which case the full value will be displayed 576280849Scyon the first line, 577280849Scyand the remaining data is displayed on the next line. 578280849Scy.It Ic refid 579280849Scyassociation ID or 580280849Scy.Lk decode.html#kiss "'kiss code" 581280849Scy.It Ic st 582280849Scystratum 583280849Scy.It Ic t 584280849Scy.Ic u : 585280849Scyunicast or manycast client, 586280849Scy.Ic b : 587280849Scybroadcast or multicast client, 588280849Scy.Ic l : 589280849Scylocal (reference clock), 590280849Scy.Ic s : 591280849Scysymmetric (peer), 592280849Scy.Ic A : 593280849Scymanycast server, 594280849Scy.Ic B : 595280849Scybroadcast server, 596280849Scy.Ic M : 597280849Scymulticast server 598280849Scy.It Ic when 599280849Scysec/min/hr since last received packet 600280849Scy.It Ic poll 601280849Scypoll interval (log2 s) 602280849Scy.It Ic reach 603280849Scyreach shift register (octal) 604280849Scy.It Ic delay 605280849Scyroundtrip delay 606280849Scy.It Ic offset 607280849Scyoffset of server relative to this host 608280849Scy.It Ic jitter 609280849Scyjitter 610280849Scy.El 611285169Scy.It Ic apeers 612285169ScyDisplay a list of peers in the form: 613285169Scy.Dl [tally]remote refid assid st t when pool reach delay offset jitter 614285169Scywhere the output is just like the 615285169Scy.Ic peers 616285169Scycommand except that the 617285169Scy.Ic refid 618285169Scyis displayed in hex format and the association number is also displayed. 619280849Scy.It Ic pstats Ar assocID 620280849ScyShow the statistics for the peer with the given 621280849Scy.Ar assocID . 622280849Scy.It Ic readlist Ar assocID 623280849Scy.It Ic rl Ar assocID 624280849ScyRead the system or peer variables included in the variable list. 625280849Scy.It Ic readvar Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc 626280849Scy.It Ic rv Ar assocID Ar name Ns Oo Ns = Ns Ar value Oc Oo , ... Oc 627280849ScyDisplay the specified variables. 628280849ScyIf 629280849Scy.Ar assocID 630280849Scyis zero, the variables are from the 631280849Scy.Sx System Variables 632280849Scyname space, otherwise they are from the 633280849Scy.Sx Peer Variables 634280849Scyname space. 635280849ScyThe 636280849Scy.Ar assocID 637280849Scyis required, as the same name can occur in both spaces. 638280849ScyIf no 639280849Scy.Ar name 640280849Scyis included, all operative variables in the name space are displayed. 641280849Scy 642280849ScyIn this case only, if the 643280849Scy.Ar assocID 644280849Scyis omitted, it is assumed zero. 645280849ScyMultiple names are specified with comma separators and without whitespace. 646280849ScyNote that time values are represented in milliseconds 647280849Scyand frequency values in parts-per-million (PPM). 648280849ScySome NTP timestamps are represented in the format 649280849ScyYYYYMMDDTTTT , 650280849Scywhere YYYY is the year, 651280849ScyMM the month of year, 652280849ScyDD the day of month and 653280849ScyTTTT the time of day. 654280849Scy.It Ic reslist 655280849ScyShow the access control (restrict) list for 656280849Scy.Nm . 657280849Scy 658280849Scy.It Ic saveconfig Ar filename 659280849ScyWrite the current configuration, 660280849Scyincluding any runtime modifications given with 661280849Scy.Ic :config 662280849Scyor 663280849Scy.Ic config-from-file , 664280849Scyto the ntpd host's file 665280849Scy.Ar filename . 666280849ScyThis command will be rejected by the server unless 667280849Scy.Lk miscopt.html#saveconfigdir "saveconfigdir" 668280849Scyappears in the 669280849Scy.Ic ntpd 670280849Scyconfiguration file. 671280849Scy.Ar filename 672280849Scycan use 673280849Scy.Xr strftime 674280849Scyformat specifies to substitute the current date and time, for example, 675280849Scy.Ic q]saveconfig ntp-%Y%m%d-%H%M%S.confq] . 676280849ScyThe filename used is stored in system variable 677280849Scy.Ic savedconfig . 678280849ScyAuthentication is required. 679280849Scy.It Ic timerstats 680280849ScyDisplay interval timer counters. 681280849Scy.It Ic writelist Ar assocID 682280849ScyWrite the system or peer variables included in the variable list. 683280849Scy.It Ic writevar Ar assocID Ar name Ns = Ns Ar value Op , ... 684280849ScyWrite the specified variables. 685280849ScyIf the 686280849Scy.Ar assocID 687280849Scyis zero, the variables are from the 688280849Scy.Sx System Variables 689280849Scyname space, otherwise they are from the 690280849Scy.Sx Peer Variables 691280849Scyname space. 692280849ScyThe 693280849Scy.Ar assocID 694280849Scyis required, as the same name can occur in both spaces. 695280849Scy.It Ic sysinfo 696280849ScyDisplay operational summary. 697280849Scy.It Ic sysstats 698280849ScyPrint statistics counters maintained in the protocol module. 699280849Scy.El 700280849Scy 701280849Scy.Ss Status Words and Kiss Codes 702280849Scy 703280849ScyThe current state of the operating program is shown 704280849Scyin a set of status words 705280849Scymaintained by the system. 706280849ScyStatus information is also available on a per-association basis. 707280849ScyThese words are displayed in the 708280849Scy.Ic rv 709280849Scyand 710280849Scy.Ic as 711280849Scycommands both in hexadecimal and in decoded short tip strings. 712280849ScyThe codes, tips and short explanations are documented on the 713280849Scy.Lk decode.html "Event Messages and Status Words" 714280849Scypage. 715280849ScyThe page also includes a list of system and peer messages, 716280849Scythe code for the latest of which is included in the status word. 717280849Scy.Pp 718280849ScyInformation resulting from protocol machine state transitions 719280849Scyis displayed using an informal set of ASCII strings called 720280849Scy.Lk decode.html#kiss "kiss codes" . 721280849ScyThe original purpose was for kiss-o'-death (KoD) packets 722280849Scysent by the server to advise the client of an unusual condition. 723280849ScyThey are now displayed, when appropriate, 724280849Scyin the reference identifier field in various billboards. 725280849Scy 726280849Scy.Ss System Variables 727280849ScyThe following system variables appear in the 728280849Scy.Ic rv 729280849Scybillboard. 730280849ScyNot all variables are displayed in some configurations. 731280849Scy.Bl -tag -width "something" -compact -offset indent 732280849Scy.It Variable 733280849ScyDescription 734280849Scy.It Ic status 735280849Scy.Lk decode.html#sys "system status word" 736280849Scy.It Ic version 737280849ScyNTP software version and build time 738280849Scy.It Ic processor 739280849Scyhardware platform and version 740280849Scy.It Ic system 741280849Scyoperating system and version 742280849Scy.It Ic leap 743280849Scyleap warning indicator (0-3) 744280849Scy.It Ic stratum 745280849Scystratum (1-15) 746280849Scy.It Ic precision 747280849Scyprecision (log2 s) 748280849Scy.It Ic rootdelay 749280849Scytotal roundtrip delay to the primary reference clock 750280849Scy.It Ic rootdisp 751280849Scytotal dispersion to the primary reference clock 752280849Scy.It Ic peer 753280849Scysystem peer association ID 754280849Scy.It Ic tc 755280849Scytime constant and poll exponent (log2 s) (3-17) 756280849Scy.It Ic mintc 757280849Scyminimum time constant (log2 s) (3-10) 758280849Scy.It Ic clock 759280849Scydate and time of day 760280849Scy.It Ic refid 761280849Scyreference ID or 762280849Scy.Lk decode.html#kiss "kiss code" 763280849Scy.It Ic reftime 764280849Scyreference time 765280849Scy.It Ic offset 766280849Scycombined offset of server relative to this host 767280849Scy.It Ic sys_jitter 768280849Scycombined system jitter 769280849Scy.It Ic frequency 770280849Scyfrequency offset (PPM) relative to hardware clock 771280849Scy.It Ic clk_wander 772280849Scyclock frequency wander (PPM) 773280849Scy.It Ic clk_jitter 774280849Scyclock jitter 775280849Scy.It Ic tai 776280849ScyTAI-UTC offset (s) 777280849Scy.It Ic leapsec 778280849ScyNTP seconds when the next leap second is/was inserted 779280849Scy.It Ic expire 780280849ScyNTP seconds when the NIST leapseconds file expires 781280849Scy.El 782280849ScyThe jitter and wander statistics are exponentially-weighted RMS averages. 783280849ScyThe system jitter is defined in the NTPv4 specification; 784280849Scythe clock jitter statistic is computed by the clock discipline module. 785280849Scy.Pp 786280849ScyWhen the NTPv4 daemon is compiled with the OpenSSL software library, 787280849Scyadditional system variables are displayed, 788280849Scyincluding some or all of the following, 789280849Scydepending on the particular Autokey dance: 790280849Scy 791280849Scy.Bl -tag -width "something" -compact -offset indent 792280849Scy.It Variable 793280849ScyDescription 794280849Scy.It Ic host 795280849ScyAutokey host name for this host 796280849Scy.It Ic ident 797280849ScyAutokey group name for this host 798280849Scy.It Ic flags 799280849Scyhost flags (see Autokey specification) 800280849Scy.It Ic digest 801280849ScyOpenSSL message digest algorithm 802280849Scy.It Ic signature 803280849ScyOpenSSL digest/signature scheme 804280849Scy.It Ic update 805280849ScyNTP seconds at last signature update 806280849Scy.It Ic cert 807280849Scycertificate subject, issuer and certificate flags 808280849Scy.It Ic until 809280849ScyNTP seconds when the certificate expires 810280849Scy.El 811280849Scy.Ss Peer Variables 812280849ScyThe following peer variables appear in the 813280849Scy.Ic rv 814280849Scybillboard for each association. 815280849ScyNot all variables are displayed in some configurations. 816280849Scy 817280849Scy.Bl -tag -width "something" -compact -offset indent 818280849Scy.It Variable 819280849ScyDescription 820280849Scy.It Ic associd 821280849Scyassociation ID 822280849Scy.It Ic status 823280849Scy.Lk decode.html#peer "peer status word" 824280849Scy.It Ic srcadr 825280849Scysource (remote) IP address 826280849Scy.It Ic srcport 827280849Scysource (remote) port 828280849Scy.It Ic dstadr 829280849Scydestination (local) IP address 830280849Scy.It Ic dstport 831280849Scydestination (local) port 832280849Scy.It Ic leap 833280849Scyleap indicator (0-3) 834280849Scy.It Ic stratum 835280849Scystratum (0-15) 836280849Scy.It Ic precision 837280849Scyprecision (log2 s) 838280849Scy.It Ic rootdelay 839280849Scytotal roundtrip delay to the primary reference clock 840280849Scy.It Ic rootdisp 841280849Scytotal root dispersion to the primary reference clock 842280849Scy.It Ic refid 843280849Scyreference ID or 844280849Scy.Lk decode.html#kiss "kiss code" 845280849Scy.It Ic reftime 846280849Scyreference time 847280849Scy.It Ic reach 848280849Scyreach register (octal) 849280849Scy.It Ic unreach 850280849Scyunreach counter 851280849Scy.It Ic hmode 852280849Scyhost mode (1-6) 853280849Scy.It Ic pmode 854280849Scypeer mode (1-5) 855280849Scy.It Ic hpoll 856280849Scyhost poll exponent (log2 s) (3-17) 857280849Scy.It Ic ppoll 858280849Scypeer poll exponent (log2 s) (3-17) 859280849Scy.It Ic headway 860280849Scyheadway (see 861280849Scy.Lk rate.html "Rate Management and the Kiss-o'-Death Packet" ) 862280849Scy.It Ic flash 863280849Scy.Lk decode.html#flash "flash status word" 864280849Scy.It Ic offset 865280849Scyfilter offset 866280849Scy.It Ic delay 867280849Scyfilter delay 868280849Scy.It Ic dispersion 869280849Scyfilter dispersion 870280849Scy.It Ic jitter 871280849Scyfilter jitter 872280849Scy.It Ic ident 873280849ScyAutokey group name for this association 874280849Scy.It Ic bias 875280849Scyunicast/broadcast bias 876280849Scy.It Ic xleave 877280849Scyinterleave delay (see 878280849Scy.Lk xleave.html "NTP Interleaved Modes" ) 879280849Scy.El 880280849ScyThe 881280849Scy.Ic bias 882280849Scyvariable is calculated when the first broadcast packet is received 883280849Scyafter the calibration volley. 884280849ScyIt represents the offset of the broadcast subgraph relative to the unicast subgraph. 885280849ScyThe 886280849Scy.Ic xleave 887280849Scyvariable appears only for the interleaved symmetric and interleaved modes. 888280849ScyIt represents the internal queuing, buffering and transmission delays 889280849Scyfor the preceding packet. 890280849Scy.Pp 891280849ScyWhen the NTPv4 daemon is compiled with the OpenSSL software library, 892280849Scyadditional peer variables are displayed, including the following: 893280849Scy.Bl -tag -width "something" -compact -offset indent 894280849Scy.It Variable 895280849ScyDescription 896280849Scy.It Ic flags 897280849Scypeer flags (see Autokey specification) 898280849Scy.It Ic host 899280849ScyAutokey server name 900280849Scy.It Ic flags 901280849Scypeer flags (see Autokey specification) 902280849Scy.It Ic signature 903280849ScyOpenSSL digest/signature scheme 904280849Scy.It Ic initsequence 905280849Scyinitial key ID 906280849Scy.It Ic initkey 907280849Scyinitial key index 908280849Scy.It Ic timestamp 909280849ScyAutokey signature timestamp 910280849Scy.El 911280849Scy 912280849Scy.Ss Clock Variables 913280849ScyThe following clock variables appear in the 914280849Scy.Ic cv 915280849Scybillboard for each association with a reference clock. 916280849ScyNot all variables are displayed in some configurations. 917280849Scy.Bl -tag -width "something" -compact -offset indent 918280849Scy.It Variable 919280849ScyDescription 920280849Scy.It Ic associd 921280849Scyassociation ID 922280849Scy.It Ic status 923280849Scy.Lk decode.html#clock "clock status word" 924280849Scy.It Ic device 925280849Scydevice description 926280849Scy.It Ic timecode 927280849ScyASCII time code string (specific to device) 928280849Scy.It Ic poll 929280849Scypoll messages sent 930280849Scy.It Ic noreply 931280849Scyno reply 932280849Scy.It Ic badformat 933280849Scybad format 934280849Scy.It Ic baddata 935280849Scybad date or time 936280849Scy.It Ic fudgetime1 937280849Scyfudge time 1 938280849Scy.It Ic fudgetime2 939280849Scyfudge time 2 940280849Scy.It Ic stratum 941280849Scydriver stratum 942280849Scy.It Ic refid 943280849Scydriver reference ID 944280849Scy.It Ic flags 945280849Scydriver flags 946280849Scy.El 947280849Scy _END_PROG_MDOC_DESCRIP; 948280849Scy}; 949