1178479Sjb@node ntpdc Invocation 2178479Sjb@section Invoking ntpdc 3178479Sjb@pindex ntpdc 4178479Sjb@cindex vendor-specific NTPD control program 5178479Sjb@ignore 6178479Sjb# 7178479Sjb# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi) 8178479Sjb# 9178479Sjb# It has been AutoGen-ed February 27, 2018 at 05:15:06 PM by AutoGen 5.18.5 10178479Sjb# From the definitions ntpdc-opts.def 11178479Sjb# and the template file agtexi-cmd.tpl 12178479Sjb@end ignore 13178479Sjb 14178479Sjb 15178479Sjb 16178479Sjb@code{ntpdc} 17178479Sjbis deprecated. 18178479SjbPlease use 19178479Sjb@code{ntpq(1ntpqmdoc)} instead - it can do everything 20178479Sjb@code{ntpdc} 21210767Srpauloused to do, and it does so using a much more sane interface. 22178479Sjb 23210767Srpaulo@code{ntpdc} 24178479Sjbis a utility program used to query 25268578Srpaulo@code{ntpd(1ntpdmdoc)} 26268578Srpauloabout its 27297129Spfgcurrent state and to request changes in that state. 28268578SrpauloIt uses NTP mode 7 control message formats described in the source code. 29178479SjbThe program may 30178479Sjbbe run either in interactive mode or controlled using command line 31297077Smavarguments. 32178479SjbExtensive state and statistics information is available 33178479Sjbthrough the 34178479Sjb@code{ntpdc} 35178479Sjbinterface. 36178479SjbIn addition, nearly all the 37178479Sjbconfiguration options which can be specified at startup using 38178559Sjbntpd's configuration file may also be specified at run time using 39178559Sjb@code{ntpdc} 40178559Sjb 41178559SjbThis section was generated by @strong{AutoGen}, 42178559Sjbusing the @code{agtexi-cmd} template and the option descriptions for the @code{ntpdc} program. 43178479SjbThis software is released under the NTP license, <http://ntp.org/license>. 44178479Sjb 45297077Smav@menu 46178479Sjb* ntpdc usage:: ntpdc help/usage (@option{--help}) 47178559Sjb* ntpdc ipv4:: ipv4 option (-4) 48178479Sjb* ntpdc ipv6:: ipv6 option (-6) 49178479Sjb* ntpdc command:: command option (-c) 50178479Sjb* ntpdc interactive:: interactive option (-i) 51178479Sjb* ntpdc listpeers:: listpeers option (-l) 52178479Sjb* ntpdc numeric:: numeric option (-n) 53178479Sjb* ntpdc peers:: peers option (-p) 54178479Sjb* ntpdc showpeers:: showpeers option (-s) 55297077Smav* ntpdc config:: presetting/configuring ntpdc 56178559Sjb* ntpdc exit status:: exit status 57268578Srpaulo* ntpdc Usage:: Usage 58178559Sjb* ntpdc See Also:: See Also 59178479Sjb* ntpdc Authors:: Authors 60178479Sjb* ntpdc Bugs:: Bugs 61178479Sjb@end menu 62178479Sjb 63178479Sjb@node ntpdc usage 64178479Sjb@subsection ntpdc help/usage (@option{--help}) 65178479Sjb@cindex ntpdc help 66178479Sjb 67178479SjbThis is the automatically generated usage text for ntpdc. 68178479Sjb 69178479SjbThe text printed is the same whether selected with the @code{help} option 70178479Sjb(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print 71178479Sjbthe usage text by passing it through a pager program. 72178479Sjb@code{more-help} is disabled on platforms without a working 73178479Sjb@code{fork(2)} function. The @code{PAGER} environment variable is 74178479Sjbused to select the program, defaulting to @file{more}. Both will exit 75178479Sjbwith a status code of 0. 76178479Sjb 77178479Sjb@exampleindent 0 78178479Sjb@example 79178479Sjbntpdc - vendor-specific NTPD control program - Ver. 4.2.8p11 80178479SjbUsage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...] 81178479Sjb Flg Arg Option-Name Description 82178479Sjb -4 no ipv4 Force IPv4 DNS name resolution 83210767Srpaulo - prohibits the option 'ipv6' 84210767Srpaulo -6 no ipv6 Force IPv6 DNS name resolution 85210767Srpaulo - prohibits the option 'ipv4' 86210767Srpaulo -c Str command run a command and exit 87178559Sjb - may appear multiple times 88178479Sjb -d no debug-level Increase debug verbosity level 89178479Sjb - may appear multiple times 90178479Sjb -D Num set-debug-level Set the debug verbosity level 91178479Sjb - may appear multiple times 92178479Sjb -i no interactive Force ntpq to operate in interactive mode 93210425Savg - prohibits these options: 94210425Savg command 95210425Savg listpeers 96210425Savg peers 97210425Savg showpeers 98210425Savg -l no listpeers Print a list of the peers 99210425Savg - prohibits the option 'command' 100210425Savg -n no numeric numeric host addresses 101178479Sjb -p no peers Print a list of the peers 102178479Sjb - prohibits the option 'command' 103178479Sjb -s no showpeers Show a list of the peers 104178479Sjb - prohibits the option 'command' 105178479Sjb opt version output version information and exit 106178479Sjb -? no help display extended usage information and exit 107178479Sjb -! no more-help extended usage information passed thru pager 108178479Sjb -> opt save-opts save the option state to a config file 109178479Sjb -< Str load-opts load options from a config file 110178479Sjb - disabled as '--no-load-opts' 111178479Sjb - may appear multiple times 112178559Sjb 113178479SjbOptions are specified by doubled hyphens and their name or by a single 114178479Sjbhyphen and the flag character. 115210425Savg 116178559Sjb 117210425SavgThe following option preset mechanisms are supported: 118210425Savg - reading file $HOME/.ntprc 119210425Savg - reading file ./.ntprc 120210425Savg - examining environment variables named NTPDC_* 121178559Sjb 122178559SjbPlease send bug reports to: <http://bugs.ntp.org, bugs@@ntp.org> 123178559Sjb@end example 124178479Sjb@exampleindent 4 125178479Sjb 126178479Sjb@node ntpdc ipv4 127178479Sjb@subsection ipv4 option (-4) 128178479Sjb@cindex ntpdc-ipv4 129178479Sjb 130178479SjbThis is the ``force ipv4 dns name resolution'' option. 131178479Sjb 132178479Sjb@noindent 133210767SrpauloThis option has some usage constraints. It: 134210767Srpaulo@itemize @bullet 135210767Srpaulo@item 136210767Srpaulomust not appear in combination with any of the following options: 137178559Sjbipv6. 138178479Sjb@end itemize 139178479Sjb 140178479SjbForce DNS resolution of following host names on the command line 141178479Sjbto the IPv4 namespace. 142178479Sjb@node ntpdc ipv6 143210425Savg@subsection ipv6 option (-6) 144210425Savg@cindex ntpdc-ipv6 145210425Savg 146210425SavgThis is the ``force ipv6 dns name resolution'' option. 147210425Savg 148210425Savg@noindent 149210425SavgThis option has some usage constraints. It: 150210425Savg@itemize @bullet 151178479Sjb@item 152178479Sjbmust not appear in combination with any of the following options: 153178479Sjbipv4. 154178479Sjb@end itemize 155178479Sjb 156178479SjbForce DNS resolution of following host names on the command line 157178479Sjbto the IPv6 namespace. 158178479Sjb@node ntpdc command 159178479Sjb@subsection command option (-c) 160178479Sjb@cindex ntpdc-command 161178479Sjb 162178559SjbThis is the ``run a command and exit'' option. 163178479SjbThis option takes a string argument @file{cmd}. 164210425Savg 165178559Sjb@noindent 166210425SavgThis option has some usage constraints. It: 167210425Savg@itemize @bullet 168210425Savg@item 169210425Savgmay appear an unlimited number of times. 170178559Sjb@end itemize 171178559Sjb 172178559SjbThe following argument is interpreted as an interactive format command 173178479Sjband is added to the list of commands to be executed on the specified 174178479Sjbhost(s). 175178479Sjb@node ntpdc interactive 176178479Sjb@subsection interactive option (-i) 177178479Sjb@cindex ntpdc-interactive 178178479Sjb 179178479SjbThis is the ``force ntpq to operate in interactive mode'' option. 180178479Sjb 181178479Sjb@noindent 182178479SjbThis option has some usage constraints. It: 183178479Sjb@itemize @bullet 184178479Sjb@item 185178479Sjbmust not appear in combination with any of the following options: 186178479Sjbcommand, listpeers, peers, showpeers. 187178479Sjb@end itemize 188178479Sjb 189178479SjbForce ntpq to operate in interactive mode. Prompts will be written 190178479Sjbto the standard output and commands read from the standard input. 191178479Sjb@node ntpdc listpeers 192178479Sjb@subsection listpeers option (-l) 193178479Sjb@cindex ntpdc-listpeers 194178479Sjb 195178479SjbThis is the ``print a list of the peers'' option. 196178479Sjb 197178479Sjb@noindent 198178479SjbThis option has some usage constraints. It: 199178479Sjb@itemize @bullet 200178479Sjb@item 201178479Sjbmust not appear in combination with any of the following options: 202178479Sjbcommand. 203178479Sjb@end itemize 204178479Sjb 205178479SjbPrint a list of the peers known to the server as well as a summary of 206178479Sjbtheir state. This is equivalent to the 'listpeers' interactive command. 207178479Sjb@node ntpdc numeric 208178479Sjb@subsection numeric option (-n) 209178479Sjb@cindex ntpdc-numeric 210178479Sjb 211178479SjbThis is the ``numeric host addresses'' option. 212178479SjbOutput all host addresses in dotted-quad numeric format rather than 213178479Sjbconverting to the canonical host names. 214178479Sjb@node ntpdc peers 215178479Sjb@subsection peers option (-p) 216178479Sjb@cindex ntpdc-peers 217178479Sjb 218178479SjbThis is the ``print a list of the peers'' option. 219178479Sjb 220178479Sjb@noindent 221178479SjbThis option has some usage constraints. It: 222178479Sjb@itemize @bullet 223178479Sjb@item 224178479Sjbmust not appear in combination with any of the following options: 225178479Sjbcommand. 226178479Sjb@end itemize 227178479Sjb 228178479SjbPrint a list of the peers known to the server as well as a summary 229178479Sjbof their state. This is equivalent to the 'peers' interactive command. 230178479Sjb@node ntpdc showpeers 231178479Sjb@subsection showpeers option (-s) 232178479Sjb@cindex ntpdc-showpeers 233178479Sjb 234178479SjbThis is the ``show a list of the peers'' option. 235178479Sjb 236178479Sjb@noindent 237178479SjbThis option has some usage constraints. It: 238178479Sjb@itemize @bullet 239178479Sjb@item 240178479Sjbmust not appear in combination with any of the following options: 241178479Sjbcommand. 242178479Sjb@end itemize 243178479Sjb 244178479SjbPrint a list of the peers known to the server as well as a summary 245178479Sjbof their state. This is equivalent to the 'dmpeers' interactive command. 246178479Sjb 247178479Sjb 248178479Sjb@node ntpdc config 249178479Sjb@subsection presetting/configuring ntpdc 250178479Sjb 251178479SjbAny option that is not marked as @i{not presettable} may be preset by 252178479Sjbloading 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 253178479Sjbthe options listed above in upper case and segmented with underscores. 254178479SjbThe @code{NTPDC} variable will be tokenized and parsed like 255178479Sjbthe command line. The remaining variables are tested for existence and their 256178479Sjbvalues are treated like option arguments. 257178479Sjb 258178479Sjb 259178479Sjb@noindent 260178479Sjb@code{libopts} will search in 2 places for configuration files: 261178479Sjb@itemize @bullet 262178479Sjb@item 263178479Sjb$HOME 264178479Sjb@item 265178479Sjb$PWD 266178479Sjb@end itemize 267178479SjbThe environment variables @code{HOME}, and @code{PWD} 268178479Sjbare expanded and replaced when @file{ntpdc} runs. 269178479SjbFor any of these that are plain files, they are simply processed. 270178479SjbFor any that are directories, then a file named @file{.ntprc} is searched for 271178479Sjbwithin that directory and processed. 272178479Sjb 273178479SjbConfiguration files may be in a wide variety of formats. 274178479SjbThe basic format is an option name followed by a value (argument) on the 275178479Sjbsame line. Values may be separated from the option name with a colon, 276178479Sjbequal sign or simply white space. Values may be continued across multiple 277178479Sjblines by escaping the newline with a backslash. 278178479Sjb 279178479SjbMultiple programs may also share the same initialization file. 280178479SjbCommon options are collected at the top, followed by program specific 281178479Sjbsegments. The segments are separated by lines like: 282178479Sjb@example 283178479Sjb[NTPDC] 284178479Sjb@end example 285178479Sjb@noindent 286178479Sjbor by 287178479Sjb@example 288178479Sjb<?program ntpdc> 289178479Sjb@end example 290178479Sjb@noindent 291178479SjbDo not mix these styles within one configuration file. 292178479Sjb 293178479SjbCompound values and carefully constructed string values may also be 294178479Sjbspecified using XML syntax: 295178479Sjb@example 296178479Sjb<option-name> 297178479Sjb <sub-opt>...<...>...</sub-opt> 298178479Sjb</option-name> 299178479Sjb@end example 300178479Sjb@noindent 301178479Sjbyielding an @code{option-name.sub-opt} string value of 302178479Sjb@example 303178479Sjb"...<...>..." 304178479Sjb@end example 305178479Sjb@code{AutoOpts} does not track suboptions. You simply note that it is a 306178479Sjbhierarchicly valued option. @code{AutoOpts} does provide a means for searching 307178479Sjbthe associated name/value pair list (see: optionFindValue). 308178479Sjb 309178479SjbThe command line options relating to configuration and/or usage help are: 310178479Sjb 311178479Sjb@subsubheading version (-) 312178479Sjb 313178479SjbPrint the program version to standard out, optionally with licensing 314178479Sjbinformation, then exit 0. The optional argument specifies how much licensing 315178479Sjbdetail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument. 316178479SjbOnly the first letter of the argument is examined: 317178479Sjb 318178479Sjb@table @samp 319178479Sjb@item version 320178479SjbOnly print the version. This is the default. 321178479Sjb@item copyright 322178479SjbName the copyright usage licensing terms. 323178479Sjb@item verbose 324178479SjbPrint the full copyright usage licensing terms. 325178479Sjb@end table 326178479Sjb 327178479Sjb@node ntpdc exit status 328178479Sjb@subsection ntpdc exit status 329178479Sjb 330178479SjbOne of the following exit values will be returned: 331178479Sjb@table @samp 332178479Sjb@item 0 (EXIT_SUCCESS) 333178479SjbSuccessful program execution. 334178479Sjb@item 1 (EXIT_FAILURE) 335178479SjbThe operation failed or the command syntax was not valid. 336178479Sjb@item 66 (EX_NOINPUT) 337178479SjbA specified configuration file could not be loaded. 338178479Sjb@item 70 (EX_SOFTWARE) 339178479Sjblibopts had an internal operational error. Please report 340178479Sjbit to autogen-users@@lists.sourceforge.net. Thank you. 341178479Sjb@end table 342178479Sjb@node ntpdc Usage 343178479Sjb@subsection ntpdc Usage 344178479Sjb@node ntpdc See Also 345178479Sjb@subsection ntpdc See Also 346178479Sjb@node ntpdc Authors 347178479Sjb@subsection ntpdc Authors 348178479Sjb@node ntpdc Bugs 349178479Sjb@subsection ntpdc Bugs 350178479Sjb