xref: /freebsd/contrib/ntp/sntp/sntp.html (revision 4e1ef62a367de01ccb7156bfe6ec2d613d6eb860)
12b15cb3dSCy Schubert<html lang="en">
22b15cb3dSCy Schubert<head>
32b15cb3dSCy Schubert<title>Sntp User's Manual</title>
42b15cb3dSCy Schubert<meta http-equiv="Content-Type" content="text/html">
52b15cb3dSCy Schubert<meta name="description" content="Sntp User's Manual">
62b15cb3dSCy Schubert<meta name="generator" content="makeinfo 4.7">
72b15cb3dSCy Schubert<link title="Top" rel="top" href="#Top">
82b15cb3dSCy Schubert<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
92b15cb3dSCy Schubert<meta http-equiv="Content-Style-Type" content="text/css">
102b15cb3dSCy Schubert<style type="text/css"><!--
112b15cb3dSCy Schubert  pre.display { font-family:inherit }
122b15cb3dSCy Schubert  pre.format  { font-family:inherit }
132b15cb3dSCy Schubert  pre.smalldisplay { font-family:inherit; font-size:smaller }
142b15cb3dSCy Schubert  pre.smallformat  { font-family:inherit; font-size:smaller }
152b15cb3dSCy Schubert  pre.smallexample { font-size:smaller }
162b15cb3dSCy Schubert  pre.smalllisp    { font-size:smaller }
172b15cb3dSCy Schubert  span.sc { font-variant:small-caps }
182b15cb3dSCy Schubert  span.roman { font-family: serif; font-weight: normal; }
192b15cb3dSCy Schubert--></style>
202b15cb3dSCy Schubert</head>
212b15cb3dSCy Schubert<body>
222b15cb3dSCy Schubert<h1 class="settitle">Sntp User's Manual</h1>
232b15cb3dSCy Schubert<div class="node">
242b15cb3dSCy Schubert<p><hr>
252b15cb3dSCy Schubert<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
262b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
272b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
282b15cb3dSCy Schubert<br>
292b15cb3dSCy Schubert</div>
302b15cb3dSCy Schubert
312b15cb3dSCy Schubert<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
322b15cb3dSCy Schubert
332b15cb3dSCy Schubert<p>This document describes the use of the NTP Project's <code>sntp</code> program,
342b15cb3dSCy Schubertthat can be used to query a Network Time Protocol (NTP) server and
352b15cb3dSCy Schubertdisplay the time offset of the system clock relative to the server
362b15cb3dSCy Schubertclock.  Run as root, it can correct the system clock to this offset as
372b15cb3dSCy Schubertwell.  It can be run as an interactive command or from a cron job.
382b15cb3dSCy Schubert
39*4e1ef62aSXin LI  <p>This document applies to version 4.2.8p12 of <code>sntp</code>.
402b15cb3dSCy Schubert
412b15cb3dSCy Schubert  <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
422b15cb3dSCy SchubertIETF specification.
432b15cb3dSCy Schubert
442b15cb3dSCy Schubert  <div class="shortcontents">
452b15cb3dSCy Schubert<h2>Short Contents</h2>
462b15cb3dSCy Schubert<ul>
472b15cb3dSCy Schubert<a href="#Top">Simple Network Time Protocol User Manual</a>
482b15cb3dSCy Schubert</ul>
492b15cb3dSCy Schubert</div>
502b15cb3dSCy Schubert
512b15cb3dSCy Schubert<ul class="menu">
522b15cb3dSCy Schubert<li><a accesskey="1" href="#sntp-Description">sntp Description</a>:             Description
532b15cb3dSCy Schubert<li><a accesskey="2" href="#sntp-Invocation">sntp Invocation</a>: 		Invoking sntp
542b15cb3dSCy Schubert<li><a accesskey="3" href="#Usage">Usage</a>:                        Usage
552b15cb3dSCy Schubert</ul>
562b15cb3dSCy Schubert
572b15cb3dSCy Schubert<div class="node">
582b15cb3dSCy Schubert<p><hr>
592b15cb3dSCy Schubert<a name="sntp-Description"></a>
602b15cb3dSCy Schubert<br>
612b15cb3dSCy Schubert</div>
622b15cb3dSCy Schubert
632b15cb3dSCy Schubert<!-- node-name,  next,  previous,  up -->
642b15cb3dSCy Schubert<h3 class="section">Description</h3>
652b15cb3dSCy Schubert
662b15cb3dSCy Schubert<p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
672b15cb3dSCy Schubertstandard output in the format:
682b15cb3dSCy Schubert
692b15cb3dSCy Schubert<pre class="example">     1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
702b15cb3dSCy Schubert</pre>
712b15cb3dSCy Schubert  <p>where
722b15cb3dSCy SchubertYYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
732b15cb3dSCy Schubert(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
742b15cb3dSCy Schubertand
752b15cb3dSCy Schubertthe +4.567 +/- 0.089 secs indicates the time offset and
762b15cb3dSCy Schuberterror bound of the system clock relative to the server clock.
772b15cb3dSCy Schubert
782b15cb3dSCy Schubert<div class="node">
792b15cb3dSCy Schubert<p><hr>
802b15cb3dSCy Schubert<a name="sntp-Invocation"></a>
812b15cb3dSCy Schubert<br>
822b15cb3dSCy Schubert</div>
832b15cb3dSCy Schubert
842b15cb3dSCy Schubert<h3 class="section">Invoking sntp</h3>
852b15cb3dSCy Schubert
862b15cb3dSCy Schubert<p><a name="index-sntp-1"></a><a name="index-standard-Simple-Network-Time-Protocol-client-program-2"></a>
872b15cb3dSCy Schubert
882b15cb3dSCy Schubert  <p><code>sntp</code>
892b15cb3dSCy Schubertcan be used as an SNTP client to query a NTP or SNTP server and either display
902b15cb3dSCy Schubertthe time or set the local system's time (given suitable privilege).  It can be
912b15cb3dSCy Schubertrun as an interactive command or from a
922b15cb3dSCy Schubert<code>cron</code>
932b15cb3dSCy Schubertjob.
942b15cb3dSCy Schubert
952b15cb3dSCy Schubert  <p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
962b15cb3dSCy Schubertare defined and described by RFC 5905.
972b15cb3dSCy Schubert
982b15cb3dSCy Schubert  <p>The default is to write the estimated correct local date and time (i.e. not
992b15cb3dSCy SchubertUTC) to the standard output in a format like:
1002b15cb3dSCy Schubert
1012b15cb3dSCy Schubert  <p><code>'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'</code>
1022b15cb3dSCy Schubert
1032b15cb3dSCy Schubert  <p>where the
1042b15cb3dSCy Schubert<code>'(+0800)'</code>
1052b15cb3dSCy Schubertmeans that to get to UTC from the reported local time one must
1062b15cb3dSCy Schubertadd 8 hours and 0 minutes,
1072b15cb3dSCy Schubertthe
1082b15cb3dSCy Schubert<code>'+4.567'</code>
1092b15cb3dSCy Schubertindicates the local clock is 4.567 seconds behind the correct time
1102b15cb3dSCy Schubert(so 4.567 seconds must be added to the local clock to get it to be correct).
1112b15cb3dSCy SchubertNote that the number of decimals printed for this value will change
1122b15cb3dSCy Schubertbased on the reported precision of the server.
1132b15cb3dSCy Schubert<code>'+/- 0.089'</code>
1142b15cb3dSCy Schubertis the reported
1152b15cb3dSCy Schubert<em>synchronization</em> <em>distance</em>
1162b15cb3dSCy Schubert(in seconds), which represents the maximum error due to all causes.
1172b15cb3dSCy SchubertIf the server does not report valid data needed to calculate the
1182b15cb3dSCy Schubertsynchronization distance, this will be reported as
1192b15cb3dSCy Schubert<code>'+/- ?'</code>.
1202b15cb3dSCy SchubertIf the
1212b15cb3dSCy Schubert<em>host</em>
1222b15cb3dSCy Schubertis different from the
1232b15cb3dSCy Schubert<em>IP</em>,
1242b15cb3dSCy Schubertboth will be displayed.
1252b15cb3dSCy SchubertOtherwise, only the
1262b15cb3dSCy Schubert<em>IP</em>
1272b15cb3dSCy Schubertis displayed.
1282b15cb3dSCy SchubertFinally, the
1292b15cb3dSCy Schubert<em>stratum</em>
130a25439b6SCy Schubertof the host is reported
131a25439b6SCy Schubertand the leap indicator is decoded and displayed.
1322b15cb3dSCy Schubert
1332b15cb3dSCy Schubert  <p>This section was generated by <strong>AutoGen</strong>,
1342b15cb3dSCy Schubertusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>sntp</code> program.
1352b15cb3dSCy SchubertThis software is released under the NTP license, &lt;http://ntp.org/license&gt;.
1362b15cb3dSCy Schubert
1372b15cb3dSCy Schubert<ul class="menu">
1382b15cb3dSCy Schubert<li><a accesskey="1" href="#sntp-usage">sntp usage</a>:                   sntp help/usage (<span class="option">--help</span>)
1392b15cb3dSCy Schubert<li><a accesskey="2" href="#sntp-ipv4">sntp ipv4</a>:                    ipv4 option (-4)
1402b15cb3dSCy Schubert<li><a accesskey="3" href="#sntp-ipv6">sntp ipv6</a>:                    ipv6 option (-6)
1412b15cb3dSCy Schubert<li><a accesskey="4" href="#sntp-authentication">sntp authentication</a>:          authentication option (-a)
1422b15cb3dSCy Schubert<li><a accesskey="5" href="#sntp-broadcast">sntp broadcast</a>:               broadcast option (-b)
1432b15cb3dSCy Schubert<li><a accesskey="6" href="#sntp-concurrent">sntp concurrent</a>:              concurrent option (-c)
1442b15cb3dSCy Schubert<li><a accesskey="7" href="#sntp-gap">sntp gap</a>:                     gap option (-g)
1452b15cb3dSCy Schubert<li><a accesskey="8" href="#sntp-kod">sntp kod</a>:                     kod option (-K)
1462b15cb3dSCy Schubert<li><a accesskey="9" href="#sntp-keyfile">sntp keyfile</a>:                 keyfile option (-k)
1472b15cb3dSCy Schubert<li><a href="#sntp-logfile">sntp logfile</a>:                 logfile option (-l)
1482b15cb3dSCy Schubert<li><a href="#sntp-steplimit">sntp steplimit</a>:               steplimit option (-M)
1492b15cb3dSCy Schubert<li><a href="#sntp-ntpversion">sntp ntpversion</a>:              ntpversion option (-o)
1502b15cb3dSCy Schubert<li><a href="#sntp-usereservedport">sntp usereservedport</a>:         usereservedport option (-r)
1512b15cb3dSCy Schubert<li><a href="#sntp-timeout">sntp timeout</a>:                 timeout option (-t)
1522b15cb3dSCy Schubert<li><a href="#sntp-wait">sntp wait</a>:                    wait option
1532b15cb3dSCy Schubert<li><a href="#sntp-config">sntp config</a>:                  presetting/configuring sntp
1542b15cb3dSCy Schubert<li><a href="#sntp-exit-status">sntp exit status</a>:             exit status
1552b15cb3dSCy Schubert<li><a href="#sntp-Usage">sntp Usage</a>:                   Usage
1562b15cb3dSCy Schubert<li><a href="#sntp-Authors">sntp Authors</a>:                 Authors
1572b15cb3dSCy Schubert</ul>
1582b15cb3dSCy Schubert
1592b15cb3dSCy Schubert<div class="node">
1602b15cb3dSCy Schubert<p><hr>
1612b15cb3dSCy Schubert<a name="sntp-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
1622b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
1632b15cb3dSCy Schubert<br>
1642b15cb3dSCy Schubert</div>
1652b15cb3dSCy Schubert
1662b15cb3dSCy Schubert<h4 class="subsection">sntp help/usage (<span class="option">--help</span>)</h4>
1672b15cb3dSCy Schubert
1682b15cb3dSCy Schubert<p><a name="index-sntp-help-3"></a>
1692b15cb3dSCy SchubertThis is the automatically generated usage text for sntp.
1702b15cb3dSCy Schubert
1712b15cb3dSCy Schubert  <p>The text printed is the same whether selected with the <code>help</code> option
1722b15cb3dSCy Schubert(<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>).  <code>more-help</code> will print
1732b15cb3dSCy Schubertthe usage text by passing it through a pager program.
1742b15cb3dSCy Schubert<code>more-help</code> is disabled on platforms without a working
1752b15cb3dSCy Schubert<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
1762b15cb3dSCy Schubertused to select the program, defaulting to <span class="file">more</span>.  Both will exit
1772b15cb3dSCy Schubertwith a status code of 0.
1782b15cb3dSCy Schubert
179*4e1ef62aSXin LI<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p12
180*4e1ef62aSXin LIUsage:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
1812b15cb3dSCy Schubert                [ hostname-or-IP ...]
1822b15cb3dSCy Schubert  Flg Arg Option-Name    Description
1832b15cb3dSCy Schubert   -4 no  ipv4           Force IPv4 DNS name resolution
184*4e1ef62aSXin LI                                - prohibits the option 'ipv6'
1852b15cb3dSCy Schubert   -6 no  ipv6           Force IPv6 DNS name resolution
186*4e1ef62aSXin LI                                - prohibits the option 'ipv4'
187*4e1ef62aSXin LI   -a Num authentication Enable authentication with the key auth-keynumber
1882b15cb3dSCy Schubert   -b Str broadcast      Listen to the address specified for broadcast time sync
1892b15cb3dSCy Schubert                                - may appear multiple times
1902b15cb3dSCy Schubert   -c Str concurrent     Concurrently query all IPs returned for host-name
1912b15cb3dSCy Schubert                                - may appear multiple times
1922b15cb3dSCy Schubert   -d no  debug-level    Increase debug verbosity level
1932b15cb3dSCy Schubert                                - may appear multiple times
194*4e1ef62aSXin LI   -D Num set-debug-level Set the debug verbosity level
1952b15cb3dSCy Schubert                                - may appear multiple times
1962b15cb3dSCy Schubert   -g Num gap            The gap (in milliseconds) between time requests
1972b15cb3dSCy Schubert   -K Fil kod            KoD history filename
198*4e1ef62aSXin LI   -k Fil keyfile        Look in this file for the key specified with -a
1992b15cb3dSCy Schubert   -l Fil logfile        Log to specified logfile
200*4e1ef62aSXin LI   -M Num steplimit      Adjustments less than steplimit msec will be slewed
201*4e1ef62aSXin LI                                - it must be in the range:
2022b15cb3dSCy Schubert                                  greater than or equal to 0
203*4e1ef62aSXin LI   -o Num ntpversion     Send int as our NTP protocol version
204*4e1ef62aSXin LI                                - it must be in the range:
2052b15cb3dSCy Schubert                                  0 to 7
2062b15cb3dSCy Schubert   -r no  usereservedport Use the NTP Reserved Port (port 123)
207*4e1ef62aSXin LI   -S no  step           OK to 'step' the time with settimeofday(2)
208*4e1ef62aSXin LI   -s no  slew           OK to 'slew' the time with adjtime(2)
209*4e1ef62aSXin LI   -t Num timeout        The number of seconds to wait for responses
2102b15cb3dSCy Schubert      no  wait           Wait for pending replies (if not setting the time)
211*4e1ef62aSXin LI                                - disabled as '--no-wait'
2122b15cb3dSCy Schubert                                - enabled by default
213*4e1ef62aSXin LI      opt version        output version information and exit
214*4e1ef62aSXin LI   -? no  help           display extended usage information and exit
215*4e1ef62aSXin LI   -! no  more-help      extended usage information passed thru pager
216*4e1ef62aSXin LI   -&gt; opt save-opts      save the option state to a config file
217*4e1ef62aSXin LI   -&lt; Str load-opts      load options from a config file
218*4e1ef62aSXin LI                                - disabled as '--no-load-opts'
2192b15cb3dSCy Schubert                                - may appear multiple times
2202b15cb3dSCy Schubert
2212b15cb3dSCy SchubertOptions are specified by doubled hyphens and their name or by a single
2222b15cb3dSCy Schuberthyphen and the flag character.
2232b15cb3dSCy Schubert
2242b15cb3dSCy Schubert
2252b15cb3dSCy SchubertThe following option preset mechanisms are supported:
2262b15cb3dSCy Schubert - reading file $HOME/.ntprc
2272b15cb3dSCy Schubert - reading file ./.ntprc
2282b15cb3dSCy Schubert - examining environment variables named SNTP_*
2292b15cb3dSCy Schubert
230*4e1ef62aSXin LIPlease send bug reports to:  &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
2312b15cb3dSCy Schubert</pre>
2322b15cb3dSCy Schubert  <div class="node">
2332b15cb3dSCy Schubert<p><hr>
2342b15cb3dSCy Schubert<a name="sntp-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
2352b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
2362b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
2372b15cb3dSCy Schubert<br>
2382b15cb3dSCy Schubert</div>
2392b15cb3dSCy Schubert
2402b15cb3dSCy Schubert<h4 class="subsection">ipv4 option (-4)</h4>
2412b15cb3dSCy Schubert
2422b15cb3dSCy Schubert<p><a name="index-sntp_002dipv4-4"></a>
2432b15cb3dSCy SchubertThis is the &ldquo;force ipv4 dns name resolution&rdquo; option.
2442b15cb3dSCy Schubert
2452b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
2462b15cb3dSCy Schubert     <ul>
2472b15cb3dSCy Schubert<li>must not appear in combination with any of the following options:
2482b15cb3dSCy Schubertipv6.
2492b15cb3dSCy Schubert</ul>
2502b15cb3dSCy Schubert
2512b15cb3dSCy Schubert  <p>Force DNS resolution of the following host names on the command line
2522b15cb3dSCy Schubertto the IPv4 namespace.
2532b15cb3dSCy Schubert<div class="node">
2542b15cb3dSCy Schubert<p><hr>
2552b15cb3dSCy Schubert<a name="sntp-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
2562b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
2572b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
2582b15cb3dSCy Schubert<br>
2592b15cb3dSCy Schubert</div>
2602b15cb3dSCy Schubert
2612b15cb3dSCy Schubert<h4 class="subsection">ipv6 option (-6)</h4>
2622b15cb3dSCy Schubert
2632b15cb3dSCy Schubert<p><a name="index-sntp_002dipv6-5"></a>
2642b15cb3dSCy SchubertThis is the &ldquo;force ipv6 dns name resolution&rdquo; option.
2652b15cb3dSCy Schubert
2662b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
2672b15cb3dSCy Schubert     <ul>
2682b15cb3dSCy Schubert<li>must not appear in combination with any of the following options:
2692b15cb3dSCy Schubertipv4.
2702b15cb3dSCy Schubert</ul>
2712b15cb3dSCy Schubert
2722b15cb3dSCy Schubert  <p>Force DNS resolution of the following host names on the command line
2732b15cb3dSCy Schubertto the IPv6 namespace.
2742b15cb3dSCy Schubert<div class="node">
2752b15cb3dSCy Schubert<p><hr>
2762b15cb3dSCy Schubert<a name="sntp-authentication"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
2772b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
2782b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
2792b15cb3dSCy Schubert<br>
2802b15cb3dSCy Schubert</div>
2812b15cb3dSCy Schubert
2822b15cb3dSCy Schubert<h4 class="subsection">authentication option (-a)</h4>
2832b15cb3dSCy Schubert
2842b15cb3dSCy Schubert<p><a name="index-sntp_002dauthentication-6"></a>
2852b15cb3dSCy SchubertThis is the &ldquo;enable authentication with the key <var>auth-keynumber</var>&rdquo; option.
2862b15cb3dSCy SchubertThis option takes a number argument <span class="file">auth-keynumber</span>.
2872b15cb3dSCy SchubertEnable authentication using the key specified in this option's
2882b15cb3dSCy Schubertargument.  The argument of this option is the <span class="option">keyid</span>, a
2892b15cb3dSCy Schubertnumber specified in the <span class="option">keyfile</span> as this key's identifier.
2902b15cb3dSCy SchubertSee the <span class="option">keyfile</span> option (<span class="option">-k</span>) for more details.
2912b15cb3dSCy Schubert<div class="node">
2922b15cb3dSCy Schubert<p><hr>
2932b15cb3dSCy Schubert<a name="sntp-broadcast"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
2942b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
2952b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
2962b15cb3dSCy Schubert<br>
2972b15cb3dSCy Schubert</div>
2982b15cb3dSCy Schubert
2992b15cb3dSCy Schubert<h4 class="subsection">broadcast option (-b)</h4>
3002b15cb3dSCy Schubert
3012b15cb3dSCy Schubert<p><a name="index-sntp_002dbroadcast-7"></a>
3022b15cb3dSCy SchubertThis is the &ldquo;listen to the address specified for broadcast time sync&rdquo; option.
3032b15cb3dSCy SchubertThis option takes a string argument <span class="file">broadcast-address</span>.
3042b15cb3dSCy Schubert
3052b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
3062b15cb3dSCy Schubert     <ul>
3072b15cb3dSCy Schubert<li>may appear an unlimited number of times.
3082b15cb3dSCy Schubert</ul>
3092b15cb3dSCy Schubert
3102b15cb3dSCy Schubert  <p>If specified <code>sntp</code> will listen to the specified address
3112b15cb3dSCy Schubertfor NTP broadcasts.  The default maximum wait time
3122b15cb3dSCy Schubertcan (and probably should) be modified with <span class="option">-t</span>.
3132b15cb3dSCy Schubert<div class="node">
3142b15cb3dSCy Schubert<p><hr>
3152b15cb3dSCy Schubert<a name="sntp-concurrent"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
3162b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
3172b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
3182b15cb3dSCy Schubert<br>
3192b15cb3dSCy Schubert</div>
3202b15cb3dSCy Schubert
3212b15cb3dSCy Schubert<h4 class="subsection">concurrent option (-c)</h4>
3222b15cb3dSCy Schubert
3232b15cb3dSCy Schubert<p><a name="index-sntp_002dconcurrent-8"></a>
3242b15cb3dSCy SchubertThis is the &ldquo;concurrently query all ips returned for host-name&rdquo; option.
3252b15cb3dSCy SchubertThis option takes a string argument <span class="file">host-name</span>.
3262b15cb3dSCy Schubert
3272b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
3282b15cb3dSCy Schubert     <ul>
3292b15cb3dSCy Schubert<li>may appear an unlimited number of times.
3302b15cb3dSCy Schubert</ul>
3312b15cb3dSCy Schubert
3322b15cb3dSCy Schubert  <p>Requests from an NTP "client" to a "server" should never be sent
3332b15cb3dSCy Schubertmore rapidly than one every 2 seconds.  By default, any IPs returned
3342b15cb3dSCy Schubertas part of a DNS lookup are assumed to be for a single instance of
3352b15cb3dSCy Schubert<code>ntpd</code>, and therefore <code>sntp</code> will send queries to these IPs
3362b15cb3dSCy Schubertone after another, with a 2-second gap in between each query.
3372b15cb3dSCy Schubert
3382b15cb3dSCy Schubert  <p>The <span class="option">-c</span> or <span class="option">--concurrent</span> flag says that any IPs
3392b15cb3dSCy Schubertreturned for the DNS lookup of the supplied host-name are on
3402b15cb3dSCy Schubertdifferent machines, so we can send concurrent queries.
3412b15cb3dSCy Schubert<div class="node">
3422b15cb3dSCy Schubert<p><hr>
3432b15cb3dSCy Schubert<a name="sntp-gap"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
3442b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-concurrent">sntp concurrent</a>,
3452b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
3462b15cb3dSCy Schubert<br>
3472b15cb3dSCy Schubert</div>
3482b15cb3dSCy Schubert
3492b15cb3dSCy Schubert<h4 class="subsection">gap option (-g)</h4>
3502b15cb3dSCy Schubert
3512b15cb3dSCy Schubert<p><a name="index-sntp_002dgap-9"></a>
3522b15cb3dSCy SchubertThis is the &ldquo;the gap (in milliseconds) between time requests&rdquo; option.
3532b15cb3dSCy SchubertThis option takes a number argument <span class="file">milliseconds</span>.
3542b15cb3dSCy SchubertSince we're only going to use the first valid response we get and
3552b15cb3dSCy Schubertthere is benefit to specifying a good number of servers to query,
3562b15cb3dSCy Schubertseparate the queries we send out by the specified number of
3572b15cb3dSCy Schubertmilliseconds.
3582b15cb3dSCy Schubert<div class="node">
3592b15cb3dSCy Schubert<p><hr>
3602b15cb3dSCy Schubert<a name="sntp-kod"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
3612b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-gap">sntp gap</a>,
3622b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
3632b15cb3dSCy Schubert<br>
3642b15cb3dSCy Schubert</div>
3652b15cb3dSCy Schubert
3662b15cb3dSCy Schubert<h4 class="subsection">kod option (-K)</h4>
3672b15cb3dSCy Schubert
3682b15cb3dSCy Schubert<p><a name="index-sntp_002dkod-10"></a>
3692b15cb3dSCy SchubertThis is the &ldquo;kod history filename&rdquo; option.
3702b15cb3dSCy SchubertThis option takes a file argument <span class="file">file-name</span>.
3712b15cb3dSCy SchubertSpecifies the filename to be used for the persistent history of KoD
3722b15cb3dSCy Schubertresponses received from servers.  If the file does not exist, a
3732b15cb3dSCy Schubertwarning message will be displayed.  The file will not be created.
3742b15cb3dSCy Schubert<div class="node">
3752b15cb3dSCy Schubert<p><hr>
3762b15cb3dSCy Schubert<a name="sntp-keyfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
3772b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
3782b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
3792b15cb3dSCy Schubert<br>
3802b15cb3dSCy Schubert</div>
3812b15cb3dSCy Schubert
3822b15cb3dSCy Schubert<h4 class="subsection">keyfile option (-k)</h4>
3832b15cb3dSCy Schubert
3842b15cb3dSCy Schubert<p><a name="index-sntp_002dkeyfile-11"></a>
3852b15cb3dSCy SchubertThis is the &ldquo;look in this file for the key specified with <span class="option">-a</span>&rdquo; option.
3862b15cb3dSCy SchubertThis option takes a file argument <span class="file">file-name</span>.
3872b15cb3dSCy SchubertThis option specifies the keyfile.
3882b15cb3dSCy Schubert<code>sntp</code> will search for the key specified with <span class="option">-a</span>
3892b15cb3dSCy Schubert<span class="file">keyno</span> in this file.  See <span class="command">ntp.keys(5)</span> for more
3902b15cb3dSCy Schubertinformation.
3912b15cb3dSCy Schubert<div class="node">
3922b15cb3dSCy Schubert<p><hr>
3932b15cb3dSCy Schubert<a name="sntp-logfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
3942b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
3952b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
3962b15cb3dSCy Schubert<br>
3972b15cb3dSCy Schubert</div>
3982b15cb3dSCy Schubert
3992b15cb3dSCy Schubert<h4 class="subsection">logfile option (-l)</h4>
4002b15cb3dSCy Schubert
4012b15cb3dSCy Schubert<p><a name="index-sntp_002dlogfile-12"></a>
4022b15cb3dSCy SchubertThis is the &ldquo;log to specified logfile&rdquo; option.
4032b15cb3dSCy SchubertThis option takes a file argument <span class="file">file-name</span>.
4042b15cb3dSCy SchubertThis option causes the client to write log messages to the specified
4052b15cb3dSCy Schubert<span class="file">logfile</span>.
4062b15cb3dSCy Schubert<div class="node">
4072b15cb3dSCy Schubert<p><hr>
4082b15cb3dSCy Schubert<a name="sntp-steplimit"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ntpversion">sntp ntpversion</a>,
4092b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
4102b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
4112b15cb3dSCy Schubert<br>
4122b15cb3dSCy Schubert</div>
4132b15cb3dSCy Schubert
4142b15cb3dSCy Schubert<h4 class="subsection">steplimit option (-M)</h4>
4152b15cb3dSCy Schubert
4162b15cb3dSCy Schubert<p><a name="index-sntp_002dsteplimit-13"></a>
4172b15cb3dSCy SchubertThis is the &ldquo;adjustments less than <var>steplimit</var> msec will be slewed&rdquo; option.
4182b15cb3dSCy SchubertThis option takes a number argument.
4192b15cb3dSCy SchubertIf the time adjustment is less than <span class="file">steplimit</span> milliseconds,
4202b15cb3dSCy Schubertslew the amount using <span class="command">adjtime(2)</span>.  Otherwise, step the
4212b15cb3dSCy Schubertcorrection using <span class="command">settimeofday(2)</span>.  The default value is 0,
4222b15cb3dSCy Schubertwhich means all adjustments will be stepped.  This is a feature, as
4232b15cb3dSCy Schubertdifferent situations demand different values.
4242b15cb3dSCy Schubert<div class="node">
4252b15cb3dSCy Schubert<p><hr>
4262b15cb3dSCy Schubert<a name="sntp-ntpversion"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
4272b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-steplimit">sntp steplimit</a>,
4282b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
4292b15cb3dSCy Schubert<br>
4302b15cb3dSCy Schubert</div>
4312b15cb3dSCy Schubert
4322b15cb3dSCy Schubert<h4 class="subsection">ntpversion option (-o)</h4>
4332b15cb3dSCy Schubert
4342b15cb3dSCy Schubert<p><a name="index-sntp_002dntpversion-14"></a>
4352b15cb3dSCy SchubertThis is the &ldquo;send <var>int</var> as our ntp protocol version&rdquo; option.
4362b15cb3dSCy SchubertThis option takes a number argument.
4372b15cb3dSCy SchubertWhen sending requests to a remote server, tell them we are running
4382b15cb3dSCy SchubertNTP protocol version <span class="file">ntpversion</span> .
4392b15cb3dSCy Schubert<div class="node">
4402b15cb3dSCy Schubert<p><hr>
4412b15cb3dSCy Schubert<a name="sntp-usereservedport"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
4422b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ntpversion">sntp ntpversion</a>,
4432b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
4442b15cb3dSCy Schubert<br>
4452b15cb3dSCy Schubert</div>
4462b15cb3dSCy Schubert
4472b15cb3dSCy Schubert<h4 class="subsection">usereservedport option (-r)</h4>
4482b15cb3dSCy Schubert
4492b15cb3dSCy Schubert<p><a name="index-sntp_002dusereservedport-15"></a>
4502b15cb3dSCy SchubertThis is the &ldquo;use the ntp reserved port (port 123)&rdquo; option.
4512b15cb3dSCy SchubertUse port 123, which is reserved for NTP, for our network
4522b15cb3dSCy Schubertcommunications.
4532b15cb3dSCy Schubert<div class="node">
4542b15cb3dSCy Schubert<p><hr>
4552b15cb3dSCy Schubert<a name="sntp-timeout"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-wait">sntp wait</a>,
4562b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-usereservedport">sntp usereservedport</a>,
4572b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
4582b15cb3dSCy Schubert<br>
4592b15cb3dSCy Schubert</div>
4602b15cb3dSCy Schubert
4612b15cb3dSCy Schubert<h4 class="subsection">timeout option (-t)</h4>
4622b15cb3dSCy Schubert
4632b15cb3dSCy Schubert<p><a name="index-sntp_002dtimeout-16"></a>
4642b15cb3dSCy SchubertThis is the &ldquo;the number of seconds to wait for responses&rdquo; option.
4652b15cb3dSCy SchubertThis option takes a number argument <span class="file">seconds</span>.
4662b15cb3dSCy SchubertWhen waiting for a reply, <code>sntp</code> will wait the number
4672b15cb3dSCy Schubertof seconds specified before giving up.  The default should be
4682b15cb3dSCy Schubertmore than enough for a unicast response.  If <code>sntp</code> is
4692b15cb3dSCy Schubertonly waiting for a broadcast response a longer timeout is
4702b15cb3dSCy Schubertlikely needed.
4712b15cb3dSCy Schubert<div class="node">
4722b15cb3dSCy Schubert<p><hr>
4732b15cb3dSCy Schubert<a name="sntp-wait"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-config">sntp config</a>,
4742b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-timeout">sntp timeout</a>,
4752b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
4762b15cb3dSCy Schubert<br>
4772b15cb3dSCy Schubert</div>
4782b15cb3dSCy Schubert
4792b15cb3dSCy Schubert<h4 class="subsection">wait option</h4>
4802b15cb3dSCy Schubert
4812b15cb3dSCy Schubert<p><a name="index-sntp_002dwait-17"></a>
4822b15cb3dSCy SchubertThis is the &ldquo;wait for pending replies (if not setting the time)&rdquo; option.
4832b15cb3dSCy Schubert
4842b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
4852b15cb3dSCy Schubert     <ul>
4862b15cb3dSCy Schubert<li>can be disabled with &ndash;no-wait.
4872b15cb3dSCy Schubert<li>It is enabled by default.
4882b15cb3dSCy Schubert</ul>
4892b15cb3dSCy Schubert
4902b15cb3dSCy Schubert  <p>If we are not setting the time, wait for all pending responses.
4912b15cb3dSCy Schubert
4922b15cb3dSCy Schubert<div class="node">
4932b15cb3dSCy Schubert<p><hr>
4942b15cb3dSCy Schubert<a name="sntp-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-exit-status">sntp exit status</a>,
4952b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-wait">sntp wait</a>,
4962b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
4972b15cb3dSCy Schubert<br>
4982b15cb3dSCy Schubert</div>
4992b15cb3dSCy Schubert
5002b15cb3dSCy Schubert<h4 class="subsection">presetting/configuring sntp</h4>
5012b15cb3dSCy Schubert
5022b15cb3dSCy Schubert<p>Any option that is not marked as <i>not presettable</i> may be preset by
5032b15cb3dSCy Schubertloading values from configuration ("rc" or "ini") files, and values from environment variables named <code>SNTP</code> and <code>SNTP_&lt;OPTION_NAME&gt;</code>.  <code>&lt;OPTION_NAME&gt;</code> must be one of
5042b15cb3dSCy Schubertthe options listed above in upper case and segmented with underscores.
5052b15cb3dSCy SchubertThe <code>SNTP</code> variable will be tokenized and parsed like
5062b15cb3dSCy Schubertthe command line.  The remaining variables are tested for existence and their
5072b15cb3dSCy Schubertvalues are treated like option arguments.
5082b15cb3dSCy Schubert
5092b15cb3dSCy Schubert<p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
5102b15cb3dSCy Schubert     <ul>
5112b15cb3dSCy Schubert<li>$HOME
5122b15cb3dSCy Schubert<li>$PWD
5132b15cb3dSCy Schubert</ul>
5142b15cb3dSCy Schubert  The environment variables <code>HOME</code>, and <code>PWD</code>
5152b15cb3dSCy Schubertare expanded and replaced when <span class="file">sntp</span> runs.
5162b15cb3dSCy SchubertFor any of these that are plain files, they are simply processed.
5172b15cb3dSCy SchubertFor any that are directories, then a file named <span class="file">.ntprc</span> is searched for
5182b15cb3dSCy Schubertwithin that directory and processed.
5192b15cb3dSCy Schubert
5202b15cb3dSCy Schubert  <p>Configuration files may be in a wide variety of formats.
5212b15cb3dSCy SchubertThe basic format is an option name followed by a value (argument) on the
5222b15cb3dSCy Schubertsame line.  Values may be separated from the option name with a colon,
5232b15cb3dSCy Schubertequal sign or simply white space.  Values may be continued across multiple
5242b15cb3dSCy Schubertlines by escaping the newline with a backslash.
5252b15cb3dSCy Schubert
5262b15cb3dSCy Schubert  <p>Multiple programs may also share the same initialization file.
5272b15cb3dSCy SchubertCommon options are collected at the top, followed by program specific
5282b15cb3dSCy Schubertsegments.  The segments are separated by lines like:
5292b15cb3dSCy Schubert<pre class="example">    [SNTP]
5302b15cb3dSCy Schubert</pre>
5312b15cb3dSCy Schubert  <p class="noindent">or by
5322b15cb3dSCy Schubert<pre class="example">    &lt;?program sntp&gt;
5332b15cb3dSCy Schubert</pre>
5342b15cb3dSCy Schubert  <p class="noindent">Do not mix these styles within one configuration file.
5352b15cb3dSCy Schubert
5362b15cb3dSCy Schubert  <p>Compound values and carefully constructed string values may also be
5372b15cb3dSCy Schubertspecified using XML syntax:
5382b15cb3dSCy Schubert<pre class="example">    &lt;option-name&gt;
5392b15cb3dSCy Schubert       &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
5402b15cb3dSCy Schubert    &lt;/option-name&gt;
5412b15cb3dSCy Schubert</pre>
5422b15cb3dSCy Schubert  <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
5432b15cb3dSCy Schubert<pre class="example">    "...&lt;...&gt;..."
5442b15cb3dSCy Schubert</pre>
5452b15cb3dSCy Schubert  <p><code>AutoOpts</code> does not track suboptions.  You simply note that it is a
5462b15cb3dSCy Schuberthierarchicly valued option.  <code>AutoOpts</code> does provide a means for searching
5472b15cb3dSCy Schubertthe associated name/value pair list (see: optionFindValue).
5482b15cb3dSCy Schubert
5492b15cb3dSCy Schubert  <p>The command line options relating to configuration and/or usage help are:
5502b15cb3dSCy Schubert
5512b15cb3dSCy Schubert<h5 class="subsubheading">version (-)</h5>
5522b15cb3dSCy Schubert
5532b15cb3dSCy Schubert<p>Print the program version to standard out, optionally with licensing
5542b15cb3dSCy Schubertinformation, then exit 0.  The optional argument specifies how much licensing
5552b15cb3dSCy Schubertdetail to provide.  The default is to print just the version.  The licensing infomation may be selected with an option argument.
5562b15cb3dSCy SchubertOnly the first letter of the argument is examined:
5572b15cb3dSCy Schubert
5582b15cb3dSCy Schubert     <dl>
5592b15cb3dSCy Schubert<dt><span class="samp">version</span><dd>Only print the version.  This is the default.
5602b15cb3dSCy Schubert<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
5612b15cb3dSCy Schubert<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
5622b15cb3dSCy Schubert</dl>
5632b15cb3dSCy Schubert
5642b15cb3dSCy Schubert<div class="node">
5652b15cb3dSCy Schubert<p><hr>
5662b15cb3dSCy Schubert<a name="sntp-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Usage">sntp Usage</a>,
5672b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-config">sntp config</a>,
5682b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
5692b15cb3dSCy Schubert<br>
5702b15cb3dSCy Schubert</div>
5712b15cb3dSCy Schubert
5722b15cb3dSCy Schubert<h4 class="subsection">sntp exit status</h4>
5732b15cb3dSCy Schubert
5742b15cb3dSCy Schubert<p>One of the following exit values will be returned:
5752b15cb3dSCy Schubert     <dl>
5762b15cb3dSCy Schubert<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
5772b15cb3dSCy Schubert<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
5782b15cb3dSCy Schubert<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
5792b15cb3dSCy Schubert<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error.  Please report
5802b15cb3dSCy Schubertit to autogen-users@lists.sourceforge.net.  Thank you.
5812b15cb3dSCy Schubert</dl>
5822b15cb3dSCy Schubert  <div class="node">
5832b15cb3dSCy Schubert<p><hr>
5842b15cb3dSCy Schubert<a name="sntp-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Authors">sntp Authors</a>,
5852b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-exit-status">sntp exit status</a>,
5862b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
5872b15cb3dSCy Schubert<br>
5882b15cb3dSCy Schubert</div>
5892b15cb3dSCy Schubert
5902b15cb3dSCy Schubert<h4 class="subsection">sntp Usage</h4>
5912b15cb3dSCy Schubert
5922b15cb3dSCy Schubert<div class="node">
5932b15cb3dSCy Schubert<p><hr>
5942b15cb3dSCy Schubert<a name="sntp-Authors"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-Usage">sntp Usage</a>,
5952b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
5962b15cb3dSCy Schubert<br>
5972b15cb3dSCy Schubert</div>
5982b15cb3dSCy Schubert
5992b15cb3dSCy Schubert<h4 class="subsection">sntp Authors</h4>
6002b15cb3dSCy Schubert
6012b15cb3dSCy Schubert<div class="node">
6022b15cb3dSCy Schubert<p><hr>
6032b15cb3dSCy Schubert<a name="Usage"></a>
6042b15cb3dSCy Schubert<br>
6052b15cb3dSCy Schubert</div>
6062b15cb3dSCy Schubert
6072b15cb3dSCy Schubert<!-- node-name,  next,  previous,  up -->
6082b15cb3dSCy Schubert<h3 class="section">Usage</h3>
6092b15cb3dSCy Schubert
6102b15cb3dSCy Schubert<p>The simplest use of this program is as an unprivileged command to
6112b15cb3dSCy Schubertcheck the current time, offset, and error in the local clock.
6122b15cb3dSCy SchubertFor example:
6132b15cb3dSCy Schubert
6142b15cb3dSCy Schubert<pre class="example">    sntp ntpserver.somewhere
6152b15cb3dSCy Schubert</pre>
6162b15cb3dSCy Schubert  <p>With suitable privilege, it can be run as a command or in a
6172b15cb3dSCy Schubert<code>crom</code> job to reset the local clock from a reliable server, like
6182b15cb3dSCy Schubertthe <code>ntpdate</code> and <code>rdate</code> commands.
6192b15cb3dSCy SchubertFor example:
6202b15cb3dSCy Schubert
6212b15cb3dSCy Schubert<pre class="example">    sntp -a ntpserver.somewhere
6222b15cb3dSCy Schubert</pre>
6232b15cb3dSCy Schubert  </body></html>
6242b15cb3dSCy Schubert
625