18585484eSchristos@node ntpdc Invocation 28585484eSchristos@section Invoking ntpdc 38585484eSchristos@pindex ntpdc 48585484eSchristos@cindex vendor-specific NTPD control program 58585484eSchristos@ignore 68585484eSchristos# 78585484eSchristos# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi) 88585484eSchristos# 9*897be3a4Schristos# It has been AutoGen-ed May 25, 2024 at 12:04:17 AM by AutoGen 5.18.16 108585484eSchristos# From the definitions ntpdc-opts.def 118585484eSchristos# and the template file agtexi-cmd.tpl 128585484eSchristos@end ignore 138585484eSchristos 148585484eSchristos 158585484eSchristos 168585484eSchristos@code{ntpdc} 17b8ecfcfeSchristosis deprecated. 18b8ecfcfeSchristosPlease use 19b8ecfcfeSchristos@code{ntpq(1ntpqmdoc)} instead - it can do everything 20b8ecfcfeSchristos@code{ntpdc} 21b8ecfcfeSchristosused to do, and it does so using a much more sane interface. 22b8ecfcfeSchristos 23b8ecfcfeSchristos@code{ntpdc} 248585484eSchristosis a utility program used to query 258585484eSchristos@code{ntpd(1ntpdmdoc)} 268585484eSchristosabout its 278585484eSchristoscurrent state and to request changes in that state. 288585484eSchristosIt uses NTP mode 7 control message formats described in the source code. 298585484eSchristosThe program may 308585484eSchristosbe run either in interactive mode or controlled using command line 318585484eSchristosarguments. 328585484eSchristosExtensive state and statistics information is available 338585484eSchristosthrough the 348585484eSchristos@code{ntpdc} 358585484eSchristosinterface. 368585484eSchristosIn addition, nearly all the 378585484eSchristosconfiguration options which can be specified at startup using 388585484eSchristosntpd's configuration file may also be specified at run time using 398585484eSchristos@code{ntpdc} 408585484eSchristos 418585484eSchristosThis section was generated by @strong{AutoGen}, 428585484eSchristosusing the @code{agtexi-cmd} template and the option descriptions for the @code{ntpdc} program. 438585484eSchristosThis software is released under the NTP license, <http://ntp.org/license>. 448585484eSchristos 458585484eSchristos@menu 468585484eSchristos* ntpdc usage:: ntpdc help/usage (@option{--help}) 478585484eSchristos* ntpdc ipv4:: ipv4 option (-4) 488585484eSchristos* ntpdc ipv6:: ipv6 option (-6) 498585484eSchristos* ntpdc command:: command option (-c) 508585484eSchristos* ntpdc interactive:: interactive option (-i) 518585484eSchristos* ntpdc listpeers:: listpeers option (-l) 528585484eSchristos* ntpdc numeric:: numeric option (-n) 538585484eSchristos* ntpdc peers:: peers option (-p) 548585484eSchristos* ntpdc showpeers:: showpeers option (-s) 55*897be3a4Schristos* ntpdc unconnected:: unconnected option (-u) 568585484eSchristos* ntpdc config:: presetting/configuring ntpdc 578585484eSchristos* ntpdc exit status:: exit status 588585484eSchristos* ntpdc Usage:: Usage 598585484eSchristos* ntpdc See Also:: See Also 608585484eSchristos* ntpdc Authors:: Authors 618585484eSchristos* ntpdc Bugs:: Bugs 628585484eSchristos@end menu 638585484eSchristos 648585484eSchristos@node ntpdc usage 658585484eSchristos@subsection ntpdc help/usage (@option{--help}) 668585484eSchristos@cindex ntpdc help 678585484eSchristos 688585484eSchristosThis is the automatically generated usage text for ntpdc. 698585484eSchristos 708585484eSchristosThe text printed is the same whether selected with the @code{help} option 718585484eSchristos(@option{--help}) or the @code{more-help} option (@option{--more-help}). @code{more-help} will print 728585484eSchristosthe usage text by passing it through a pager program. 738585484eSchristos@code{more-help} is disabled on platforms without a working 748585484eSchristos@code{fork(2)} function. The @code{PAGER} environment variable is 758585484eSchristosused to select the program, defaulting to @file{more}. Both will exit 768585484eSchristoswith a status code of 0. 778585484eSchristos 788585484eSchristos@exampleindent 0 798585484eSchristos@example 80*897be3a4Schristosntpdc - vendor-specific NTPD control program - Ver. 4.2.8p18 818585484eSchristosUsage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...] 828585484eSchristos Flg Arg Option-Name Description 838585484eSchristos -4 no ipv4 Force IPv4 DNS name resolution 848585484eSchristos - prohibits the option 'ipv6' 858585484eSchristos -6 no ipv6 Force IPv6 DNS name resolution 868585484eSchristos - prohibits the option 'ipv4' 878585484eSchristos -c Str command run a command and exit 888585484eSchristos - may appear multiple times 898585484eSchristos -d no debug-level Increase debug verbosity level 908585484eSchristos - may appear multiple times 918585484eSchristos -D Num set-debug-level Set the debug verbosity level 928585484eSchristos - may appear multiple times 938585484eSchristos -i no interactive Force ntpq to operate in interactive mode 948585484eSchristos - prohibits these options: 958585484eSchristos command 968585484eSchristos listpeers 978585484eSchristos peers 988585484eSchristos showpeers 998585484eSchristos -l no listpeers Print a list of the peers 1008585484eSchristos - prohibits the option 'command' 1018585484eSchristos -n no numeric numeric host addresses 1028585484eSchristos -p no peers Print a list of the peers 1038585484eSchristos - prohibits the option 'command' 1048585484eSchristos -s no showpeers Show a list of the peers 1058585484eSchristos - prohibits the option 'command' 106*897be3a4Schristos -u no unconnected Use unconnected UDP to communicate with ntpd (default on Windows) 1078585484eSchristos opt version output version information and exit 1088585484eSchristos -? no help display extended usage information and exit 1098585484eSchristos -! no more-help extended usage information passed thru pager 1108585484eSchristos -> opt save-opts save the option state to a config file 1118585484eSchristos -< Str load-opts load options from a config file 1128585484eSchristos - disabled as '--no-load-opts' 1138585484eSchristos - may appear multiple times 1148585484eSchristos 1158585484eSchristosOptions are specified by doubled hyphens and their name or by a single 1168585484eSchristoshyphen and the flag character. 1178585484eSchristos 1188585484eSchristos 1198585484eSchristosThe following option preset mechanisms are supported: 1208585484eSchristos - reading file $HOME/.ntprc 1218585484eSchristos - reading file ./.ntprc 1228585484eSchristos - examining environment variables named NTPDC_* 1238585484eSchristos 124*897be3a4SchristosPlease send bug reports to: <https://bugs.ntp.org, bugs@@ntp.org> 1258585484eSchristos@end example 1268585484eSchristos@exampleindent 4 1278585484eSchristos 1288585484eSchristos@node ntpdc ipv4 1298585484eSchristos@subsection ipv4 option (-4) 1308585484eSchristos@cindex ntpdc-ipv4 1318585484eSchristos 1328585484eSchristosThis is the ``force ipv4 dns name resolution'' option. 1338585484eSchristos 1348585484eSchristos@noindent 1358585484eSchristosThis option has some usage constraints. It: 1368585484eSchristos@itemize @bullet 1378585484eSchristos@item 1388585484eSchristosmust not appear in combination with any of the following options: 1398585484eSchristosipv6. 1408585484eSchristos@end itemize 1418585484eSchristos 1428585484eSchristosForce DNS resolution of following host names on the command line 1438585484eSchristosto the IPv4 namespace. 1448585484eSchristos@node ntpdc ipv6 1458585484eSchristos@subsection ipv6 option (-6) 1468585484eSchristos@cindex ntpdc-ipv6 1478585484eSchristos 1488585484eSchristosThis is the ``force ipv6 dns name resolution'' option. 1498585484eSchristos 1508585484eSchristos@noindent 1518585484eSchristosThis option has some usage constraints. It: 1528585484eSchristos@itemize @bullet 1538585484eSchristos@item 1548585484eSchristosmust not appear in combination with any of the following options: 1558585484eSchristosipv4. 1568585484eSchristos@end itemize 1578585484eSchristos 1588585484eSchristosForce DNS resolution of following host names on the command line 1598585484eSchristosto the IPv6 namespace. 1608585484eSchristos@node ntpdc command 1618585484eSchristos@subsection command option (-c) 1628585484eSchristos@cindex ntpdc-command 1638585484eSchristos 1648585484eSchristosThis is the ``run a command and exit'' option. 1658585484eSchristosThis option takes a string argument @file{cmd}. 1668585484eSchristos 1678585484eSchristos@noindent 1688585484eSchristosThis option has some usage constraints. It: 1698585484eSchristos@itemize @bullet 1708585484eSchristos@item 1718585484eSchristosmay appear an unlimited number of times. 1728585484eSchristos@end itemize 1738585484eSchristos 1748585484eSchristosThe following argument is interpreted as an interactive format command 1758585484eSchristosand is added to the list of commands to be executed on the specified 1768585484eSchristoshost(s). 1778585484eSchristos@node ntpdc interactive 1788585484eSchristos@subsection interactive option (-i) 1798585484eSchristos@cindex ntpdc-interactive 1808585484eSchristos 1818585484eSchristosThis is the ``force ntpq to operate in interactive mode'' option. 1828585484eSchristos 1838585484eSchristos@noindent 1848585484eSchristosThis option has some usage constraints. It: 1858585484eSchristos@itemize @bullet 1868585484eSchristos@item 1878585484eSchristosmust not appear in combination with any of the following options: 1888585484eSchristoscommand, listpeers, peers, showpeers. 1898585484eSchristos@end itemize 1908585484eSchristos 1918585484eSchristosForce ntpq to operate in interactive mode. Prompts will be written 1928585484eSchristosto the standard output and commands read from the standard input. 1938585484eSchristos@node ntpdc listpeers 1948585484eSchristos@subsection listpeers option (-l) 1958585484eSchristos@cindex ntpdc-listpeers 1968585484eSchristos 1978585484eSchristosThis is the ``print a list of the peers'' option. 1988585484eSchristos 1998585484eSchristos@noindent 2008585484eSchristosThis option has some usage constraints. It: 2018585484eSchristos@itemize @bullet 2028585484eSchristos@item 2038585484eSchristosmust not appear in combination with any of the following options: 2048585484eSchristoscommand. 2058585484eSchristos@end itemize 2068585484eSchristos 2078585484eSchristosPrint a list of the peers known to the server as well as a summary of 2088585484eSchristostheir state. This is equivalent to the 'listpeers' interactive command. 2098585484eSchristos@node ntpdc numeric 2108585484eSchristos@subsection numeric option (-n) 2118585484eSchristos@cindex ntpdc-numeric 2128585484eSchristos 2138585484eSchristosThis is the ``numeric host addresses'' option. 2148585484eSchristosOutput all host addresses in dotted-quad numeric format rather than 2158585484eSchristosconverting to the canonical host names. 2168585484eSchristos@node ntpdc peers 2178585484eSchristos@subsection peers option (-p) 2188585484eSchristos@cindex ntpdc-peers 2198585484eSchristos 2208585484eSchristosThis is the ``print a list of the peers'' option. 2218585484eSchristos 2228585484eSchristos@noindent 2238585484eSchristosThis option has some usage constraints. It: 2248585484eSchristos@itemize @bullet 2258585484eSchristos@item 2268585484eSchristosmust not appear in combination with any of the following options: 2278585484eSchristoscommand. 2288585484eSchristos@end itemize 2298585484eSchristos 2308585484eSchristosPrint a list of the peers known to the server as well as a summary 2318585484eSchristosof their state. This is equivalent to the 'peers' interactive command. 2328585484eSchristos@node ntpdc showpeers 2338585484eSchristos@subsection showpeers option (-s) 2348585484eSchristos@cindex ntpdc-showpeers 2358585484eSchristos 2368585484eSchristosThis is the ``show a list of the peers'' option. 2378585484eSchristos 2388585484eSchristos@noindent 2398585484eSchristosThis option has some usage constraints. It: 2408585484eSchristos@itemize @bullet 2418585484eSchristos@item 2428585484eSchristosmust not appear in combination with any of the following options: 2438585484eSchristoscommand. 2448585484eSchristos@end itemize 2458585484eSchristos 2468585484eSchristosPrint a list of the peers known to the server as well as a summary 2478585484eSchristosof their state. This is equivalent to the 'dmpeers' interactive command. 248*897be3a4Schristos@node ntpdc unconnected 249*897be3a4Schristos@subsection unconnected option (-u) 250*897be3a4Schristos@cindex ntpdc-unconnected 251*897be3a4Schristos 252*897be3a4SchristosThis is the ``use unconnected udp to communicate with ntpd (default on windows)'' option. 253*897be3a4SchristosOpen an unconnected UDP association to ntpd (the default 254*897be3a4Schristoson Windows). 2558585484eSchristos 2568585484eSchristos 2578585484eSchristos@node ntpdc config 2588585484eSchristos@subsection presetting/configuring ntpdc 2598585484eSchristos 2608585484eSchristosAny option that is not marked as @i{not presettable} may be preset by 2618585484eSchristosloading 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 2628585484eSchristosthe options listed above in upper case and segmented with underscores. 2638585484eSchristosThe @code{NTPDC} variable will be tokenized and parsed like 2648585484eSchristosthe command line. The remaining variables are tested for existence and their 2658585484eSchristosvalues are treated like option arguments. 2668585484eSchristos 2678585484eSchristos 2688585484eSchristos@noindent 2698585484eSchristos@code{libopts} will search in 2 places for configuration files: 2708585484eSchristos@itemize @bullet 2718585484eSchristos@item 2728585484eSchristos$HOME 2738585484eSchristos@item 2748585484eSchristos$PWD 2758585484eSchristos@end itemize 2768585484eSchristosThe environment variables @code{HOME}, and @code{PWD} 2778585484eSchristosare expanded and replaced when @file{ntpdc} runs. 2788585484eSchristosFor any of these that are plain files, they are simply processed. 2798585484eSchristosFor any that are directories, then a file named @file{.ntprc} is searched for 2808585484eSchristoswithin that directory and processed. 2818585484eSchristos 2828585484eSchristosConfiguration files may be in a wide variety of formats. 2838585484eSchristosThe basic format is an option name followed by a value (argument) on the 2848585484eSchristossame line. Values may be separated from the option name with a colon, 2858585484eSchristosequal sign or simply white space. Values may be continued across multiple 2868585484eSchristoslines by escaping the newline with a backslash. 2878585484eSchristos 2888585484eSchristosMultiple programs may also share the same initialization file. 2898585484eSchristosCommon options are collected at the top, followed by program specific 2908585484eSchristossegments. The segments are separated by lines like: 2918585484eSchristos@example 2928585484eSchristos[NTPDC] 2938585484eSchristos@end example 2948585484eSchristos@noindent 2958585484eSchristosor by 2968585484eSchristos@example 2978585484eSchristos<?program ntpdc> 2988585484eSchristos@end example 2998585484eSchristos@noindent 3008585484eSchristosDo not mix these styles within one configuration file. 3018585484eSchristos 3028585484eSchristosCompound values and carefully constructed string values may also be 3038585484eSchristosspecified using XML syntax: 3048585484eSchristos@example 3058585484eSchristos<option-name> 3068585484eSchristos <sub-opt>...<...>...</sub-opt> 3078585484eSchristos</option-name> 3088585484eSchristos@end example 3098585484eSchristos@noindent 3108585484eSchristosyielding an @code{option-name.sub-opt} string value of 3118585484eSchristos@example 3128585484eSchristos"...<...>..." 3138585484eSchristos@end example 3148585484eSchristos@code{AutoOpts} does not track suboptions. You simply note that it is a 3158585484eSchristoshierarchicly valued option. @code{AutoOpts} does provide a means for searching 3168585484eSchristosthe associated name/value pair list (see: optionFindValue). 3178585484eSchristos 3188585484eSchristosThe command line options relating to configuration and/or usage help are: 3198585484eSchristos 3208585484eSchristos@subsubheading version (-) 3218585484eSchristos 3228585484eSchristosPrint the program version to standard out, optionally with licensing 3238585484eSchristosinformation, then exit 0. The optional argument specifies how much licensing 324*897be3a4Schristosdetail to provide. The default is to print just the version. The licensing information may be selected with an option argument. 3258585484eSchristosOnly the first letter of the argument is examined: 3268585484eSchristos 3278585484eSchristos@table @samp 3288585484eSchristos@item version 3298585484eSchristosOnly print the version. This is the default. 3308585484eSchristos@item copyright 3318585484eSchristosName the copyright usage licensing terms. 3328585484eSchristos@item verbose 3338585484eSchristosPrint the full copyright usage licensing terms. 3348585484eSchristos@end table 3358585484eSchristos 3368585484eSchristos@node ntpdc exit status 3378585484eSchristos@subsection ntpdc exit status 3388585484eSchristos 3398585484eSchristosOne of the following exit values will be returned: 3408585484eSchristos@table @samp 3418585484eSchristos@item 0 (EXIT_SUCCESS) 3428585484eSchristosSuccessful program execution. 3438585484eSchristos@item 1 (EXIT_FAILURE) 3448585484eSchristosThe operation failed or the command syntax was not valid. 3458585484eSchristos@item 66 (EX_NOINPUT) 3468585484eSchristosA specified configuration file could not be loaded. 3478585484eSchristos@item 70 (EX_SOFTWARE) 3488585484eSchristoslibopts had an internal operational error. Please report 3498585484eSchristosit to autogen-users@@lists.sourceforge.net. Thank you. 3508585484eSchristos@end table 3518585484eSchristos@node ntpdc Usage 3528585484eSchristos@subsection ntpdc Usage 3538585484eSchristos@node ntpdc See Also 3548585484eSchristos@subsection ntpdc See Also 3558585484eSchristos@node ntpdc Authors 3568585484eSchristos@subsection ntpdc Authors 3578585484eSchristos@node ntpdc Bugs 3588585484eSchristos@subsection ntpdc Bugs 359