Home | History | Annotate | Line # | Download | only in ntpdc
ntpdc.html revision 1.1.1.2
      1      1.1  christos <html lang="en">
      2      1.1  christos <head>
      3      1.1  christos <title>ntpdc: NTPD Control User's Manual</title>
      4      1.1  christos <meta http-equiv="Content-Type" content="text/html">
      5      1.1  christos <meta name="description" content="ntpdc: NTPD Control User's Manual">
      6      1.1  christos <meta name="generator" content="makeinfo 4.7">
      7      1.1  christos <link title="Top" rel="top" href="#Top">
      8      1.1  christos <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
      9      1.1  christos <meta http-equiv="Content-Style-Type" content="text/css">
     10      1.1  christos <style type="text/css"><!--
     11      1.1  christos   pre.display { font-family:inherit }
     12      1.1  christos   pre.format  { font-family:inherit }
     13      1.1  christos   pre.smalldisplay { font-family:inherit; font-size:smaller }
     14      1.1  christos   pre.smallformat  { font-family:inherit; font-size:smaller }
     15      1.1  christos   pre.smallexample { font-size:smaller }
     16      1.1  christos   pre.smalllisp    { font-size:smaller }
     17      1.1  christos   span.sc { font-variant:small-caps }
     18      1.1  christos   span.roman { font-family: serif; font-weight: normal; } 
     19      1.1  christos --></style>
     20      1.1  christos </head>
     21      1.1  christos <body>
     22      1.1  christos <h1 class="settitle">ntpdc: NTPD Control User's Manual</h1>
     23      1.1  christos <div class="node">
     24      1.1  christos <p><hr>
     25      1.1  christos <a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Description">ntpdc Description</a>,
     26      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
     27      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
     28      1.1  christos <br>
     29      1.1  christos </div>
     30      1.1  christos 
     31      1.1  christos <h2 class="unnumbered">ntpdc: NTPD Control User Manual</h2>
     32      1.1  christos 
     33      1.1  christos <p>This document describes the use of the NTP Project's <code>ntpdc</code> program,
     34      1.1  christos that can be used to query a Network Time Protocol (NTP) server and
     35      1.1  christos display the time offset of the system clock relative to the server
     36      1.1  christos clock.  Run as root, it can correct the system clock to this offset as
     37      1.1  christos well.  It can be run as an interactive command or from a cron job.
     38      1.1  christos 
     39  1.1.1.2  christos   <p>This document applies to version 4.2.8 of <code>ntpdc</code>.
     40      1.1  christos 
     41      1.1  christos   <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
     42      1.1  christos IETF specification.
     43      1.1  christos 
     44      1.1  christos   <div class="shortcontents">
     45      1.1  christos <h2>Short Contents</h2>
     46      1.1  christos <ul>
     47      1.1  christos <a href="#Top">ntpdc: NTPD Control User Manual</a>
     48      1.1  christos </ul>
     49      1.1  christos </div>
     50      1.1  christos 
     51      1.1  christos <ul class="menu">
     52      1.1  christos <li><a accesskey="1" href="#ntpdc-Description">ntpdc Description</a>:             Description
     53      1.1  christos <li><a accesskey="2" href="#ntpdc-Invocation">ntpdc Invocation</a>: 		Invoking ntpdc
     54      1.1  christos <li><a accesskey="3" href="#Usage">Usage</a>:                        Usage
     55      1.1  christos </ul>
     56      1.1  christos 
     57      1.1  christos <div class="node">
     58      1.1  christos <p><hr>
     59      1.1  christos <a name="ntpdc-Description"></a>
     60      1.1  christos <br>
     61      1.1  christos </div>
     62      1.1  christos 
     63      1.1  christos <!-- node-name,  next,  previous,  up -->
     64      1.1  christos <h3 class="section">Description</h3>
     65      1.1  christos 
     66      1.1  christos <p>By default, <code>ntpdc</code> writes the local data and time (i.e., not UTC) to the
     67      1.1  christos standard output in the format:
     68      1.1  christos 
     69      1.1  christos <pre class="example">     1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
     70      1.1  christos </pre>
     71      1.1  christos   <p>where
     72      1.1  christos YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
     73      1.1  christos (+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
     74      1.1  christos and
     75      1.1  christos the +4.567 +/- 0.089 secs indicates the time offset and
     76      1.1  christos error bound of the system clock relative to the server clock.
     77      1.1  christos 
     78      1.1  christos <div class="node">
     79      1.1  christos <p><hr>
     80      1.1  christos <a name="ntpdc-Invocation"></a>
     81      1.1  christos <br>
     82      1.1  christos </div>
     83      1.1  christos 
     84      1.1  christos <h3 class="section">Invoking ntpdc</h3>
     85      1.1  christos 
     86      1.1  christos <p><a name="index-ntpdc-1"></a><a name="index-vendor_002dspecific-NTPD-control-program-2"></a>
     87      1.1  christos 
     88      1.1  christos   <p><code>ntpdc</code>
     89  1.1.1.2  christos is deprecated. 
     90  1.1.1.2  christos Please use
     91  1.1.1.2  christos <code>ntpq(1ntpqmdoc)</code> instead - it can do everything
     92  1.1.1.2  christos <code>ntpdc</code>
     93  1.1.1.2  christos used to do, and it does so using a much more sane interface.
     94  1.1.1.2  christos 
     95  1.1.1.2  christos   <p><code>ntpdc</code>
     96      1.1  christos is a utility program used to query
     97      1.1  christos <code>ntpd(1ntpdmdoc)</code>
     98      1.1  christos about its
     99      1.1  christos current state and to request changes in that state. 
    100      1.1  christos It uses NTP mode 7 control message formats described in the source code. 
    101      1.1  christos The program may
    102      1.1  christos be run either in interactive mode or controlled using command line
    103      1.1  christos arguments. 
    104      1.1  christos Extensive state and statistics information is available
    105      1.1  christos through the
    106      1.1  christos <code>ntpdc</code>
    107      1.1  christos interface. 
    108      1.1  christos In addition, nearly all the
    109      1.1  christos configuration options which can be specified at startup using
    110      1.1  christos ntpd's configuration file may also be specified at run time using
    111      1.1  christos <code>ntpdc</code>
    112      1.1  christos 
    113      1.1  christos   <p>This section was generated by <strong>AutoGen</strong>,
    114      1.1  christos using the <code>agtexi-cmd</code> template and the option descriptions for the <code>ntpdc</code> program. 
    115      1.1  christos This software is released under the NTP license, &lt;http://ntp.org/license>;.
    116      1.1  christos 
    117      1.1  christos <ul class="menu">
    118      1.1  christos <li><a accesskey="1" href="#ntpdc-usage">ntpdc usage</a>:                   ntpdc help/usage (<span class="option">--help</span>)
    119      1.1  christos <li><a accesskey="2" href="#ntpdc-ipv4">ntpdc ipv4</a>:                    ipv4 option (-4)
    120      1.1  christos <li><a accesskey="3" href="#ntpdc-ipv6">ntpdc ipv6</a>:                    ipv6 option (-6)
    121      1.1  christos <li><a accesskey="4" href="#ntpdc-command">ntpdc command</a>:                 command option (-c)
    122      1.1  christos <li><a accesskey="5" href="#ntpdc-interactive">ntpdc interactive</a>:             interactive option (-i)
    123      1.1  christos <li><a accesskey="6" href="#ntpdc-listpeers">ntpdc listpeers</a>:               listpeers option (-l)
    124      1.1  christos <li><a accesskey="7" href="#ntpdc-numeric">ntpdc numeric</a>:                 numeric option (-n)
    125      1.1  christos <li><a accesskey="8" href="#ntpdc-peers">ntpdc peers</a>:                   peers option (-p)
    126      1.1  christos <li><a accesskey="9" href="#ntpdc-showpeers">ntpdc showpeers</a>:               showpeers option (-s)
    127      1.1  christos <li><a href="#ntpdc-config">ntpdc config</a>:                  presetting/configuring ntpdc
    128      1.1  christos <li><a href="#ntpdc-exit-status">ntpdc exit status</a>:             exit status
    129      1.1  christos <li><a href="#ntpdc-Usage">ntpdc Usage</a>:                   Usage
    130      1.1  christos <li><a href="#ntpdc-See-Also">ntpdc See Also</a>:                See Also
    131      1.1  christos <li><a href="#ntpdc-Authors">ntpdc Authors</a>:                 Authors
    132      1.1  christos <li><a href="#ntpdc-Bugs">ntpdc Bugs</a>:                    Bugs
    133      1.1  christos </ul>
    134      1.1  christos 
    135      1.1  christos <div class="node">
    136      1.1  christos <p><hr>
    137      1.1  christos <a name="ntpdc-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-ipv4">ntpdc ipv4</a>,
    138      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    139      1.1  christos <br>
    140      1.1  christos </div>
    141      1.1  christos 
    142      1.1  christos <h4 class="subsection">ntpdc help/usage (<span class="option">--help</span>)</h4>
    143      1.1  christos 
    144      1.1  christos <p><a name="index-ntpdc-help-3"></a>
    145      1.1  christos This is the automatically generated usage text for ntpdc.
    146      1.1  christos 
    147      1.1  christos   <p>The text printed is the same whether selected with the <code>help</code> option
    148      1.1  christos (<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>).  <code>more-help</code> will print
    149      1.1  christos the usage text by passing it through a pager program. 
    150      1.1  christos <code>more-help</code> is disabled on platforms without a working
    151      1.1  christos <code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
    152      1.1  christos used to select the program, defaulting to <span class="file">more</span>.  Both will exit
    153      1.1  christos with a status code of 0.
    154      1.1  christos 
    155  1.1.1.2  christos <pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8
    156      1.1  christos Usage:  ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
    157      1.1  christos   Flg Arg Option-Name    Description
    158      1.1  christos    -4 no  ipv4           Force IPv4 DNS name resolution
    159      1.1  christos                                 - prohibits the option 'ipv6'
    160      1.1  christos    -6 no  ipv6           Force IPv6 DNS name resolution
    161      1.1  christos                                 - prohibits the option 'ipv4'
    162      1.1  christos    -c Str command        run a command and exit
    163      1.1  christos                                 - may appear multiple times
    164      1.1  christos    -d no  debug-level    Increase debug verbosity level
    165      1.1  christos                                 - may appear multiple times
    166      1.1  christos    -D Num set-debug-level Set the debug verbosity level
    167      1.1  christos                                 - may appear multiple times
    168      1.1  christos    -i no  interactive    Force ntpq to operate in interactive mode
    169      1.1  christos                                 - prohibits these options:
    170      1.1  christos                                 command
    171      1.1  christos                                 listpeers
    172      1.1  christos                                 peers
    173      1.1  christos                                 showpeers
    174      1.1  christos    -l no  listpeers      Print a list of the peers
    175      1.1  christos                                 - prohibits the option 'command'
    176      1.1  christos    -n no  numeric        numeric host addresses
    177      1.1  christos    -p no  peers          Print a list of the peers
    178      1.1  christos                                 - prohibits the option 'command'
    179      1.1  christos    -s no  showpeers      Show a list of the peers
    180      1.1  christos                                 - prohibits the option 'command'
    181      1.1  christos       opt version        output version information and exit
    182      1.1  christos    -? no  help           display extended usage information and exit
    183      1.1  christos    -! no  more-help      extended usage information passed thru pager
    184      1.1  christos    -&gt; opt save-opts      save the option state to a config file
    185      1.1  christos    -&lt; Str load-opts      load options from a config file
    186      1.1  christos                                 - disabled as '--no-load-opts'
    187      1.1  christos                                 - may appear multiple times
    188      1.1  christos 
    189      1.1  christos Options are specified by doubled hyphens and their name or by a single
    190      1.1  christos hyphen and the flag character.
    191      1.1  christos 
    192      1.1  christos 
    193      1.1  christos The following option preset mechanisms are supported:
    194      1.1  christos  - reading file $HOME/.ntprc
    195      1.1  christos  - reading file ./.ntprc
    196      1.1  christos  - examining environment variables named NTPDC_*
    197      1.1  christos 
    198      1.1  christos Please send bug reports to:  &lt;http://bugs.ntp.org, bugs (a] ntp.org&gt;
    199      1.1  christos </pre>
    200      1.1  christos   <div class="node">
    201      1.1  christos <p><hr>
    202      1.1  christos <a name="ntpdc-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-ipv6">ntpdc ipv6</a>,
    203      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-usage">ntpdc usage</a>,
    204      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    205      1.1  christos <br>
    206      1.1  christos </div>
    207      1.1  christos 
    208      1.1  christos <h4 class="subsection">ipv4 option (-4)</h4>
    209      1.1  christos 
    210      1.1  christos <p><a name="index-ntpdc_002dipv4-4"></a>
    211      1.1  christos This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
    212      1.1  christos 
    213      1.1  christos <p class="noindent">This option has some usage constraints.  It:
    214      1.1  christos      <ul>
    215      1.1  christos <li>must not appear in combination with any of the following options:
    216      1.1  christos ipv6. 
    217      1.1  christos </ul>
    218      1.1  christos 
    219      1.1  christos   <p>Force DNS resolution of following host names on the command line
    220      1.1  christos to the IPv4 namespace. 
    221      1.1  christos <div class="node">
    222      1.1  christos <p><hr>
    223      1.1  christos <a name="ntpdc-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-command">ntpdc command</a>,
    224      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-ipv4">ntpdc ipv4</a>,
    225      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    226      1.1  christos <br>
    227      1.1  christos </div>
    228      1.1  christos 
    229      1.1  christos <h4 class="subsection">ipv6 option (-6)</h4>
    230      1.1  christos 
    231      1.1  christos <p><a name="index-ntpdc_002dipv6-5"></a>
    232      1.1  christos This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
    233      1.1  christos 
    234      1.1  christos <p class="noindent">This option has some usage constraints.  It:
    235      1.1  christos      <ul>
    236      1.1  christos <li>must not appear in combination with any of the following options:
    237      1.1  christos ipv4. 
    238      1.1  christos </ul>
    239      1.1  christos 
    240      1.1  christos   <p>Force DNS resolution of following host names on the command line
    241      1.1  christos to the IPv6 namespace. 
    242      1.1  christos <div class="node">
    243      1.1  christos <p><hr>
    244      1.1  christos <a name="ntpdc-command"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-interactive">ntpdc interactive</a>,
    245      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-ipv6">ntpdc ipv6</a>,
    246      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    247      1.1  christos <br>
    248      1.1  christos </div>
    249      1.1  christos 
    250      1.1  christos <h4 class="subsection">command option (-c)</h4>
    251      1.1  christos 
    252      1.1  christos <p><a name="index-ntpdc_002dcommand-6"></a>
    253      1.1  christos This is the &ldquo;run a command and exit&rdquo; option. 
    254      1.1  christos This option takes a string argument <span class="file">cmd</span>.
    255      1.1  christos 
    256      1.1  christos <p class="noindent">This option has some usage constraints.  It:
    257      1.1  christos      <ul>
    258      1.1  christos <li>may appear an unlimited number of times. 
    259      1.1  christos </ul>
    260      1.1  christos 
    261      1.1  christos   <p>The following argument is interpreted as an interactive format command
    262      1.1  christos and is added to the list of commands to be executed on the specified
    263      1.1  christos host(s). 
    264      1.1  christos <div class="node">
    265      1.1  christos <p><hr>
    266      1.1  christos <a name="ntpdc-interactive"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-listpeers">ntpdc listpeers</a>,
    267      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-command">ntpdc command</a>,
    268      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    269      1.1  christos <br>
    270      1.1  christos </div>
    271      1.1  christos 
    272      1.1  christos <h4 class="subsection">interactive option (-i)</h4>
    273      1.1  christos 
    274      1.1  christos <p><a name="index-ntpdc_002dinteractive-7"></a>
    275      1.1  christos This is the &ldquo;force ntpq to operate in interactive mode&rdquo; option.
    276      1.1  christos 
    277      1.1  christos <p class="noindent">This option has some usage constraints.  It:
    278      1.1  christos      <ul>
    279      1.1  christos <li>must not appear in combination with any of the following options:
    280      1.1  christos command, listpeers, peers, showpeers. 
    281      1.1  christos </ul>
    282      1.1  christos 
    283      1.1  christos   <p>Force ntpq to operate in interactive mode.  Prompts will be written
    284      1.1  christos to the standard output and commands read from the standard input. 
    285      1.1  christos <div class="node">
    286      1.1  christos <p><hr>
    287      1.1  christos <a name="ntpdc-listpeers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-numeric">ntpdc numeric</a>,
    288      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-interactive">ntpdc interactive</a>,
    289      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    290      1.1  christos <br>
    291      1.1  christos </div>
    292      1.1  christos 
    293      1.1  christos <h4 class="subsection">listpeers option (-l)</h4>
    294      1.1  christos 
    295      1.1  christos <p><a name="index-ntpdc_002dlistpeers-8"></a>
    296      1.1  christos This is the &ldquo;print a list of the peers&rdquo; option.
    297      1.1  christos 
    298      1.1  christos <p class="noindent">This option has some usage constraints.  It:
    299      1.1  christos      <ul>
    300      1.1  christos <li>must not appear in combination with any of the following options:
    301      1.1  christos command. 
    302      1.1  christos </ul>
    303      1.1  christos 
    304      1.1  christos   <p>Print a list of the peers known to the server as well as a summary of
    305      1.1  christos their state. This is equivalent to the 'listpeers' interactive command. 
    306      1.1  christos <div class="node">
    307      1.1  christos <p><hr>
    308      1.1  christos <a name="ntpdc-numeric"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-peers">ntpdc peers</a>,
    309      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-listpeers">ntpdc listpeers</a>,
    310      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    311      1.1  christos <br>
    312      1.1  christos </div>
    313      1.1  christos 
    314      1.1  christos <h4 class="subsection">numeric option (-n)</h4>
    315      1.1  christos 
    316      1.1  christos <p><a name="index-ntpdc_002dnumeric-9"></a>
    317      1.1  christos This is the &ldquo;numeric host addresses&rdquo; option. 
    318      1.1  christos Output all host addresses in dotted-quad numeric format rather than
    319      1.1  christos converting to the canonical host names. 
    320      1.1  christos <div class="node">
    321      1.1  christos <p><hr>
    322      1.1  christos <a name="ntpdc-peers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-showpeers">ntpdc showpeers</a>,
    323      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-numeric">ntpdc numeric</a>,
    324      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    325      1.1  christos <br>
    326      1.1  christos </div>
    327      1.1  christos 
    328      1.1  christos <h4 class="subsection">peers option (-p)</h4>
    329      1.1  christos 
    330      1.1  christos <p><a name="index-ntpdc_002dpeers-10"></a>
    331      1.1  christos This is the &ldquo;print a list of the peers&rdquo; option.
    332      1.1  christos 
    333      1.1  christos <p class="noindent">This option has some usage constraints.  It:
    334      1.1  christos      <ul>
    335      1.1  christos <li>must not appear in combination with any of the following options:
    336      1.1  christos command. 
    337      1.1  christos </ul>
    338      1.1  christos 
    339      1.1  christos   <p>Print a list of the peers known to the server as well as a summary
    340      1.1  christos of their state. This is equivalent to the 'peers' interactive command. 
    341      1.1  christos <div class="node">
    342      1.1  christos <p><hr>
    343      1.1  christos <a name="ntpdc-showpeers"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-config">ntpdc config</a>,
    344      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-peers">ntpdc peers</a>,
    345      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    346      1.1  christos <br>
    347      1.1  christos </div>
    348      1.1  christos 
    349      1.1  christos <h4 class="subsection">showpeers option (-s)</h4>
    350      1.1  christos 
    351      1.1  christos <p><a name="index-ntpdc_002dshowpeers-11"></a>
    352      1.1  christos This is the &ldquo;show a list of the peers&rdquo; option.
    353      1.1  christos 
    354      1.1  christos <p class="noindent">This option has some usage constraints.  It:
    355      1.1  christos      <ul>
    356      1.1  christos <li>must not appear in combination with any of the following options:
    357      1.1  christos command. 
    358      1.1  christos </ul>
    359      1.1  christos 
    360      1.1  christos   <p>Print a list of the peers known to the server as well as a summary
    361      1.1  christos of their state. This is equivalent to the 'dmpeers' interactive command.
    362      1.1  christos 
    363      1.1  christos <div class="node">
    364      1.1  christos <p><hr>
    365      1.1  christos <a name="ntpdc-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-exit-status">ntpdc exit status</a>,
    366      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-showpeers">ntpdc showpeers</a>,
    367      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    368      1.1  christos <br>
    369      1.1  christos </div>
    370      1.1  christos 
    371      1.1  christos <h4 class="subsection">presetting/configuring ntpdc</h4>
    372      1.1  christos 
    373      1.1  christos <p>Any option that is not marked as <i>not presettable</i> may be preset by
    374      1.1  christos loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>NTPDC</code> and <code>NTPDC_&lt;OPTION_NAME&gt;</code>.  <code>&lt;OPTION_NAME&gt;</code> must be one of
    375      1.1  christos the options listed above in upper case and segmented with underscores. 
    376      1.1  christos The <code>NTPDC</code> variable will be tokenized and parsed like
    377      1.1  christos the command line.  The remaining variables are tested for existence and their
    378      1.1  christos values are treated like option arguments.
    379      1.1  christos 
    380      1.1  christos <p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
    381      1.1  christos      <ul>
    382      1.1  christos <li>$HOME
    383      1.1  christos <li>$PWD
    384      1.1  christos </ul>
    385      1.1  christos   The environment variables <code>HOME</code>, and <code>PWD</code>
    386      1.1  christos are expanded and replaced when <span class="file">ntpdc</span> runs. 
    387      1.1  christos For any of these that are plain files, they are simply processed. 
    388      1.1  christos For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
    389      1.1  christos within that directory and processed.
    390      1.1  christos 
    391      1.1  christos   <p>Configuration files may be in a wide variety of formats. 
    392      1.1  christos The basic format is an option name followed by a value (argument) on the
    393      1.1  christos same line.  Values may be separated from the option name with a colon,
    394      1.1  christos equal sign or simply white space.  Values may be continued across multiple
    395      1.1  christos lines by escaping the newline with a backslash.
    396      1.1  christos 
    397      1.1  christos   <p>Multiple programs may also share the same initialization file. 
    398      1.1  christos Common options are collected at the top, followed by program specific
    399      1.1  christos segments.  The segments are separated by lines like:
    400      1.1  christos <pre class="example">    [NTPDC]
    401      1.1  christos </pre>
    402      1.1  christos   <p class="noindent">or by
    403      1.1  christos <pre class="example">    &lt;?program ntpdc&gt;
    404      1.1  christos </pre>
    405      1.1  christos   <p class="noindent">Do not mix these styles within one configuration file.
    406      1.1  christos 
    407      1.1  christos   <p>Compound values and carefully constructed string values may also be
    408      1.1  christos specified using XML syntax:
    409      1.1  christos <pre class="example">    &lt;option-name&gt;
    410      1.1  christos        &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
    411      1.1  christos     &lt;/option-name&gt;
    412      1.1  christos </pre>
    413      1.1  christos   <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
    414      1.1  christos <pre class="example">    "...&lt;...&gt;..."
    415      1.1  christos </pre>
    416      1.1  christos   <p><code>AutoOpts</code> does not track suboptions.  You simply note that it is a
    417      1.1  christos hierarchicly valued option.  <code>AutoOpts</code> does provide a means for searching
    418      1.1  christos the associated name/value pair list (see: optionFindValue).
    419      1.1  christos 
    420      1.1  christos   <p>The command line options relating to configuration and/or usage help are:
    421      1.1  christos 
    422      1.1  christos <h5 class="subsubheading">version (-)</h5>
    423      1.1  christos 
    424      1.1  christos <p>Print the program version to standard out, optionally with licensing
    425      1.1  christos information, then exit 0.  The optional argument specifies how much licensing
    426      1.1  christos detail to provide.  The default is to print just the version.  The licensing infomation may be selected with an option argument. 
    427      1.1  christos Only the first letter of the argument is examined:
    428      1.1  christos 
    429      1.1  christos      <dl>
    430      1.1  christos <dt><span class="samp">version</span><dd>Only print the version.  This is the default. 
    431      1.1  christos <br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms. 
    432      1.1  christos <br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms. 
    433      1.1  christos </dl>
    434      1.1  christos 
    435      1.1  christos <div class="node">
    436      1.1  christos <p><hr>
    437      1.1  christos <a name="ntpdc-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Usage">ntpdc Usage</a>,
    438      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-config">ntpdc config</a>,
    439      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    440      1.1  christos <br>
    441      1.1  christos </div>
    442      1.1  christos 
    443      1.1  christos <h4 class="subsection">ntpdc exit status</h4>
    444      1.1  christos 
    445      1.1  christos <p>One of the following exit values will be returned:
    446      1.1  christos      <dl>
    447      1.1  christos <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution. 
    448      1.1  christos <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid. 
    449      1.1  christos <br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded. 
    450      1.1  christos <br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error.  Please report
    451      1.1  christos it to autogen-users (a] lists.sourceforge.net.  Thank you. 
    452      1.1  christos </dl>
    453      1.1  christos   <div class="node">
    454      1.1  christos <p><hr>
    455      1.1  christos <a name="ntpdc-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-See-Also">ntpdc See Also</a>,
    456      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-exit-status">ntpdc exit status</a>,
    457      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    458      1.1  christos <br>
    459      1.1  christos </div>
    460      1.1  christos 
    461      1.1  christos <h4 class="subsection">ntpdc Usage</h4>
    462      1.1  christos 
    463      1.1  christos <div class="node">
    464      1.1  christos <p><hr>
    465      1.1  christos <a name="ntpdc-See-Also"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Authors">ntpdc Authors</a>,
    466      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-Usage">ntpdc Usage</a>,
    467      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    468      1.1  christos <br>
    469      1.1  christos </div>
    470      1.1  christos 
    471      1.1  christos <h4 class="subsection">ntpdc See Also</h4>
    472      1.1  christos 
    473      1.1  christos <div class="node">
    474      1.1  christos <p><hr>
    475      1.1  christos <a name="ntpdc-Authors"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpdc-Bugs">ntpdc Bugs</a>,
    476      1.1  christos Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-See-Also">ntpdc See Also</a>,
    477      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    478      1.1  christos <br>
    479      1.1  christos </div>
    480      1.1  christos 
    481      1.1  christos <h4 class="subsection">ntpdc Authors</h4>
    482      1.1  christos 
    483      1.1  christos <div class="node">
    484      1.1  christos <p><hr>
    485      1.1  christos <a name="ntpdc-Bugs"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpdc-Authors">ntpdc Authors</a>,
    486      1.1  christos Up:&nbsp;<a rel="up" accesskey="u" href="#ntpdc-Invocation">ntpdc Invocation</a>
    487      1.1  christos <br>
    488      1.1  christos </div>
    489      1.1  christos 
    490      1.1  christos <h4 class="subsection">ntpdc Bugs</h4>
    491      1.1  christos 
    492      1.1  christos <div class="node">
    493      1.1  christos <p><hr>
    494      1.1  christos <a name="Usage"></a>
    495      1.1  christos <br>
    496      1.1  christos </div>
    497      1.1  christos 
    498      1.1  christos <!-- node-name,  next,  previous,  up -->
    499      1.1  christos <h3 class="section">Usage</h3>
    500      1.1  christos 
    501      1.1  christos <p>The simplest use of this program is as an unprivileged command to
    502      1.1  christos check the current time, offset, and error in the local clock. 
    503      1.1  christos For example:
    504      1.1  christos 
    505      1.1  christos <pre class="example">    ntpdc ntpserver.somewhere
    506      1.1  christos </pre>
    507      1.1  christos   <p>With suitable privilege, it can be run as a command or in a
    508      1.1  christos <code>cron</code> job to reset the local clock from a reliable server, like
    509      1.1  christos the <code>ntpdate</code> and <code>rdate</code> commands. 
    510      1.1  christos For example:
    511      1.1  christos 
    512      1.1  christos <pre class="example">    ntpdc -a ntpserver.somewhere
    513      1.1  christos </pre>
    514      1.1  christos   </body></html>
    515      1.1  christos 
    516