summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpdc/invoke-ntpdc.texi
blob: a0e2b3542e5033decb88c1623a1adc9dbec8352c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
@node ntpdc Invocation
@section Invoking ntpdc
@pindex ntpdc
@cindex vendor-specific NTPD control program
@ignore
#
# EDIT THIS FILE WITH CAUTION  (invoke-ntpdc.texi)
#
# It has been AutoGen-ed  November 21, 2016 at 08:02:33 AM by AutoGen 5.18.5
# From the definitions    ntpdc-opts.def
# and the template file   agtexi-cmd.tpl
@end ignore



@code{ntpdc}
is deprecated.
Please use
@code{ntpq(1ntpqmdoc)} instead - it can do everything
@code{ntpdc}
used to do, and it does so using a much more sane interface.

@code{ntpdc}
is a utility program used to query
@code{ntpd(1ntpdmdoc)}
about its
current state and to request changes in that state.
It uses NTP mode 7 control message formats described in the source code.
The program may
be run either in interactive mode or controlled using command line
arguments.
Extensive state and statistics information is available
through the
@code{ntpdc}
interface.
In addition, nearly all the
configuration options which can be specified at startup using
ntpd's configuration file may also be specified at run time using
@code{ntpdc}

This section was generated by @strong{AutoGen},
using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpdc} program.
This software is released under the NTP license, <http://ntp.org/license>.

@menu
* ntpdc usage::                  ntpdc help/usage (@option{--help})
* ntpdc ipv4::                   ipv4 option (-4)
* ntpdc ipv6::                   ipv6 option (-6)
* ntpdc command::                command option (-c)
* ntpdc interactive::            interactive option (-i)
* ntpdc listpeers::              listpeers option (-l)
* ntpdc numeric::                numeric option (-n)
* ntpdc peers::                  peers option (-p)
* ntpdc showpeers::              showpeers option (-s)
* ntpdc config::                 presetting/configuring ntpdc
* ntpdc exit status::            exit status
* ntpdc Usage::                  Usage
* ntpdc See Also::               See Also
* ntpdc Authors::                Authors
* ntpdc Bugs::                   Bugs
@end menu

@node ntpdc usage
@subsection ntpdc help/usage (@option{--help})
@cindex ntpdc help

This is the automatically generated usage text for ntpdc.

