invoke-ntpdc.texi revision 330567
1211946Sjchandra@node ntpdc Invocation
2211946Sjchandra@section Invoking ntpdc
3211946Sjchandra@pindex ntpdc
4211946Sjchandra@cindex vendor-specific NTPD control program
5211946Sjchandra@ignore
6211946Sjchandra#
7211946Sjchandra# EDIT THIS FILE WITH CAUTION  (invoke-ntpdc.texi)
8211946Sjchandra#
9211946Sjchandra# It has been AutoGen-ed  February 27, 2018 at 05:15:06 PM by AutoGen 5.18.5
10211946Sjchandra# From the definitions    ntpdc-opts.def
11211946Sjchandra# and the template file   agtexi-cmd.tpl
12211946Sjchandra@end ignore
13211946Sjchandra
14211946Sjchandra
15211946Sjchandra
16211946Sjchandra@code{ntpdc}
17211946Sjchandrais deprecated.
18211946SjchandraPlease use
19211946Sjchandra@code{ntpq(1ntpqmdoc)} instead - it can do everything
20211946Sjchandra@code{ntpdc}
21211946Sjchandraused to do, and it does so using a much more sane interface.
22211946Sjchandra
23211946Sjchandra@code{ntpdc}
24211946Sjchandrais a utility program used to query
25211946Sjchandra@code{ntpd(1ntpdmdoc)}
26211946Sjchandraabout its
27211946Sjchandracurrent state and to request changes in that state.
28211946SjchandraIt uses NTP mode 7 control message formats described in the source code.
29211946SjchandraThe program may
30211946Sjchandrabe run either in interactive mode or controlled using command line
31211946Sjchandraarguments.
32211946SjchandraExtensive state and statistics information is available
33211946Sjchandrathrough the
34211946Sjchandra@code{ntpdc}
35211946Sjchandrainterface.
36211946SjchandraIn addition, nearly all the
37211946Sjchandraconfiguration options which can be specified at startup using
38211946Sjchandrantpd's configuration file may also be specified at run time using
39211946Sjchandra@code{ntpdc}
40211946Sjchandra
41211946SjchandraThis section was generated by @strong{AutoGen},
42211946Sjchandrausing the @code{agtexi-cmd} template and the option descriptions for the @code{ntpdc} program.
43211946SjchandraThis software is released under the NTP license, <http://ntp.org/license>.
44211946Sjchandra
45211946Sjchandra@menu
46211946Sjchandra* ntpdc usage::                  ntpdc help/usage (@option{--help})
47211946Sjchandra* ntpdc ipv4::                   ipv4 option (-4)
48211946Sjchandra* ntpdc ipv6::                   ipv6 option (-6)
49211946Sjchandra* ntpdc command::                command option (-c)
50211946Sjchandra* ntpdc interactive::            interactive option (-i)
51211946Sjchandra* ntpdc listpeers::              listpeers option (-l)
52211946Sjchandra* ntpdc numeric::                numeric option (-n)
53211946Sjchandra* ntpdc peers::                  peers option (-p)
54211946Sjchandra* ntpdc showpeers::              showpeers option (-s)
55211946Sjchandra* ntpdc config::                 presetting/configuring ntpdc
56211946Sjchandra* ntpdc exit status::            exit status
57211946Sjchandra* ntpdc Usage::                  Usage
58211946Sjchandra* ntpdc See Also::               See Also
59211946Sjchandra* ntpdc Authors::                Authors
60211946Sjchandra* ntpdc Bugs::                   Bugs
61211946Sjchandra@end menu
62211946Sjchandra
63211946Sjchandra@node ntpdc usage
64211946Sjchandra@subsection ntpdc help/usage (@option{--help})
65211946Sjchandra@cindex ntpdc help
66211946Sjchandra
67211946SjchandraThis is the automatically generated usage text for ntpdc.
68211946Sjchandra
69211946SjchandraThe text printed is the same whether selected with the @code{help} option
70211946Sjchandra(@option{--help}) or the @code{more-help} option (@option{--more-help}).  @code{more-help} will print
71211946Sjchandrathe usage text by passing it through a pager program.
72211946Sjchandra@code{more-help} is disabled on platforms without a working
73211946Sjchandra@code{fork(2)} function.  The @code{PAGER} environment variable is
74211946Sjchandraused to select the program, defaulting to @file{more}.  Both will exit
75211946Sjchandrawith a status code of 0.
76211946Sjchandra
77211946Sjchandra@exampleindent 0
78211946Sjchandra@example
79211946Sjchandrantpdc - vendor-specific NTPD control program - Ver. 4.2.8p11
80211946SjchandraUsage:  ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
81211946Sjchandra  Flg Arg Option-Name    Description
82211946Sjchandra   -4 no  ipv4           Force IPv4 DNS name resolution
83211946Sjchandra                                - prohibits the option 'ipv6'
84211946Sjchandra   -6 no  ipv6           Force IPv6 DNS name resolution
85211946Sjchandra                                - prohibits the option 'ipv4'
86211946Sjchandra   -c Str command        run a command and exit
87211946Sjchandra                                - may appear multiple times
88211946Sjchandra   -d no  debug-level    Increase debug verbosity level
89211946Sjchandra                                - may appear multiple times
90211946Sjchandra   -D Num set-debug-level Set the debug verbosity level
91211946Sjchandra                                - may appear multiple times
92211946Sjchandra   -i no  interactive    Force ntpq to operate in interactive mode
93211946Sjchandra                                - prohibits these options:
94211946Sjchandra                                command
95211946Sjchandra                                listpeers
96211946Sjchandra                                peers
97211946Sjchandra                                showpeers
98211946Sjchandra   -l no  listpeers      Print a list of the peers
99211946Sjchandra                                - prohibits the option 'command'
100211946Sjchandra   -n no  numeric        numeric host addresses
101211946Sjchandra   -p no  peers          Print a list of the peers
102211946Sjchandra                                - prohibits the option 'command'
103211946Sjchandra   -s no  showpeers      Show a list of the peers
104211946Sjchandra                                - prohibits the option 'command'
105211946Sjchandra      opt version        output version information and exit
106211946Sjchandra   -? no  help           display extended usage information and exit
107211946Sjchandra   -! no  more-help      extended usage information passed thru pager
108211946Sjchandra   -> opt save-opts      save the option state to a config file
109211946Sjchandra   -< Str load-opts      load options from a config file
110211946Sjchandra                                - disabled as '--no-load-opts'
111211946Sjchandra                                - may appear multiple times
112211946Sjchandra
113211946SjchandraOptions are specified by doubled hyphens and their name or by a single
114211946Sjchandrahyphen and the flag character.
115211946Sjchandra
116211946Sjchandra
117211946SjchandraThe following option preset mechanisms are supported:
118211946Sjchandra - reading file $HOME/.ntprc
119211946Sjchandra - reading file ./.ntprc
120211946Sjchandra - examining environment variables named NTPDC_*
121211946Sjchandra
122211946SjchandraPlease send bug reports to:  <http://bugs.ntp.org, bugs@@ntp.org>
123211946Sjchandra@end example
124211946Sjchandra@exampleindent 4
125211946Sjchandra
126211946Sjchandra@node ntpdc ipv4
127211946Sjchandra@subsection ipv4 option (-4)
128211946Sjchandra@cindex ntpdc-ipv4
129211946Sjchandra
130211946SjchandraThis is the ``force ipv4 dns name resolution'' option.
131211946Sjchandra
132211946Sjchandra@noindent
133211946SjchandraThis option has some usage constraints.  It:
134211946Sjchandra@itemize @bullet
135211946Sjchandra@item
136211946Sjchandramust not appear in combination with any of the following options:
137211946Sjchandraipv6.
138211946Sjchandra@end itemize
139211946Sjchandra
140211946SjchandraForce DNS resolution of following host names on the command line
141211946Sjchandrato the IPv4 namespace.
142211946Sjchandra@node ntpdc ipv6
143211946Sjchandra@subsection ipv6 option (-6)
144211946Sjchandra@cindex ntpdc-ipv6
145211946Sjchandra
146211946SjchandraThis is the ``force ipv6 dns name resolution'' option.
147211946Sjchandra
148211946Sjchandra@noindent
149211946SjchandraThis option has some usage constraints.  It:
150211946Sjchandra@itemize @bullet
151211946Sjchandra@item
152211946Sjchandramust not appear in combination with any of the following options:
153211946Sjchandraipv4.
154211946Sjchandra@end itemize
155211946Sjchandra
156211946SjchandraForce DNS resolution of following host names on the command line
157211946Sjchandrato the IPv6 namespace.
158211946Sjchandra@node ntpdc command
159211946Sjchandra@subsection command option (-c)
160211946Sjchandra@cindex ntpdc-command
161211946Sjchandra
162211946SjchandraThis is the ``run a command and exit'' option.
163211946SjchandraThis option takes a string argument @file{cmd}.
164211946Sjchandra
165211946Sjchandra@noindent
166211946SjchandraThis option has some usage constraints.  It:
167211946Sjchandra@itemize @bullet
168211946Sjchandra@item
169211946Sjchandramay appear an unlimited number of times.
170211946Sjchandra@end itemize
171211946Sjchandra
172211946SjchandraThe following argument is interpreted as an interactive format command
173211946Sjchandraand is added to the list of commands to be executed on the specified
174211946Sjchandrahost(s).
175211946Sjchandra@node ntpdc interactive
176211946Sjchandra@subsection interactive option (-i)
177211946Sjchandra@cindex ntpdc-interactive
178211946Sjchandra
179211946SjchandraThis is the ``force ntpq to operate in interactive mode'' option.
180211946Sjchandra
181211946Sjchandra@noindent
182211946SjchandraThis option has some usage constraints.  It:
183211946Sjchandra@itemize @bullet
184211946Sjchandra@item
185211946Sjchandramust not appear in combination with any of the following options:
186211946Sjchandracommand, listpeers, peers, showpeers.
187211946Sjchandra@end itemize
188211946Sjchandra
189211946SjchandraForce ntpq to operate in interactive mode.  Prompts will be written
190211946Sjchandrato the standard output and commands read from the standard input.
191211946Sjchandra@node ntpdc listpeers
192211946Sjchandra@subsection listpeers option (-l)
193211946Sjchandra@cindex ntpdc-listpeers
194211946Sjchandra
195211946SjchandraThis is the ``print a list of the peers'' option.
196211946Sjchandra
197211946Sjchandra@noindent
198211946SjchandraThis option has some usage constraints.  It:
199211946Sjchandra@itemize @bullet
200211946Sjchandra@item
201211946Sjchandramust not appear in combination with any of the following options:
202211946Sjchandracommand.
203211946Sjchandra@end itemize
204211946Sjchandra
205211946SjchandraPrint a list of the peers known to the server as well as a summary of
206211946Sjchandratheir state. This is equivalent to the 'listpeers' interactive command.
207211946Sjchandra@node ntpdc numeric
208211946Sjchandra@subsection numeric option (-n)
209211946Sjchandra@cindex ntpdc-numeric
210211946Sjchandra
211211946SjchandraThis is the ``numeric host addresses'' option.
212211946SjchandraOutput all host addresses in dotted-quad numeric format rather than
213211946Sjchandraconverting to the canonical host names. 
214211946Sjchandra@node ntpdc peers
215211946Sjchandra@subsection peers option (-p)
216211946Sjchandra@cindex ntpdc-peers
217211946Sjchandra
218211946SjchandraThis is the ``print a list of the peers'' option.
219211946Sjchandra
220211946Sjchandra@noindent
221211946SjchandraThis option has some usage constraints.  It:
222211946Sjchandra@itemize @bullet
223211946Sjchandra@item
224211946Sjchandramust not appear in combination with any of the following options:
225211946Sjchandracommand.
226211946Sjchandra@end itemize
227211946Sjchandra
228211946SjchandraPrint a list of the peers known to the server as well as a summary
229211946Sjchandraof their state. This is equivalent to the 'peers' interactive command.
230211946Sjchandra@node ntpdc showpeers
231211946Sjchandra@subsection showpeers option (-s)
232211946Sjchandra@cindex ntpdc-showpeers
233211946Sjchandra
234211946SjchandraThis is the ``show a list of the peers'' option.
235211946Sjchandra
236211946Sjchandra@noindent
237211946SjchandraThis option has some usage constraints.  It:
238211946Sjchandra@itemize @bullet
239211946Sjchandra@item
240211946Sjchandramust not appear in combination with any of the following options:
241211946Sjchandracommand.
242211946Sjchandra@end itemize
243211946Sjchandra
244211946SjchandraPrint a list of the peers known to the server as well as a summary
245211946Sjchandraof their state. This is equivalent to the 'dmpeers' interactive command.
246211946Sjchandra
247211946Sjchandra
248211946Sjchandra@node ntpdc config
249211946Sjchandra@subsection presetting/configuring ntpdc
250211946Sjchandra
251211946SjchandraAny option that is not marked as @i{not presettable} may be preset by
252211946Sjchandraloading 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
253211946Sjchandrathe options listed above in upper case and segmented with underscores.
254211946SjchandraThe @code{NTPDC} variable will be tokenized and parsed like
255211946Sjchandrathe command line.  The remaining variables are tested for existence and their
256211946Sjchandravalues are treated like option arguments.
257211946Sjchandra
258211946Sjchandra
259211946Sjchandra@noindent
260211946Sjchandra@code{libopts} will search in 2 places for configuration files:
261211946Sjchandra@itemize @bullet
262211946Sjchandra@item
263211946Sjchandra$HOME
264211946Sjchandra@item
265211946Sjchandra$PWD
266211946Sjchandra@end itemize
267211946SjchandraThe environment variables @code{HOME}, and @code{PWD}
268211946Sjchandraare expanded and replaced when @file{ntpdc} runs.
269211946SjchandraFor any of these that are plain files, they are simply processed.
270211946SjchandraFor any that are directories, then a file named @file{.ntprc} is searched for
271211946Sjchandrawithin that directory and processed.
272211946Sjchandra
273211946SjchandraConfiguration files may be in a wide variety of formats.
274211946SjchandraThe basic format is an option name followed by a value (argument) on the
275211946Sjchandrasame line.  Values may be separated from the option name with a colon,
276211946Sjchandraequal sign or simply white space.  Values may be continued across multiple
277211946Sjchandralines by escaping the newline with a backslash.
278211946Sjchandra
279211946SjchandraMultiple programs may also share the same initialization file.
280211946SjchandraCommon options are collected at the top, followed by program specific
281211946Sjchandrasegments.  The segments are separated by lines like:
282211946Sjchandra@example
283211946Sjchandra[NTPDC]
284211946Sjchandra@end example
285211946Sjchandra@noindent
286211946Sjchandraor by
287211946Sjchandra@example
288211946Sjchandra<?program ntpdc>
289211946Sjchandra@end example
290211946Sjchandra@noindent
291211946SjchandraDo not mix these styles within one configuration file.
292211946Sjchandra
293211946SjchandraCompound values and carefully constructed string values may also be
294211946Sjchandraspecified using XML syntax:
295211946Sjchandra@example
296211946Sjchandra<option-name>
297211946Sjchandra   <sub-opt>...&lt;...&gt;...</sub-opt>
298211946Sjchandra</option-name>
299211946Sjchandra@end example
300211946Sjchandra@noindent
301211946Sjchandrayielding an @code{option-name.sub-opt} string value of
302211946Sjchandra@example
303211946Sjchandra"...<...>..."
304211946Sjchandra@end example
305211946Sjchandra@code{AutoOpts} does not track suboptions.  You simply note that it is a
306211946Sjchandrahierarchicly valued option.  @code{AutoOpts} does provide a means for searching
307211946Sjchandrathe associated name/value pair list (see: optionFindValue).
308211946Sjchandra
309211946SjchandraThe command line options relating to configuration and/or usage help are:
310211946Sjchandra
311211946Sjchandra@subsubheading version (-)
312211946Sjchandra
313211946SjchandraPrint the program version to standard out, optionally with licensing
314211946Sjchandrainformation, then exit 0.  The optional argument specifies how much licensing
315211946Sjchandradetail to provide.  The default is to print just the version.  The licensing infomation may be selected with an option argument.
316211946SjchandraOnly the first letter of the argument is examined:
317211946Sjchandra
318211946Sjchandra@table @samp
319211946Sjchandra@item version
320211946SjchandraOnly print the version.  This is the default.
321211946Sjchandra@item copyright
322211946SjchandraName the copyright usage licensing terms.
323211946Sjchandra@item verbose
324211946SjchandraPrint the full copyright usage licensing terms.
325211946Sjchandra@end table
326211946Sjchandra
327211946Sjchandra@node ntpdc exit status
328211946Sjchandra@subsection ntpdc exit status
329211946Sjchandra
330211946SjchandraOne of the following exit values will be returned:
331211946Sjchandra@table @samp
332211946Sjchandra@item 0 (EXIT_SUCCESS)
333211946SjchandraSuccessful program execution.
334211946Sjchandra@item 1 (EXIT_FAILURE)
335211946SjchandraThe operation failed or the command syntax was not valid.
336211946Sjchandra@item 66 (EX_NOINPUT)
337211946SjchandraA specified configuration file could not be loaded.
338211946Sjchandra@item 70 (EX_SOFTWARE)
339211946Sjchandralibopts had an internal operational error.  Please report
340211946Sjchandrait to autogen-users@@lists.sourceforge.net.  Thank you.
341211946Sjchandra@end table
342211946Sjchandra@node ntpdc Usage
343211946Sjchandra@subsection ntpdc Usage
344211946Sjchandra@node ntpdc See Also
345211946Sjchandra@subsection ntpdc See Also
346211946Sjchandra@node ntpdc Authors
347211946Sjchandra@subsection ntpdc Authors
348211946Sjchandra@node ntpdc Bugs
349211946Sjchandra@subsection ntpdc Bugs
350211946Sjchandra