2 @section Invoking ntpdc
4 @cindex vendor-specific NTPD control program
7 # EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
9 # It has been AutoGen-ed June 2, 2016 at 07:36:54 AM by AutoGen 5.18.5
10 # From the definitions ntpdc-opts.def
11 # and the template file agtexi-cmd.tpl
19 @code{ntpq(1ntpqmdoc)} instead - it can do everything
21 used to do, and it does so using a much more sane interface.
24 is a utility program used to query
25 @code{ntpd(1ntpdmdoc)}
27 current state and to request changes in that state.
28 It uses NTP mode 7 control message formats described in the source code.
30 be run either in interactive mode or controlled using command line
32 Extensive state and statistics information is available
36 In addition, nearly all the
37 configuration options which can be specified at startup using
38 ntpd's configuration file may also be specified at run time using
41 This section was generated by @strong{AutoGen},
42 using the @code{agtexi-cmd} template and the option descriptions for the @code{ntpdc} program.
43 This software is released under the NTP license, <http://ntp.org/license>.
46 * ntpdc usage:: ntpdc help/usage (@option{--help})
47 * ntpdc ipv4:: ipv4 option (-4)
48 * ntpdc ipv6:: ipv6 option (-6)
49 * ntpdc command:: command option (-c)
50 * ntpdc interactive:: interactive option (-i)
51 * ntpdc listpeers:: listpeers option (-l)
52 * ntpdc numeric:: numeric option (-n)
53 * ntpdc peers:: peers option (-p)
54 * ntpdc showpeers:: showpeers option (-s)
55 * ntpdc config:: presetting/configuring ntpdc
56 * ntpdc exit status:: exit status
58 * ntpdc See Also:: See Also
59 * ntpdc Authors:: Authors
64 @subsection ntpdc help/usage (@option{--help})
67 This is the automatically generated usage text for ntpdc.
69 The text printed is the same whether selected with the @code{help} option
70 (@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print
71 the usage text by passing it through a pager program.
72 @code{more-help} is disabled on platforms without a working
73 @code{fork(2)} function. The @code{PAGER} environment variable is
74 used to select the program, defaulting to @file{more}. Both will exit
75 with a status code of 0.
79 ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p8
80 Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
81 Flg Arg Option-Name Description
82 -4 no ipv4 Force IPv4 DNS name resolution
83 - prohibits the option 'ipv6'
84 -6 no ipv6 Force IPv6 DNS name resolution
85 - prohibits the option 'ipv4'
86 -c Str command run a command and exit
87 - may appear multiple times
88 -d no debug-level Increase debug verbosity level
89 - may appear multiple times
90 -D Num set-debug-level Set the debug verbosity level
91 - may appear multiple times
92 -i no interactive Force ntpq to operate in interactive mode
93 - prohibits these options:
98 -l no listpeers Print a list of the peers
99 - prohibits the option 'command'
100 -n no numeric numeric host addresses
101 -p no peers Print a list of the peers
102 - prohibits the option 'command'
103 -s no showpeers Show a list of the peers
104 - prohibits the option 'command'
105 opt version output version information and exit
106 -? no help display extended usage information and exit
107 -! no more-help extended usage information passed thru pager
108 -> opt save-opts save the option state to a config file
109 -< Str load-opts load options from a config file
110 - disabled as '--no-load-opts'
111 - may appear multiple times
113 Options are specified by doubled hyphens and their name or by a single
114 hyphen and the flag character.
117 The following option preset mechanisms are supported:
118 - reading file $HOME/.ntprc
119 - reading file ./.ntprc
120 - examining environment variables named NTPDC_*
122 Please send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org>
127 @subsection ipv4 option (-4)
130 This is the ``force ipv4 dns name resolution'' option.
133 This option has some usage constraints. It:
136 must not appear in combination with any of the following options:
140 Force DNS resolution of following host names on the command line
141 to the IPv4 namespace.
143 @subsection ipv6 option (-6)
146 This is the ``force ipv6 dns name resolution'' option.
149 This option has some usage constraints. It:
152 must not appear in combination with any of the following options:
156 Force DNS resolution of following host names on the command line
157 to the IPv6 namespace.
159 @subsection command option (-c)
160 @cindex ntpdc-command
162 This is the ``run a command and exit'' option.
163 This option takes a string argument @file{cmd}.
166 This option has some usage constraints. It:
169 may appear an unlimited number of times.
172 The following argument is interpreted as an interactive format command
173 and is added to the list of commands to be executed on the specified
175 @node ntpdc interactive
176 @subsection interactive option (-i)
177 @cindex ntpdc-interactive
179 This is the ``force ntpq to operate in interactive mode'' option.
182 This option has some usage constraints. It:
185 must not appear in combination with any of the following options:
186 command, listpeers, peers, showpeers.
189 Force ntpq to operate in interactive mode. Prompts will be written
190 to the standard output and commands read from the standard input.
191 @node ntpdc listpeers
192 @subsection listpeers option (-l)
193 @cindex ntpdc-listpeers
195 This is the ``print a list of the peers'' option.
198 This option has some usage constraints. It:
201 must not appear in combination with any of the following options:
205 Print a list of the peers known to the server as well as a summary of
206 their state. This is equivalent to the 'listpeers' interactive command.
208 @subsection numeric option (-n)
209 @cindex ntpdc-numeric
211 This is the ``numeric host addresses'' option.
212 Output all host addresses in dotted-quad numeric format rather than
213 converting to the canonical host names.
215 @subsection peers option (-p)
218 This is the ``print a list of the peers'' option.
221 This option has some usage constraints. It:
224 must not appear in combination with any of the following options:
228 Print a list of the peers known to the server as well as a summary
229 of their state. This is equivalent to the 'peers' interactive command.
230 @node ntpdc showpeers
231 @subsection showpeers option (-s)
232 @cindex ntpdc-showpeers
234 This is the ``show a list of the peers'' option.
237 This option has some usage constraints. It:
240 must not appear in combination with any of the following options:
244 Print a list of the peers known to the server as well as a summary
245 of their state. This is equivalent to the 'dmpeers' interactive command.
249 @subsection presetting/configuring ntpdc
251 Any option that is not marked as @i{not presettable} may be preset by
252 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
253 the options listed above in upper case and segmented with underscores.
254 The @code{NTPDC} variable will be tokenized and parsed like
255 the command line. The remaining variables are tested for existence and their
256 values are treated like option arguments.
260 @code{libopts} will search in 2 places for configuration files:
267 The environment variables @code{HOME}, and @code{PWD}
268 are expanded and replaced when @file{ntpdc} runs.
269 For any of these that are plain files, they are simply processed.
270 For any that are directories, then a file named @file{.ntprc} is searched for
271 within that directory and processed.
273 Configuration files may be in a wide variety of formats.
274 The basic format is an option name followed by a value (argument) on the
275 same line. Values may be separated from the option name with a colon,
276 equal sign or simply white space. Values may be continued across multiple
277 lines by escaping the newline with a backslash.
279 Multiple programs may also share the same initialization file.
280 Common options are collected at the top, followed by program specific
281 segments. The segments are separated by lines like:
291 Do not mix these styles within one configuration file.
293 Compound values and carefully constructed string values may also be
294 specified using XML syntax:
297 <sub-opt>...<...>...</sub-opt>
301 yielding an @code{option-name.sub-opt} string value of
305 @code{AutoOpts} does not track suboptions. You simply note that it is a
306 hierarchicly valued option. @code{AutoOpts} does provide a means for searching
307 the associated name/value pair list (see: optionFindValue).
309 The command line options relating to configuration and/or usage help are:
311 @subsubheading version (-)
313 Print the program version to standard out, optionally with licensing
314 information, then exit 0. The optional argument specifies how much licensing
315 detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
316 Only the first letter of the argument is examined:
320 Only print the version. This is the default.
322 Name the copyright usage licensing terms.
324 Print the full copyright usage licensing terms.
327 @node ntpdc exit status
328 @subsection ntpdc exit status
330 One of the following exit values will be returned:
332 @item 0 (EXIT_SUCCESS)
333 Successful program execution.
334 @item 1 (EXIT_FAILURE)
335 The operation failed or the command syntax was not valid.
336 @item 66 (EX_NOINPUT)
337 A specified configuration file could not be loaded.
338 @item 70 (EX_SOFTWARE)
339 libopts had an internal operational error. Please report
340 it to autogen-users@@lists.sourceforge.net. Thank you.
343 @subsection ntpdc Usage
345 @subsection ntpdc See Also
347 @subsection ntpdc Authors
349 @subsection ntpdc Bugs