The text printed is the same whether selected with the @code{help} option
(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
the usage text by passing it through a pager program.
@code{more-help} is disabled on platforms without a working
@code{fork(2)} function.  The @code{PAGER} environment variable is
used to select the program, defaulting to @file{more}.  Both will exit
with a status code of 0.

@exampleindent 0
@example
ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p9
Usage:  ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
  Flg Arg Option-Name    Description
   -4 no  ipv4           Force IPv4 DNS name resolution
                                - prohibits the option 'ipv6'
   -6 no  ipv6           Force IPv6 DNS name resolution
                                - prohibits the option 'ipv4'
   -c Str command        run a command and exit
                                - may appear multiple times
   -d no  debug-level    Increase debug verbosity level
                                - may appear multiple times
   -D Num set-debug-level Set the debug verbosity level
                                - may appear multiple times
   -i no  interactive    Force ntpq to operate in interactive mode
                                - prohibits these options:
                                command
                                listpeers
                                peers
                                showpeers
   -l no  listpeers      Print a list of the peers
                                - prohibits the option 'command'
   -n no  numeric        numeric host addresses
   -p no  peers          Print a list of the peers
                                - prohibits the option 'command'
   -s no  showpeers      Show a list of the peers
                                - prohibits the option 'command'
      opt version        output version information and exit
   -? no  help           display extended usage information and exit
   -! no  more-help      extended usage information passed thru pager
   -> opt save-opts      save the option state to a config file
   -< Str load-opts      load options from a config file
                                - disabled as '--no-load-opts'
                                - may appear multiple times

Options are specified by doubled hyphens and their name or by a single
hyphen and the flag character.


The following option preset mechanisms are supported:
 - reading file $HOME/.ntprc
 - reading file ./.ntprc
 - examining environment variables named NTPDC_*

Please send bug reports to:  <http://bugs.ntp.org, bugs@@ntp.org>
@end example
@exampleindent 4

@node ntpdc ipv4
@subsection ipv4 option (-4)
@cindex ntpdc-ipv4

This is the ``force ipv4 dns name resolution'' option.

@noindent
This option has some usage constraints.  It:
@itemize @bullet
@item
must not appear in combination with any of the following options:
ipv6.
@end itemize

Force DNS resolution of following host names on the command line
to the IPv4 namespace.
@node ntpdc ipv6
@subsection ipv6 option (-6)
@cindex ntpdc-ipv6

This is the ``force ipv6 dns name resolution'' option.

@noindent
This option has some usage constraints.  It:
@itemize @bullet
@item
must not appear in combination with any of the following options:
ipv4.
@end itemize

Force DNS resolution of following host names on the command line
to the IPv6 namespace.
@node ntpdc command
@subsection command option (-c)
@cindex ntpdc-command

This is the ``run a command and exit'' option.
This option takes a string argument @file{cmd}.

@noindent
This option has some usage constraints.  It:
@itemize @bullet
@item
may appear an unlimited number of times.
@end itemize

The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
host(s).
@node ntpdc interactive
@subsection interactive option (-i)
@cindex ntpdc-interactive

This is the ``force ntpq to operate in interactive mode'' option.

@noindent
This option has some usage constraints.  It:
@itemize @bullet
@item
must not appear in combination with any of the following options:
command, listpeers, peers, showpeers.
@end itemize

Force ntpq to operate in interactive mode.  Prompts will be written
to the standard output and commands read from the standard input.
@node ntpdc listpeers
@subsection listpeers option (-l)
@cindex ntpdc-listpeers

This is the ``print a list of the peers'' option.

@noindent
This option has some usage constraints.  It:
@itemize @bullet
@item
must not appear in combination with any of the following options:
command.
@end itemize

Print a list of the peers known to the server as well as a summary of
their state. This is equivalent to the 'listpeers' interactive command.
@node ntpdc numeric
@subsection numeric option (-n)
@cindex ntpdc-numeric

This is the ``numeric host addresses'' option.
Output all host addresses in dotted-quad numeric format rather than
converting to the canonical host names. 
@node ntpdc peers
@subsection peers option (-p)
@cindex ntpdc-peers

This is the ``print a list of the peers'' option.

@noindent
This option has some usage constraints.  It:
@itemize @bullet
@item
must not appear in combination with any of the following options:
command.
@end itemize

Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'peers' interactive command.
@node ntpdc showpeers
@subsection showpeers option (-s)
@cindex ntpdc-showpeers

This is the ``show a list of the peers'' option.

@noindent
This option has some usage constraints.  It:
@itemize @bullet
@item
must not appear in combination with any of the following options:
command.
@end itemize

Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'dmpeers' interactive command.


@node ntpdc config
@subsection presetting/configuring ntpdc

Any option that is not marked as @i{not presettable} may be preset by
loading values from configuration ("rc" or "ini") files, and values from environment variables named @code{NTPDC} and @code{NTPDC_<OPTION_NAME>}.  @code{<OPTION_NAME>} must be one of
the options listed above in upper case and segmented with underscores.
The @code{NTPDC} variable will be tokenized and parsed like
the command line.  The remaining variables are tested for existence and their
values are treated like option arguments.


@noindent
@code{libopts} will search in 2 places for configuration files:
@itemize @bullet
@item
$HOME
@item
$PWD
@end itemize
The environment variables @code{HOME}, and @code{PWD}
are expanded and replaced when @file{ntpdc} runs.
For any of these that are plain files, they are simply processed.
For any that are directories, then a file named @file{.ntprc} is searched for
within that directory and processed.

Configuration files may be in a wide variety of formats.
The basic format is an option name followed by a value (argument) on the
same line.  Values may be separated from the option name with a colon,
equal sign or simply white space.  Values may be continued across multiple
lines by escaping the newline with a backslash.

Multiple programs may also share the same initialization file.
Common options are collected at the top, followed by program specific
segments.  The segments are separated by lines like:
@example
[NTPDC]
@end example
@noindent
or by
@example
<?program ntpdc>
@end example
@noindent
Do not mix these styles within one configuration file.

Compound values and carefully constructed string values may also be
specified using XML syntax:
@example
<option-name>
   <sub-opt>...&lt;...&gt;...</sub-opt>
</option-name>
@end example
@noindent
yielding an @code{option-name.sub-opt} string value of
@example
"...<...>..."
@end example
@code{AutoOpts} does not track suboptions.  You simply note that it is a
hierarchicly valued option.  @code{AutoOpts} does provide a means for searching
the associated name/value pair list (see: optionFindValue).

The command line options relating to configuration and/or usage help are:

@subsubheading version (-)

Print the program version to standard out, optionally with licensing
information, then exit 0.  The optional argument specifies how much licensing
detail to provide.  The default is to print just the version.  The licensing infomation may be selected with an option argument.
Only the first letter of the argument is examined:

@table @samp
@item version
Only print the version.  This is the default.
@item copyright
Name the copyright usage licensing terms.
@item verbose
Print the full copyright usage licensing terms.
@end table

@node ntpdc exit status
@subsection ntpdc exit status

One of the following exit values will be returned:
@table @samp
@item 0 (EXIT_SUCCESS)
Successful program execution.
@item 1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
@item 66 (EX_NOINPUT)
A specified configuration file could not be loaded.
@item 70 (EX_SOFTWARE)
libopts had an internal operational error.  Please report
it to autogen-users@@lists.sourceforge.net.  Thank you.
@end table
@node ntpdc Usage
@subsection ntpdc Usage
@node ntpdc See Also
@subsection ntpdc See Also
@node ntpdc Authors
@subsection ntpdc Authors
@node ntpdc Bugs
@subsection ntpdc Bugs
OpenPOWER on IntegriCloud