1 /* -*- Mode
: Text
-*- */
3 autogen definitions options
;
7 #include autogen
-version.def
10 prog
-title
= "standard NTP query program";
11 argument
= '[ host ...]';
19 descrip
= "Force IPv4 DNS name resolution";
21 Force DNS resolution of following host names on the command line
22 to the IPv4 namespace.
30 descrip
= "Force IPv6 DNS name resolution";
32 Force DNS resolution of following host names on the command line
33 to the IPv6 namespace.
41 descrip
= "run a command and exit";
44 call
-proc
= ntpq_custom_opt_handler
;
46 The following argument is interpreted as an interactive format command
47 and is added to the list of commands to be executed on the specified
52 #include debug
-opt.def
57 descrip
= "Print a list of the peers";
58 flags
-cant
= interactive
;
59 call
-proc
= ntpq_custom_opt_handler
;
61 Print a list of the peers known to the server as well as a summary
62 of their state. This is equivalent to the
'peers' interactive command.
69 flags
-cant
= command
, peers
;
70 descrip
= "Force ntpq to operate in interactive mode";
72 Force ntpq to operate in interactive mode. Prompts will be written
73 to the standard output and commands read from the standard input.
80 descrip
= "numeric host addresses";
82 Output all host addresses in dotted
-quad numeric format rather than
83 converting to the canonical host names.
89 descrip
= "Always output status line with readvar";
91 By default
, ntpq now suppresses the associd
=... line that
92 precedes the output of
"readvar" (alias
"rv") when a single
93 variable is requested
, such as ntpq
-c
"rv 0 offset". This
94 option causes ntpq to include both lines of output for a
95 single
-variable readvar. Using an environment variable to
96 preset this option in a script will enable both older and
97 newer ntpq to behave identically in this regard.
101 detail
= <<- _END_DETAIL
104 utility program is used to query NTP servers which
105 implement the standard NTP mode
6 control message formats defined
106 in Appendix B of the NTPv3 specification RFC1305
, requesting
107 information about current state and
/or changes in that state.
108 The same formats are used in NTPv4
, although some of the
109 variables have changed and new ones added.
112 prog
-man
-descrip
= <<- _END_PROG_MAN_DESCRIP
115 utility program is used to query NTP servers which
116 implement the standard NTP mode
6 control message formats defined
117 in Appendix B of the NTPv3 specification RFC1305
, requesting
118 information about current state and
/or changes in that state.
119 The same formats are used in NTPv4
, although some of the
120 variables have changed and new ones added. The description on this
121 page is for the NTPv4 variables.
122 The program may be run either in interactive mode or controlled using
123 command line arguments.
124 Requests to read and write arbitrary
125 variables can be assembled
, with raw and pretty
-printed output
126 options being available.
129 utility can also obtain and print a
130 list of peers in a common format by sending multiple queries to the
133 If one or more request options is included on the command line
136 is executed
, each of the requests will be sent
137 to the NTP servers running on each of the hosts given as command
138 line arguments
, or on localhost by default.
139 If no request options
142 will attempt to read commands from the
143 standard input and execute these on the NTP server running on the
144 first host given on the command line
, again defaulting to localhost
145 when no other host is specified.
148 utility will prompt for
149 commands if the standard input is a terminal device.
153 utility uses NTP mode
6 packets to communicate with the
154 NTP server
, and hence can be used to query any compatible server on
155 the network which permits it.
156 Note that since NTP is a UDP protocol
157 this communication will be somewhat unreliable
, especially over
158 large distances in terms of network topology.
162 one attempt to retransmit requests
, and will time requests out if
163 the remote host is not heard from within a suitable timeout
167 command line option other than
172 cause the specified
query (queries
) to be sent to the indicated
177 interactive format commands from the standard input.
178 .Ss
"Internal Commands"
179 Interactive format commands consist of a keyword followed by zero
181 Only enough characters of the full keyword to
182 uniquely identify the command need be typed.
185 number of interactive format commands are executed entirely within
188 utility itself and do not result in NTP mode
6
189 requests being sent to a server.
190 These are described following.
192 @item ?
[command_keyword
]
193 @itemx help
[command_keyword
]
196 by itself will print a list of all the command
197 keywords known to this incarnation of
201 followed by a command keyword will print function and usage
202 information about the command.
203 This command is probably a better
204 source of information about
209 .Ar variable_name
[=value
] ...
211 @item rmvars variable_name ...
213 The data carried by NTP mode
6 messages consists of a list of
215 .Ql variable_name
=value
,
218 is ignored
, and can be omitted
,
219 in requests to the server to read variables.
222 utility maintains an internal list in which data to be included in control
223 messages can be assembled
, and sent using the
227 commands described below.
230 command allows variables and their optional values to be added to
232 If more than one variable is to be added
, the list should
233 be comma
-separated and not contain white space.
236 command can be used to remove individual variables from the list
,
239 command removes all variables from the
241 @item authenticate
[ yes | no
]
244 does not authenticate requests unless
245 they are write requests.
250 to send authentication with all requests it
252 Authenticated requests causes some servers to handle
253 requests slightly differently
, and can occasionally melt the CPU in
254 fuzzballs if you turn authentication on before doing a
261 to display whether or not
263 is currently autheinticating requests.
265 Causes output from query commands to be
"cooked", so that
266 variables which are recognized by
269 values reformatted for human consumption.
272 thinks should have a decodable value but didn
't are
273 marked with a trailing
281 With no argument, displays the current debug level.
282 Otherwise, the debug level is changed to the indicated level.
283 @item delay milliseconds
284 Specify a time interval to be added to timestamps included in
285 requests which require authentication.
286 This is used to enable
287 (unreliable) server reconfiguration over long delay network paths
288 or between machines whose clocks are unsynchronized.
290 server does not now require timestamps in authenticated requests,
291 so this command may be obsolete.
293 Set the host to which future queries will be sent.
295 be either a host name or a numeric address.
296 @item hostnames Cm yes | Cm no
299 is specified, host names are printed in
300 information displays.
303 is specified, numeric
304 addresses are printed instead.
308 modified using the command line
312 This command allows the specification of a key number to be
313 used to authenticate configuration requests.
315 to a key number the server has been configured to use for this
324 Sets the NTP version number which
328 Defaults to 3, Note that mode 6 control messages (and
329 modes, for that matter) didn't exist in NTP version
1.
331 to be no servers left which demand version
1.
332 With no argument
, displays the current NTP version that will be used
333 when communicating with servers.
338 This command prompts you to type in a
password (which will not
339 be echoed
) which will be used to authenticate configuration
341 The password must correspond to the key configured for
342 use by the NTP server for this purpose if such requests are to be
345 Causes all output from query commands is printed as received
346 from the remote server.
347 The only formating
/interpretation done on
348 the data is to transform nonascii data into a
printable (but barely
349 understandable
) form.
350 @item timeout Ar milliseconds
351 Specify a timeout period for responses to server queries.
353 default is about
5000 milliseconds.
356 retries each query once after a timeout
, the total waiting time for
357 a timeout will be twice the timeout value set.
360 _END_PROG_MAN_DESCRIP
;