ntpdc.html revision 282408
1114879Sjulian<html lang="en"> 2114879Sjulian<head> 3114879Sjulian<title>ntpdc: NTPD Control User's Manual</title> 4114879Sjulian<meta http-equiv="Content-Type" content="text/html"> 5114879Sjulian<meta name="description" content="ntpdc: NTPD Control User's Manual"> 6114879Sjulian<meta name="generator" content="makeinfo 4.7"> 7114879Sjulian<link title="Top" rel="top" href="#Top"> 8114879Sjulian<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 9114879Sjulian<meta http-equiv="Content-Style-Type" content="text/css"> 10114879Sjulian<style type="text/css"><!-- 11114879Sjulian pre.display { font-family:inherit } 12114879Sjulian pre.format { font-family:inherit } 13114879Sjulian pre.smalldisplay { font-family:inherit; font-size:smaller } 14114879Sjulian pre.smallformat { font-family:inherit; font-size:smaller } 15114879Sjulian pre.smallexample { font-size:smaller } 16114879Sjulian pre.smalllisp { font-size:smaller } 17114879Sjulian span.sc { font-variant:small-caps } 18114879Sjulian span.roman { font-family: serif; font-weight: normal; } 19114879Sjulian--></style> 20114879Sjulian</head> 21114879Sjulian<body> 22114879Sjulian<h1 class="settitle">ntpdc: NTPD Control User's Manual</h1> 23114879Sjulian<div class="node"> 24114879Sjulian<p><hr> 25114879Sjulian<a name="Top"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-Description">ntpdc Description</a>, 26114879SjulianPrevious: <a rel="previous" accesskey="p" href="#dir">(dir)</a>, 27114879SjulianUp: <a rel="up" accesskey="u" href="#dir">(dir)</a> 28114879Sjulian<br> 29121054Semax</div> 30114879Sjulian 31114879Sjulian<h2 class="unnumbered">ntpdc: NTPD Control User Manual</h2> 32114879Sjulian 33121054Semax<p>This document describes the use of the NTP Project's <code>ntpdc</code> program, 34114879Sjulianthat can be used to query a Network Time Protocol (NTP) server and 35121054Semaxdisplay the time offset of the system clock relative to the server 36114879Sjulianclock. Run as root, it can correct the system clock to this offset as 37121054Semaxwell. It can be run as an interactive command or from a cron job. 38114879Sjulian 39235789Sbapt <p>This document applies to version 4.2.8p2 of <code>ntpdc</code>. 40114879Sjulian 41114879Sjulian <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4 42114879SjulianIETF specification. 43135245Semax 44114879Sjulian <div class="shortcontents"> 45114879Sjulian<h2>Short Contents</h2> 46114879Sjulian<ul> 47114879Sjulian<a href="#Top">ntpdc: NTPD Control User Manual</a> 48114879Sjulian</ul> 49114879Sjulian</div> 50114879Sjulian 51114879Sjulian<ul class="menu"> 52114879Sjulian<li><a accesskey="1" href="#ntpdc-Description">ntpdc Description</a>: Description 53114879Sjulian<li><a accesskey="2" href="#ntpdc-Invocation">ntpdc Invocation</a>: Invoking ntpdc 54114879Sjulian<li><a accesskey="3" href="#Usage">Usage</a>: Usage 55121054Semax</ul> 56114879Sjulian 57114879Sjulian<div class="node"> 58114879Sjulian<p><hr> 59114879Sjulian<a name="ntpdc-Description"></a> 60114879Sjulian<br> 61114879Sjulian</div> 62114879Sjulian 63114879Sjulian<!-- node-name, next, previous, up --> 64114879Sjulian<h3 class="section">Description</h3> 65114879Sjulian 66114879Sjulian<p>By default, <code>ntpdc</code> writes the local data and time (i.e., not UTC) to the 67114879Sjulianstandard output in the format: 68114879Sjulian 69114879Sjulian<pre class="example"> 1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs 70114879Sjulian</pre> 71114879Sjulian <p>where 72114879SjulianYYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time, 73114879Sjulian(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC), 74114879Sjulianand 75114879Sjulianthe +4.567 +/- 0.089 secs indicates the time offset and 76114879Sjulianerror bound of the system clock relative to the server clock. 77114879Sjulian 78114879Sjulian<div class="node"> 79114879Sjulian<p><hr> 80114879Sjulian<a name="ntpdc-Invocation"></a> 81114879Sjulian<br> 82114879Sjulian</div> 83114879Sjulian 84114879Sjulian<h3 class="section">Invoking ntpdc</h3> 85114879Sjulian 86114879Sjulian<p><a name="index-ntpdc-1"></a><a name="index-vendor_002dspecific-NTPD-control-program-2"></a> 87114879Sjulian 88121054Semax <p><code>ntpdc</code> 89121054Semaxis deprecated. 90114879SjulianPlease use 91114879Sjulian<code>ntpq(1ntpqmdoc)</code> instead - it can do everything 92114879Sjulian<code>ntpdc</code> 93114879Sjulianused to do, and it does so using a much more sane interface. 94114879Sjulian 95114879Sjulian <p><code>ntpdc</code> 96114879Sjulianis a utility program used to query 97114879Sjulian<code>ntpd(1ntpdmdoc)</code> 98114879Sjulianabout its 99114879Sjuliancurrent state and to request changes in that state. 100114879SjulianIt uses NTP mode 7 control message formats described in the source code. 101114879SjulianThe program may 102114879Sjulianbe run either in interactive mode or controlled using command line 103114879Sjulianarguments. 104114879SjulianExtensive state and statistics information is available 105114879Sjulianthrough the 106114879Sjulian<code>ntpdc</code> 107114879Sjulianinterface. 108114879SjulianIn addition, nearly all the 109114879Sjulianconfiguration options which can be specified at startup using 110121054Semaxntpd's configuration file may also be specified at run time using 111133178Semax<code>ntpdc</code> 112114879Sjulian 113114879Sjulian <p>This section was generated by <strong>AutoGen</strong>, 114114879Sjulianusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpdc</code> program. 115114879SjulianThis software is released under the NTP license, <http://ntp.org/license>. 116114879Sjulian 117114879Sjulian<ul class="menu"> 118114879Sjulian<li><a accesskey="1" href="#ntpdc-usage">ntpdc usage</a>: ntpdc help/usage (<span class="option">--help</span>) 119114879Sjulian<li><a accesskey="2" href="#ntpdc-ipv4">ntpdc ipv4</a>: ipv4 option (-4) 120114879Sjulian<li><a accesskey="3" href="#ntpdc-ipv6">ntpdc ipv6</a>: ipv6 option (-6) 121114879Sjulian<li><a accesskey="4" href="#ntpdc-command">ntpdc command</a>: command option (-c) 122114879Sjulian<li><a accesskey="5" href="#ntpdc-interactive">ntpdc interactive</a>: interactive option (-i) 123114879Sjulian<li><a accesskey="6" href="#ntpdc-listpeers">ntpdc listpeers</a>: listpeers option (-l) 124114879Sjulian<li><a accesskey="7" href="#ntpdc-numeric">ntpdc numeric</a>: numeric option (-n) 125114879Sjulian<li><a accesskey="8" href="#ntpdc-peers">ntpdc peers</a>: peers option (-p) 126114879Sjulian<li><a accesskey="9" href="#ntpdc-showpeers">ntpdc showpeers</a>: showpeers option (-s) 127114879Sjulian<li><a href="#ntpdc-config">ntpdc config</a>: presetting/configuring ntpdc 128114879Sjulian<li><a href="#ntpdc-exit-status">ntpdc exit status</a>: exit status 129114879Sjulian<li><a href="#ntpdc-Usage">ntpdc Usage</a>: Usage 130114879Sjulian<li><a href="#ntpdc-See-Also">ntpdc See Also</a>: See Also 131114879Sjulian<li><a href="#ntpdc-Authors">ntpdc Authors</a>: Authors 132114879Sjulian<li><a href="#ntpdc-Bugs">ntpdc Bugs</a>: Bugs 133114879Sjulian</ul> 134114879Sjulian 135114879Sjulian<div class="node"> 136114879Sjulian<p><hr> 137114879Sjulian<a name="ntpdc-usage"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-ipv4">ntpdc ipv4</a>, 138114879SjulianUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 139133178Semax<br> 140114879Sjulian</div> 141114879Sjulian 142114879Sjulian<h4 class="subsection">ntpdc help/usage (<span class="option">--help</span>)</h4> 143114879Sjulian 144114879Sjulian<p><a name="index-ntpdc-help-3"></a> 145114879SjulianThis is the automatically generated usage text for ntpdc. 146114879Sjulian 147114879Sjulian <p>The text printed is the same whether selected with the <code>help</code> option 148114879Sjulian(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print 149114879Sjulianthe usage text by passing it through a pager program. 150114879Sjulian<code>more-help</code> is disabled on platforms without a working 151114879Sjulian<code>fork(2)</code> function. The <code>PAGER</code> environment variable is 152114879Sjulianused to select the program, defaulting to <span class="file">more</span>. Both will exit 153114879Sjulianwith a status code of 0. 154114879Sjulian 155114879Sjulian<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2 156114879SjulianUsage: ntpdc [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...] 157114879Sjulian Flg Arg Option-Name Description 158114879Sjulian -4 no ipv4 Force IPv4 DNS name resolution 159114879Sjulian - prohibits the option 'ipv6' 160114879Sjulian -6 no ipv6 Force IPv6 DNS name resolution 161114879Sjulian - prohibits the option 'ipv4' 162114879Sjulian -c Str command run a command and exit 163114879Sjulian - may appear multiple times 164114879Sjulian -d no debug-level Increase debug verbosity level 165114879Sjulian - may appear multiple times 166114879Sjulian -D Num set-debug-level Set the debug verbosity level 167114879Sjulian - may appear multiple times 168114879Sjulian -i no interactive Force ntpq to operate in interactive mode 169114879Sjulian - prohibits these options: 170114879Sjulian command 171114879Sjulian listpeers 172114879Sjulian peers 173114879Sjulian showpeers 174114879Sjulian -l no listpeers Print a list of the peers 175114879Sjulian - prohibits the option 'command' 176114879Sjulian -n no numeric numeric host addresses 177114879Sjulian -p no peers Print a list of the peers 178114879Sjulian - prohibits the option 'command' 179114879Sjulian -s no showpeers Show a list of the peers 180114879Sjulian - prohibits the option 'command' 181114879Sjulian opt version output version information and exit 182114879Sjulian -? no help display extended usage information and exit 183114879Sjulian -! no more-help extended usage information passed thru pager 184114879Sjulian -> opt save-opts save the option state to a config file 185114879Sjulian -< Str load-opts load options from a config file 186114879Sjulian - disabled as '--no-load-opts' 187114879Sjulian - may appear multiple times 188114879Sjulian 189114879SjulianOptions are specified by doubled hyphens and their name or by a single 190114879Sjulianhyphen and the flag character. 191114879Sjulian 192114879Sjulian 193114879SjulianThe following option preset mechanisms are supported: 194114879Sjulian - reading file $HOME/.ntprc 195114879Sjulian - reading file ./.ntprc 196121054Semax - examining environment variables named NTPDC_* 197114879Sjulian 198114879SjulianPlease send bug reports to: <http://bugs.ntp.org, bugs@ntp.org> 199114879Sjulian</pre> 200114879Sjulian <div class="node"> 201114879Sjulian<p><hr> 202114879Sjulian<a name="ntpdc-ipv4"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-ipv6">ntpdc ipv6</a>, 203114879SjulianPrevious: <a rel="previous" accesskey="p" href="#ntpdc-usage">ntpdc usage</a>, 204114879SjulianUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 205114879Sjulian<br> 206114879Sjulian</div> 207114879Sjulian 208114879Sjulian<h4 class="subsection">ipv4 option (-4)</h4> 209114879Sjulian 210114879Sjulian<p><a name="index-ntpdc_002dipv4-4"></a> 211114879SjulianThis is the “force ipv4 dns name resolution” option. 212114879Sjulian 213114879Sjulian<p class="noindent">This option has some usage constraints. It: 214114879Sjulian <ul> 215114879Sjulian<li>must not appear in combination with any of the following options: 216114879Sjulianipv6. 217114879Sjulian</ul> 218114879Sjulian 219114879Sjulian <p>Force DNS resolution of following host names on the command line 220114879Sjulianto the IPv4 namespace. 221114879Sjulian<div class="node"> 222114879Sjulian<p><hr> 223114879Sjulian<a name="ntpdc-ipv6"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-command">ntpdc command</a>, 224114879SjulianPrevious: <a rel="previous" accesskey="p" href="#ntpdc-ipv4">ntpdc ipv4</a>, 225114879SjulianUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 226114879Sjulian<br> 227114879Sjulian</div> 228114879Sjulian 229114879Sjulian<h4 class="subsection">ipv6 option (-6)</h4> 230114879Sjulian 231114879Sjulian<p><a name="index-ntpdc_002dipv6-5"></a> 232114879SjulianThis is the “force ipv6 dns name resolution” option. 233114879Sjulian 234114879Sjulian<p class="noindent">This option has some usage constraints. It: 235114879Sjulian <ul> 236114879Sjulian<li>must not appear in combination with any of the following options: 237114879Sjulianipv4. 238114879Sjulian</ul> 239114879Sjulian 240114879Sjulian <p>Force DNS resolution of following host names on the command line 241114879Sjulianto the IPv6 namespace. 242114879Sjulian<div class="node"> 243114879Sjulian<p><hr> 244114879Sjulian<a name="ntpdc-command"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-interactive">ntpdc interactive</a>, 245114879SjulianPrevious: <a rel="previous" accesskey="p" href="#ntpdc-ipv6">ntpdc ipv6</a>, 246114879SjulianUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 247114879Sjulian<br> 248114879Sjulian</div> 249114879Sjulian 250114879Sjulian<h4 class="subsection">command option (-c)</h4> 251114879Sjulian 252114879Sjulian<p><a name="index-ntpdc_002dcommand-6"></a> 253114879SjulianThis is the “run a command and exit” option. 254114879SjulianThis option takes a string argument <span class="file">cmd</span>. 255114879Sjulian 256114879Sjulian<p class="noindent">This option has some usage constraints. It: 257114879Sjulian <ul> 258114879Sjulian<li>may appear an unlimited number of times. 259114879Sjulian</ul> 260114879Sjulian 261114879Sjulian <p>The following argument is interpreted as an interactive format command 262114879Sjulianand is added to the list of commands to be executed on the specified 263114879Sjulianhost(s). 264114879Sjulian<div class="node"> 265114879Sjulian<p><hr> 266114879Sjulian<a name="ntpdc-interactive"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-listpeers">ntpdc listpeers</a>, 267114879SjulianPrevious: <a rel="previous" accesskey="p" href="#ntpdc-command">ntpdc command</a>, 268114879SjulianUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 269114879Sjulian<br> 270114879Sjulian</div> 271114879Sjulian 272114879Sjulian<h4 class="subsection">interactive option (-i)</h4> 273114879Sjulian 274114879Sjulian<p><a name="index-ntpdc_002dinteractive-7"></a> 275114879SjulianThis is the “force ntpq to operate in interactive mode” option. 276114879Sjulian 277121054Semax<p class="noindent">This option has some usage constraints. It: 278114879Sjulian <ul> 279114879Sjulian<li>must not appear in combination with any of the following options: 280114879Sjuliancommand, listpeers, peers, showpeers. 281121054Semax</ul> 282114879Sjulian 283114879Sjulian <p>Force ntpq to operate in interactive mode. Prompts will be written 284114879Sjulianto the standard output and commands read from the standard input. 285114879Sjulian<div class="node"> 286114879Sjulian<p><hr> 287114879Sjulian<a name="ntpdc-listpeers"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-numeric">ntpdc numeric</a>, 288121054SemaxPrevious: <a rel="previous" accesskey="p" href="#ntpdc-interactive">ntpdc interactive</a>, 289121054SemaxUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 290121054Semax<br> 291121054Semax</div> 292121054Semax 293121054Semax<h4 class="subsection">listpeers option (-l)</h4> 294121054Semax 295121054Semax<p><a name="index-ntpdc_002dlistpeers-8"></a> 296121054SemaxThis is the “print a list of the peers” option. 297121054Semax 298121054Semax<p class="noindent">This option has some usage constraints. It: 299121054Semax <ul> 300121054Semax<li>must not appear in combination with any of the following options: 301121054Semaxcommand. 302121054Semax</ul> 303121054Semax 304121054Semax <p>Print a list of the peers known to the server as well as a summary of 305121054Semaxtheir state. This is equivalent to the 'listpeers' interactive command. 306121054Semax<div class="node"> 307121054Semax<p><hr> 308121054Semax<a name="ntpdc-numeric"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-peers">ntpdc peers</a>, 309121054SemaxPrevious: <a rel="previous" accesskey="p" href="#ntpdc-listpeers">ntpdc listpeers</a>, 310121054SemaxUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 311121054Semax<br> 312121054Semax</div> 313121054Semax 314121054Semax<h4 class="subsection">numeric option (-n)</h4> 315121054Semax 316121054Semax<p><a name="index-ntpdc_002dnumeric-9"></a> 317121054SemaxThis is the “numeric host addresses” option. 318121054SemaxOutput all host addresses in dotted-quad numeric format rather than 319121054Semaxconverting to the canonical host names. 320121054Semax<div class="node"> 321121054Semax<p><hr> 322121054Semax<a name="ntpdc-peers"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-showpeers">ntpdc showpeers</a>, 323133178SemaxPrevious: <a rel="previous" accesskey="p" href="#ntpdc-numeric">ntpdc numeric</a>, 324121054SemaxUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 325121054Semax<br> 326121054Semax</div> 327121054Semax 328121054Semax<h4 class="subsection">peers option (-p)</h4> 329121054Semax 330121054Semax<p><a name="index-ntpdc_002dpeers-10"></a> 331121054SemaxThis is the “print a list of the peers” option. 332121054Semax 333121054Semax<p class="noindent">This option has some usage constraints. It: 334121054Semax <ul> 335121054Semax<li>must not appear in combination with any of the following options: 336121054Semaxcommand. 337121054Semax</ul> 338121054Semax 339121054Semax <p>Print a list of the peers known to the server as well as a summary 340121054Semaxof their state. This is equivalent to the 'peers' interactive command. 341121054Semax<div class="node"> 342121054Semax<p><hr> 343121054Semax<a name="ntpdc-showpeers"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-config">ntpdc config</a>, 344121054SemaxPrevious: <a rel="previous" accesskey="p" href="#ntpdc-peers">ntpdc peers</a>, 345121054SemaxUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 346121054Semax<br> 347121054Semax</div> 348121054Semax 349121054Semax<h4 class="subsection">showpeers option (-s)</h4> 350121054Semax 351121054Semax<p><a name="index-ntpdc_002dshowpeers-11"></a> 352121054SemaxThis is the “show a list of the peers” option. 353121054Semax 354121054Semax<p class="noindent">This option has some usage constraints. It: 355121054Semax <ul> 356121054Semax<li>must not appear in combination with any of the following options: 357121054Semaxcommand. 358121054Semax</ul> 359121054Semax 360121054Semax <p>Print a list of the peers known to the server as well as a summary 361121054Semaxof their state. This is equivalent to the 'dmpeers' interactive command. 362121054Semax 363121054Semax<div class="node"> 364121054Semax<p><hr> 365121054Semax<a name="ntpdc-config"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-exit-status">ntpdc exit status</a>, 366121054SemaxPrevious: <a rel="previous" accesskey="p" href="#ntpdc-showpeers">ntpdc showpeers</a>, 367121054SemaxUp: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 368121054Semax<br> 369121054Semax</div> 370121054Semax 371121054Semax<h4 class="subsection">presetting/configuring ntpdc</h4> 372121054Semax 373121054Semax<p>Any option that is not marked as <i>not presettable</i> may be preset by 374121054Semaxloading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTPDC</code> and <code>NTPDC_<OPTION_NAME></code>. <code><OPTION_NAME></code> must be one of 375121054Semaxthe options listed above in upper case and segmented with underscores. 376121054SemaxThe <code>NTPDC</code> variable will be tokenized and parsed like 377121054Semaxthe command line. The remaining variables are tested for existence and their 378121054Semaxvalues are treated like option arguments. 379121054Semax 380121054Semax<p class="noindent"><code>libopts</code> will search in 2 places for configuration files: 381121054Semax <ul> 382121054Semax<li>$HOME 383121054Semax<li>$PWD 384121054Semax</ul> 385121054Semax The environment variables <code>HOME</code>, and <code>PWD</code> 386121054Semaxare expanded and replaced when <span class="file">ntpdc</span> runs. 387121054SemaxFor any of these that are plain files, they are simply processed. 388121054SemaxFor any that are directories, then a file named <span class="file">.ntprc</span> is searched for 389121054Semaxwithin that directory and processed. 390121054Semax 391121054Semax <p>Configuration files may be in a wide variety of formats. 392121054SemaxThe basic format is an option name followed by a value (argument) on the 393121054Semaxsame line. Values may be separated from the option name with a colon, 394121054Semaxequal sign or simply white space. Values may be continued across multiple 395121054Semaxlines by escaping the newline with a backslash. 396114879Sjulian 397114879Sjulian <p>Multiple programs may also share the same initialization file. 398114879SjulianCommon options are collected at the top, followed by program specific 399114879Sjuliansegments. The segments are separated by lines like: 400114879Sjulian<pre class="example"> [NTPDC] 401114879Sjulian</pre> 402114879Sjulian <p class="noindent">or by 403114879Sjulian<pre class="example"> <?program ntpdc> 404114879Sjulian</pre> 405114879Sjulian <p class="noindent">Do not mix these styles within one configuration file. 406114879Sjulian 407114879Sjulian <p>Compound values and carefully constructed string values may also be 408114879Sjulianspecified using XML syntax: 409114879Sjulian<pre class="example"> <option-name> 410114879Sjulian <sub-opt>...&lt;...&gt;...</sub-opt> 411114879Sjulian </option-name> 412114879Sjulian</pre> 413114879Sjulian <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of 414114879Sjulian<pre class="example"> "...<...>..." 415114879Sjulian</pre> 416114879Sjulian <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a 417114879Sjulianhierarchicly valued option. <code>AutoOpts</code> does provide a means for searching 418114879Sjulianthe associated name/value pair list (see: optionFindValue). 419114879Sjulian 420114879Sjulian <p>The command line options relating to configuration and/or usage help are: 421114879Sjulian 422114879Sjulian<h5 class="subsubheading">version (-)</h5> 423114879Sjulian 424114879Sjulian<p>Print the program version to standard out, optionally with licensing 425114879Sjulianinformation, then exit 0. The optional argument specifies how much licensing 426114879Sjuliandetail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument. 427114879SjulianOnly the first letter of the argument is examined: 428114879Sjulian 429114879Sjulian <dl> 430114879Sjulian<dt><span class="samp">version</span><dd>Only print the version. This is the default. 431114879Sjulian<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms. 432114879Sjulian<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms. 433114879Sjulian</dl> 434114879Sjulian 435<div class="node"> 436<p><hr> 437<a name="ntpdc-exit-status"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-Usage">ntpdc Usage</a>, 438Previous: <a rel="previous" accesskey="p" href="#ntpdc-config">ntpdc config</a>, 439Up: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 440<br> 441</div> 442 443<h4 class="subsection">ntpdc exit status</h4> 444 445<p>One of the following exit values will be returned: 446 <dl> 447<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 448<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 449<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded. 450<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report 451it to autogen-users@lists.sourceforge.net. Thank you. 452</dl> 453 <div class="node"> 454<p><hr> 455<a name="ntpdc-Usage"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-See-Also">ntpdc See Also</a>, 456Previous: <a rel="previous" accesskey="p" href="#ntpdc-exit-status">ntpdc exit status</a>, 457Up: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 458<br> 459</div> 460 461<h4 class="subsection">ntpdc Usage</h4> 462 463<div class="node"> 464<p><hr> 465<a name="ntpdc-See-Also"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-Authors">ntpdc Authors</a>, 466Previous: <a rel="previous" accesskey="p" href="#ntpdc-Usage">ntpdc Usage</a>, 467Up: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 468<br> 469</div> 470 471<h4 class="subsection">ntpdc See Also</h4> 472 473<div class="node"> 474<p><hr> 475<a name="ntpdc-Authors"></a>Next: <a rel="next" accesskey="n" href="#ntpdc-Bugs">ntpdc Bugs</a>, 476Previous: <a rel="previous" accesskey="p" href="#ntpdc-See-Also">ntpdc See Also</a>, 477Up: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 478<br> 479</div> 480 481<h4 class="subsection">ntpdc Authors</h4> 482 483<div class="node"> 484<p><hr> 485<a name="ntpdc-Bugs"></a>Previous: <a rel="previous" accesskey="p" href="#ntpdc-Authors">ntpdc Authors</a>, 486Up: <a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a> 487<br> 488</div> 489 490<h4 class="subsection">ntpdc Bugs</h4> 491 492<div class="node"> 493<p><hr> 494<a name="Usage"></a> 495<br> 496</div> 497 498<!-- node-name, next, previous, up --> 499<h3 class="section">Usage</h3> 500 501<p>The simplest use of this program is as an unprivileged command to 502check the current time, offset, and error in the local clock. 503For example: 504 505<pre class="example"> ntpdc ntpserver.somewhere 506</pre> 507 <p>With suitable privilege, it can be run as a command or in a 508<code>cron</code> job to reset the local clock from a reliable server, like 509the <code>ntpdate</code> and <code>rdate</code> commands. 510For example: 511 512<pre class="example"> ntpdc -a ntpserver.somewhere 513</pre> 514 </body></html> 515 516