<p>This document applies to version 4.2.6p3-RC11 of <code>sntp</code>.
- <p>The program implements the SNTP protocol as defined by the draft NTPv4
+ <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
<div class="shortcontents">
<ul class="menu">
<li><a accesskey="1" href="#sntp-Description">sntp Description</a>: Description
-* sntp Invocation:: Invoking sntp
-<li><a accesskey="2" href="#Usage">Usage</a>: Usage
+<li><a accesskey="2" href="#sntp-Invocation">sntp Invocation</a>: Invoking sntp
+<li><a accesskey="3" href="#Usage">Usage</a>: Usage
</ul>
<div class="node">
<p><hr>
-<a name="sntp-Description"></a>Next: <a rel="next" accesskey="n" href="#Usage">Usage</a>,
-Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
-Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+<a name="sntp-Description"></a>
<br>
</div>
<p>where the +4.567 +/- 0.089 secs indicates the time offset and
error bound of the system clock relative to the server clock.
-<!-- @include sntp-opts.texi -->
<div class="node">
<p><hr>
-<a name="Usage"></a>Previous: <a rel="previous" accesskey="p" href="#sntp-Description">sntp Description</a>,
-Up: <a rel="up" accesskey="u" href="#Top">Top</a>
+<a name="sntp-Invocation"></a>
+<br>
+</div>
+
+<h3 class="section">Invoking sntp</h3>
+
+<p><a name="index-sntp-1"></a><a name="index-standard-SNTP-program-2"></a>This program has no explanation.
+
+ <p>.I sntp
+implements the Simple Network Time Protocol, and is used
+to query an NTP or SNTP server and either
+display the time
+or
+set the local system's time (given suitable privilege).
+
+ <p>It can be
+run interactively from the command line or as a
+.I cron
+job.
+
+ <p>NTP and SNTP are defined by RFC 5905, which
+obsoletes RFC 4330 and RFC 1305.
+
+ <p>This section was generated by <strong>AutoGen</strong>,
+the aginfo template and the option descriptions for the <span class="command">sntp</span> program. It documents the sntp usage text and option meanings.
+
+ <p>This software is released under a specialized copyright license.
+
+<ul class="menu">
+<li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp usage help (-?)
+<li><a accesskey="2" href="#sntp-adjtime">sntp adjtime</a>: adjtime option (-j)
+<li><a accesskey="3" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
+<li><a accesskey="4" href="#sntp-broadcast">sntp broadcast</a>: broadcast option (-b)
+<li><a accesskey="5" href="#sntp-filelog">sntp filelog</a>: filelog option (-l)
+<li><a accesskey="6" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
+<li><a accesskey="7" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
+<li><a accesskey="8" href="#sntp-keyfile">sntp keyfile</a>: keyfile option (-k)
+<li><a accesskey="9" href="#sntp-kod">sntp kod</a>: kod option (-K)
+<li><a href="#sntp-normalverbose">sntp normalverbose</a>: normalverbose option (-d)
+<li><a href="#sntp-settod">sntp settod</a>: settod option (-s)
+<li><a href="#sntp-syslog">sntp syslog</a>: syslog option (-p)
+<li><a href="#sntp-timeout">sntp timeout</a>: timeout option (-t)
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="sntp-usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-adjtime">sntp adjtime</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">sntp usage help (-?)</h4>
+
+<p><a name="index-sntp-usage-3"></a>
+This is the automatically generated usage text for sntp:
+
+<pre class="example">sntp is unavailable - no --help
+</pre>
+ <div class="node">
+<p><hr>
+<a name="sntp-adjtime"></a>Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">adjtime option (-j)</h4>
+
+<p><a name="index-sntp_002dadjtime-4"></a>
+This is the “set (slew) the time with adjtime()” option.
+
+ <p>This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+settod.
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="sntp-authentication"></a>Next: <a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-adjtime">sntp adjtime</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">authentication option (-a)</h4>
+
+<p><a name="index-sntp_002dauthentication-5"></a>
+This is the “enable authentication with the key auth-keynumber” option.
+This option enables authentication using the key specified in this option's argument.
+The argument of this option is the keyid, a number specified in the keyfile as this
+key's identifier. See the keyfile option (-k) for more details.
+
+<div class="node">
+<p><hr>
+<a name="sntp-broadcast"></a>Next: <a rel="next" accesskey="n" href="#sntp-filelog">sntp filelog</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">broadcast option (-b)</h4>
+
+<p><a name="index-sntp_002dbroadcast-6"></a>
+This is the “use broadcasts to the address specified for synchronisation” option.
+If specified SNTP will listen to the specified broadcast address
+for NTP broadcasts. The default maximum wait time,
+68 seconds, can be modified with -t.
+
+<div class="node">
+<p><hr>
+<a name="sntp-filelog"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">filelog option (-l)</h4>
+
+<p><a name="index-sntp_002dfilelog-7"></a>
+This is the “log to specified logfile” option.
+
+ <p>This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+syslog.
+</ul>
+
+ <p>This option causes the client to write log messages to the specified
+logfile.
+
+<div class="node">
+<p><hr>
+<a name="sntp-ipv4"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-filelog">sntp filelog</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ipv4 option (-4)</h4>
+
+<p><a name="index-sntp_002dipv4-8"></a>
+This is the “force ipv4 dns name resolution” option.
+
+ <p>This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv6.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+to the IPv4 namespace.
+
+<div class="node">
+<p><hr>
+<a name="sntp-ipv6"></a>Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">ipv6 option (-6)</h4>
+
+<p><a name="index-sntp_002dipv6-9"></a>
+This is the “force ipv6 dns name resolution” option.
+
+ <p>This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+ipv4.
+</ul>
+
+ <p>Force DNS resolution of following host names on the command line
+to the IPv6 namespace.
+
+<div class="node">
+<p><hr>
+<a name="sntp-keyfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">keyfile option (-k)</h4>
+
+<p><a name="index-sntp_002dkeyfile-10"></a>
+This is the “specify a keyfile. sntp will look in this file for the key specified with -a” option.
+This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
+file. Key files follow the following format:
+
+ <p>keyid keytype key
+
+ <p>Where keyid is a number identifying this key
+keytype is one of the follow:
+S Key in 64 Bit hexadecimal number as specified in in the DES specification.
+N Key in 64 Bit hexadecimal number as specified in the NTP standard.
+A Key in a 1-to-8 character ASCII string.
+M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
+
+ <p>For more information see ntp.keys(5).
+
+<div class="node">
+<p><hr>
+<a name="sntp-kod"></a>Next: <a rel="next" accesskey="n" href="#sntp-normalverbose">sntp normalverbose</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">kod option (-K)</h4>
+
+<p><a name="index-sntp_002dkod-11"></a>
+This is the “kod history filename” option.
+Modifies the filename to be used to persist the history of KoD
+responses received from servers. The default is
+/var/db/ntp-kod.
+
+<div class="node">
+<p><hr>
+<a name="sntp-normalverbose"></a>Next: <a rel="next" accesskey="n" href="#sntp-settod">sntp settod</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">normalverbose option (-d)</h4>
+
+<p><a name="index-sntp_002dnormalverbose-12"></a>
+This is the “normal verbose” option.
+Diagnostic messages for non-fatal errors and a limited amount of
+tracing should be written to standard error. Fatal ones always
+produce a diagnostic. This option should be set when there is a
+suspected problem with the server, network or the source.
+
+<div class="node">
+<p><hr>
+<a name="sntp-settod"></a>Next: <a rel="next" accesskey="n" href="#sntp-syslog">sntp syslog</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-normalverbose">sntp normalverbose</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">settod option (-s)</h4>
+
+<p><a name="index-sntp_002dsettod-13"></a>
+This is the “set (step) the time with settimeofday()” option.
+
+ <p>This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+adjtime.
+</ul>
+
+<div class="node">
+<p><hr>
+<a name="sntp-syslog"></a>Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
+Previous: <a rel="previous" accesskey="p" href="#sntp-settod">sntp settod</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">syslog option (-p)</h4>
+
+<p><a name="index-sntp_002dsyslog-14"></a>
+This is the “logging with syslog” option.
+
+ <p>This option has some usage constraints. It:
+ <ul>
+<li>must not appear in combination with any of the following options:
+filelog.
+</ul>
+
+ <p>When this option is set all logging will be done using syslog.
+
+<div class="node">
+<p><hr>
+<a name="sntp-timeout"></a>Previous: <a rel="previous" accesskey="p" href="#sntp-syslog">sntp syslog</a>,
+Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
+<br>
+</div>
+
+<h4 class="subsection">timeout option (-t)</h4>
+
+<p><a name="index-sntp_002dtimeout-15"></a>
+This is the “specify the number of seconds to wait for broadcasts” option.
+When waiting for a broadcast packet SNTP will wait the number
+of seconds specified before giving up. Default 68 seconds.
+
+<div class="node">
+<p><hr>
+<a name="Usage"></a>
<br>
</div>
check the current time, offset, and error in the local clock.
For example:
-<pre class="example"> sntp ntpserver.somewhere
+<pre class="example"> sntp ntpserver.somewhere
</pre>
<p>With suitable privilege, it can be run as a command or in a
<code>crom</code> job to reset the local clock from a reliable server, like
the <code>ntpdate</code> and <code>rdate</code> commands.
For example:
-<pre class="example"> sntp -a ntpserver.somewhere
+<pre class="example"> sntp -a ntpserver.somewhere
</pre>
</body></html>