xref: /freebsd/contrib/ntp/sntp/sntp.html (revision f5f40dd63bc7acbb5312b26ac1ea1103c12352a6)
1052d159aSCy Schubert<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2052d159aSCy Schubert<html>
3a466cc55SCy Schubert<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
42b15cb3dSCy Schubert<head>
5052d159aSCy Schubert<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6052d159aSCy Schubert<title>Sntp User&rsquo;s Manual</title>
7052d159aSCy Schubert
8052d159aSCy Schubert<meta name="description" content="Sntp User&rsquo;s Manual">
9052d159aSCy Schubert<meta name="keywords" content="Sntp User&rsquo;s Manual">
10052d159aSCy Schubert<meta name="resource-type" content="document">
11052d159aSCy Schubert<meta name="distribution" content="global">
12052d159aSCy Schubert<meta name="Generator" content="makeinfo">
13052d159aSCy Schubert<link href="#Top" rel="start" title="Top">
14052d159aSCy Schubert<link href="dir.html#Top" rel="up" title="(dir)">
15052d159aSCy Schubert<style type="text/css">
16052d159aSCy Schubert<!--
17052d159aSCy Schuberta.summary-letter {text-decoration: none}
18052d159aSCy Schubertblockquote.indentedblock {margin-right: 0em}
19052d159aSCy Schubertdiv.display {margin-left: 3.2em}
20052d159aSCy Schubertdiv.example {margin-left: 3.2em}
21052d159aSCy Schubertdiv.lisp {margin-left: 3.2em}
22052d159aSCy Schubertkbd {font-style: oblique}
232b15cb3dSCy Schubertpre.display {font-family: inherit}
242b15cb3dSCy Schubertpre.format {font-family: inherit}
25052d159aSCy Schubertpre.menu-comment {font-family: serif}
26052d159aSCy Schubertpre.menu-preformatted {font-family: serif}
27052d159aSCy Schubertspan.nolinebreak {white-space: nowrap}
28052d159aSCy Schubertspan.roman {font-family: initial; font-weight: normal}
29052d159aSCy Schubertspan.sansserif {font-family: sans-serif; font-weight: normal}
30052d159aSCy Schubertul.no-bullet {list-style: none}
31052d159aSCy Schubert-->
32052d159aSCy Schubert</style>
33052d159aSCy Schubert
34052d159aSCy Schubert
352b15cb3dSCy Schubert</head>
36052d159aSCy Schubert
37052d159aSCy Schubert<body lang="en">
38052d159aSCy Schubert<h1 class="settitle" align="center">Sntp User&rsquo;s Manual</h1>
39052d159aSCy Schubert
40052d159aSCy Schubert
41052d159aSCy Schubert
42052d159aSCy Schubert
43052d159aSCy Schubert
44a466cc55SCy Schubert<span id="Top"></span><div class="header">
45052d159aSCy Schubert<p>
46052d159aSCy SchubertNext: <a href="#sntp-Description" accesskey="n" rel="next">sntp Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> &nbsp; </p>
472b15cb3dSCy Schubert</div>
48a466cc55SCy Schubert<span id="Simple-Network-Time-Protocol-User-Manual"></span><h1 class="top">Simple Network Time Protocol User Manual</h1>
492b15cb3dSCy Schubert
50052d159aSCy Schubert<p>This document describes the use of the NTP Project&rsquo;s <code>sntp</code> program,
512b15cb3dSCy Schubertthat can be used to query a Network Time Protocol (NTP) server and
522b15cb3dSCy Schubertdisplay the time offset of the system clock relative to the server
532b15cb3dSCy Schubertclock.  Run as root, it can correct the system clock to this offset as
542b15cb3dSCy Schubertwell.  It can be run as an interactive command or from a cron job.
55052d159aSCy Schubert</p>
56*f5f40dd6SCy Schubert<p>This document applies to version 4.2.8p18 of <code>sntp</code>.
57052d159aSCy Schubert</p>
582b15cb3dSCy Schubert<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
592b15cb3dSCy SchubertIETF specification.
60052d159aSCy Schubert</p>
61a466cc55SCy Schubert<span id="SEC_Overview"></span>
62052d159aSCy Schubert<h2 class="shortcontents-heading">Short Table of Contents</h2>
632b15cb3dSCy Schubert
642b15cb3dSCy Schubert<div class="shortcontents">
65052d159aSCy Schubert<ul class="no-bullet">
66a466cc55SCy Schubert<li><a id="stoc-Description" href="#toc-Description">1 Description</a></li>
672b15cb3dSCy Schubert</ul>
682b15cb3dSCy Schubert</div>
692b15cb3dSCy Schubert
702b15cb3dSCy Schubert
71052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
72a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-Description" accesskey="1">sntp Description</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Description
73052d159aSCy Schubert</td></tr>
74a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-Invocation" accesskey="2">sntp Invocation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invoking sntp
75052d159aSCy Schubert</td></tr>
76a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="3">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
77052d159aSCy Schubert</td></tr>
78052d159aSCy Schubert</table>
79052d159aSCy Schubert
80052d159aSCy Schubert<hr>
81a466cc55SCy Schubert<span id="sntp-Description"></span><div class="header">
82052d159aSCy Schubert<p>
83052d159aSCy SchubertNext: <a href="#sntp-Invocation" accesskey="n" rel="next">sntp Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> &nbsp; </p>
842b15cb3dSCy Schubert</div>
85a466cc55SCy Schubert<span id="Description"></span><h2 class="chapter">1 Description</h2>
862b15cb3dSCy Schubert
872b15cb3dSCy Schubert<p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
882b15cb3dSCy Schubertstandard output in the format:
89052d159aSCy Schubert</p>
90052d159aSCy Schubert<div class="example">
912b15cb3dSCy Schubert<pre class="example">1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
92052d159aSCy Schubert</pre></div>
93052d159aSCy Schubert
942b15cb3dSCy Schubert<p>where
952b15cb3dSCy SchubertYYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
962b15cb3dSCy Schubert(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
972b15cb3dSCy Schubertand
982b15cb3dSCy Schubertthe +4.567 +/- 0.089 secs indicates the time offset and
992b15cb3dSCy Schuberterror bound of the system clock relative to the server clock.
100052d159aSCy Schubert</p>
101052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
102a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-Invocation" accesskey="1">Invoking sntp</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
103052d159aSCy Schubert</td></tr>
104a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#Usage" accesskey="2">Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
105052d159aSCy Schubert</td></tr>
106052d159aSCy Schubert</table>
1072b15cb3dSCy Schubert
108052d159aSCy Schubert<hr>
109a466cc55SCy Schubert<span id="sntp-Invocation"></span><div class="header">
110052d159aSCy Schubert<p>
111052d159aSCy SchubertNext: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#sntp-Description" accesskey="p" rel="prev">sntp Description</a>, Up: <a href="#sntp-Description" accesskey="u" rel="up">sntp Description</a> &nbsp; </p>
1122b15cb3dSCy Schubert</div>
113a466cc55SCy Schubert<span id="Invoking-sntp"></span><h3 class="section">1.1 Invoking sntp</h3>
114a466cc55SCy Schubert<span id="index-sntp"></span>
115a466cc55SCy Schubert<span id="index-standard-Simple-Network-Time-Protocol-client-program"></span>
1162b15cb3dSCy Schubert
1172b15cb3dSCy Schubert
1182b15cb3dSCy Schubert
1192b15cb3dSCy Schubert<p><code>sntp</code>
1202b15cb3dSCy Schubertcan be used as an SNTP client to query a NTP or SNTP server and either display
121052d159aSCy Schubertthe time or set the local system&rsquo;s time (given suitable privilege).  It can be
1222b15cb3dSCy Schubertrun as an interactive command or from a
1232b15cb3dSCy Schubert<code>cron</code>
1242b15cb3dSCy Schubertjob.
125052d159aSCy Schubert</p>
1262b15cb3dSCy Schubert<p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
1272b15cb3dSCy Schubertare defined and described by RFC 5905.
128052d159aSCy Schubert</p>
1292b15cb3dSCy Schubert
1302b15cb3dSCy Schubert<p>The default is to write the estimated correct local date and time (i.e. not
1312b15cb3dSCy SchubertUTC) to the standard output in a format like:
132052d159aSCy Schubert</p>
1332b15cb3dSCy Schubert<p><code>'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'</code>
134052d159aSCy Schubert</p>
1352b15cb3dSCy Schubert<p>where the
1362b15cb3dSCy Schubert<code>'(+0800)'</code>
1372b15cb3dSCy Schubertmeans that to get to UTC from the reported local time one must
1382b15cb3dSCy Schubertadd 8 hours and 0 minutes,
1392b15cb3dSCy Schubertthe
1402b15cb3dSCy Schubert<code>'+4.567'</code>
1412b15cb3dSCy Schubertindicates the local clock is 4.567 seconds behind the correct time
1422b15cb3dSCy Schubert(so 4.567 seconds must be added to the local clock to get it to be correct).
1432b15cb3dSCy SchubertNote that the number of decimals printed for this value will change
1442b15cb3dSCy Schubertbased on the reported precision of the server.
1452b15cb3dSCy Schubert<code>'+/- 0.089'</code>
1462b15cb3dSCy Schubertis the reported
1472b15cb3dSCy Schubert<em>synchronization</em> <em>distance</em>
1482b15cb3dSCy Schubert(in seconds), which represents the maximum error due to all causes.
1492b15cb3dSCy SchubertIf the server does not report valid data needed to calculate the
1502b15cb3dSCy Schubertsynchronization distance, this will be reported as
1512b15cb3dSCy Schubert<code>'+/- ?'</code>.
1522b15cb3dSCy SchubertIf the
1532b15cb3dSCy Schubert<em>host</em>
1542b15cb3dSCy Schubertis different from the
1552b15cb3dSCy Schubert<em>IP</em>,
1562b15cb3dSCy Schubertboth will be displayed.
1572b15cb3dSCy SchubertOtherwise, only the
1582b15cb3dSCy Schubert<em>IP</em>
1592b15cb3dSCy Schubertis displayed.
1602b15cb3dSCy SchubertFinally, the
1612b15cb3dSCy Schubert<em>stratum</em>
162a25439b6SCy Schubertof the host is reported
163a25439b6SCy Schubertand the leap indicator is decoded and displayed.
164052d159aSCy Schubert</p>
1652b15cb3dSCy Schubert<p>This section was generated by <strong>AutoGen</strong>,
1662b15cb3dSCy Schubertusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>sntp</code> program.
1672b15cb3dSCy SchubertThis software is released under the NTP license, &lt;http://ntp.org/license&gt;.
168052d159aSCy Schubert</p>
169052d159aSCy Schubert<table class="menu" border="0" cellspacing="0">
170a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-usage" accesskey="1">sntp usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">sntp help/usage (<samp>--help</samp>)
171052d159aSCy Schubert</td></tr>
172a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-ipv4" accesskey="2">sntp ipv4</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv4 option (-4)
173052d159aSCy Schubert</td></tr>
174a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-ipv6" accesskey="3">sntp ipv6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ipv6 option (-6)
175052d159aSCy Schubert</td></tr>
176a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-authentication" accesskey="4">sntp authentication</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">authentication option (-a)
177052d159aSCy Schubert</td></tr>
178a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-broadcast" accesskey="5">sntp broadcast</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">broadcast option (-b)
179052d159aSCy Schubert</td></tr>
180a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-concurrent" accesskey="6">sntp concurrent</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">concurrent option (-c)
181052d159aSCy Schubert</td></tr>
182a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-gap" accesskey="7">sntp gap</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">gap option (-g)
183052d159aSCy Schubert</td></tr>
184a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-kod" accesskey="8">sntp kod</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">kod option (-K)
185052d159aSCy Schubert</td></tr>
186a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-keyfile" accesskey="9">sntp keyfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">keyfile option (-k)
187052d159aSCy Schubert</td></tr>
188a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-logfile">sntp logfile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">logfile option (-l)
189052d159aSCy Schubert</td></tr>
190a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-steplimit">sntp steplimit</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">steplimit option (-M)
191052d159aSCy Schubert</td></tr>
192a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-ntpversion">sntp ntpversion</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">ntpversion option (-o)
193052d159aSCy Schubert</td></tr>
194a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-usereservedport">sntp usereservedport</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">usereservedport option (-r)
195052d159aSCy Schubert</td></tr>
196a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-timeout">sntp timeout</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">timeout option (-t)
197052d159aSCy Schubert</td></tr>
198a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-wait">sntp wait</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">wait option
199052d159aSCy Schubert</td></tr>
200a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-config">sntp config</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">presetting/configuring sntp
201052d159aSCy Schubert</td></tr>
202a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-exit-status">sntp exit status</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">exit status
203052d159aSCy Schubert</td></tr>
204a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-Usage">sntp Usage</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Usage
205052d159aSCy Schubert</td></tr>
206a466cc55SCy Schubert<tr><td align="left" valign="top">&bull; <a href="#sntp-Authors">sntp Authors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Authors
207052d159aSCy Schubert</td></tr>
208052d159aSCy Schubert</table>
2092b15cb3dSCy Schubert
210052d159aSCy Schubert<hr>
211a466cc55SCy Schubert<span id="sntp-usage"></span><div class="header">
212052d159aSCy Schubert<p>
213052d159aSCy SchubertNext: <a href="#sntp-ipv4" accesskey="n" rel="next">sntp ipv4</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
2142b15cb3dSCy Schubert</div>
215a466cc55SCy Schubert<span id="sntp-help_002fusage-_0028_002d_002dhelp_0029"></span><h4 class="subsection">1.1.1 sntp help/usage (<samp>--help</samp>)</h4>
216a466cc55SCy Schubert<span id="index-sntp-help"></span>
2172b15cb3dSCy Schubert
218052d159aSCy Schubert<p>This is the automatically generated usage text for sntp.
219052d159aSCy Schubert</p>
2202b15cb3dSCy Schubert<p>The text printed is the same whether selected with the <code>help</code> option
221052d159aSCy Schubert(<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>).  <code>more-help</code> will print
2222b15cb3dSCy Schubertthe usage text by passing it through a pager program.
2232b15cb3dSCy Schubert<code>more-help</code> is disabled on platforms without a working
2242b15cb3dSCy Schubert<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
225052d159aSCy Schubertused to select the program, defaulting to <samp>more</samp>.  Both will exit
2262b15cb3dSCy Schubertwith a status code of 0.
227052d159aSCy Schubert</p>
228052d159aSCy Schubert<div class="example">
229*f5f40dd6SCy Schubert<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p18
2304e1ef62aSXin LIUsage:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
2312b15cb3dSCy Schubert                [ hostname-or-IP ...]
2322b15cb3dSCy Schubert  Flg Arg Option-Name    Description
2332b15cb3dSCy Schubert   -4 no  ipv4           Force IPv4 DNS name resolution
2344e1ef62aSXin LI                                - prohibits the option 'ipv6'
2352b15cb3dSCy Schubert   -6 no  ipv6           Force IPv6 DNS name resolution
2364e1ef62aSXin LI                                - prohibits the option 'ipv4'
2374e1ef62aSXin LI   -a Num authentication Enable authentication with the key auth-keynumber
2382b15cb3dSCy Schubert   -b Str broadcast      Listen to the address specified for broadcast time sync
2392b15cb3dSCy Schubert                                - may appear multiple times
2402b15cb3dSCy Schubert   -c Str concurrent     Concurrently query all IPs returned for host-name
2412b15cb3dSCy Schubert                                - may appear multiple times
2422b15cb3dSCy Schubert   -d no  debug-level    Increase debug verbosity level
2432b15cb3dSCy Schubert                                - may appear multiple times
2444e1ef62aSXin LI   -D Num set-debug-level Set the debug verbosity level
2452b15cb3dSCy Schubert                                - may appear multiple times
2462b15cb3dSCy Schubert   -g Num gap            The gap (in milliseconds) between time requests
2472b15cb3dSCy Schubert   -K Fil kod            KoD history filename
2484e1ef62aSXin LI   -k Fil keyfile        Look in this file for the key specified with -a
2492b15cb3dSCy Schubert   -l Fil logfile        Log to specified logfile
2504e1ef62aSXin LI   -M Num steplimit      Adjustments less than steplimit msec will be slewed
2514e1ef62aSXin LI                                - it must be in the range:
2522b15cb3dSCy Schubert                                  greater than or equal to 0
2534e1ef62aSXin LI   -o Num ntpversion     Send int as our NTP protocol version
2544e1ef62aSXin LI                                - it must be in the range:
2552b15cb3dSCy Schubert                                  0 to 7
2562b15cb3dSCy Schubert   -r no  usereservedport Use the NTP Reserved Port (port 123)
2574e1ef62aSXin LI   -S no  step           OK to 'step' the time with settimeofday(2)
2584e1ef62aSXin LI   -s no  slew           OK to 'slew' the time with adjtime(2)
2594e1ef62aSXin LI   -t Num timeout        The number of seconds to wait for responses
2602b15cb3dSCy Schubert      no  wait           Wait for pending replies (if not setting the time)
2614e1ef62aSXin LI                                - disabled as '--no-wait'
2622b15cb3dSCy Schubert                                - enabled by default
2634e1ef62aSXin LI      opt version        output version information and exit
2644e1ef62aSXin LI   -? no  help           display extended usage information and exit
2654e1ef62aSXin LI   -! no  more-help      extended usage information passed thru pager
2664e1ef62aSXin LI   -&gt; opt save-opts      save the option state to a config file
2674e1ef62aSXin LI   -&lt; Str load-opts      load options from a config file
2684e1ef62aSXin LI                                - disabled as '--no-load-opts'
2692b15cb3dSCy Schubert                                - may appear multiple times
2702b15cb3dSCy Schubert
2712b15cb3dSCy SchubertOptions are specified by doubled hyphens and their name or by a single
2722b15cb3dSCy Schuberthyphen and the flag character.
2732b15cb3dSCy Schubert
2742b15cb3dSCy Schubert
2752b15cb3dSCy SchubertThe following option preset mechanisms are supported:
2762b15cb3dSCy Schubert - reading file $HOME/.ntprc
2772b15cb3dSCy Schubert - reading file ./.ntprc
2782b15cb3dSCy Schubert - examining environment variables named SNTP_*
2792b15cb3dSCy Schubert
280a466cc55SCy SchubertPlease send bug reports to:  &lt;https://bugs.ntp.org, bugs@ntp.org&gt;
281052d159aSCy Schubert</pre></div>
282052d159aSCy Schubert
283052d159aSCy Schubert<hr>
284a466cc55SCy Schubert<span id="sntp-ipv4"></span><div class="header">
285052d159aSCy Schubert<p>
286052d159aSCy SchubertNext: <a href="#sntp-ipv6" accesskey="n" rel="next">sntp ipv6</a>, Previous: <a href="#sntp-usage" accesskey="p" rel="prev">sntp usage</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
2872b15cb3dSCy Schubert</div>
288a466cc55SCy Schubert<span id="ipv4-option-_0028_002d4_0029"></span><h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
289a466cc55SCy Schubert<span id="index-sntp_002dipv4"></span>
2902b15cb3dSCy Schubert
291052d159aSCy Schubert<p>This is the &ldquo;force ipv4 dns name resolution&rdquo; option.
292052d159aSCy Schubert</p>
293052d159aSCy Schubert<p>This option has some usage constraints.  It:
294052d159aSCy Schubert</p><ul>
2952b15cb3dSCy Schubert<li> must not appear in combination with any of the following options:
2962b15cb3dSCy Schubertipv6.
297052d159aSCy Schubert</li></ul>
2982b15cb3dSCy Schubert
2992b15cb3dSCy Schubert<p>Force DNS resolution of the following host names on the command line
3002b15cb3dSCy Schubertto the IPv4 namespace.
301052d159aSCy Schubert</p><hr>
302a466cc55SCy Schubert<span id="sntp-ipv6"></span><div class="header">
303052d159aSCy Schubert<p>
304052d159aSCy SchubertNext: <a href="#sntp-authentication" accesskey="n" rel="next">sntp authentication</a>, Previous: <a href="#sntp-ipv4" accesskey="p" rel="prev">sntp ipv4</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
3052b15cb3dSCy Schubert</div>
306a466cc55SCy Schubert<span id="ipv6-option-_0028_002d6_0029"></span><h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
307a466cc55SCy Schubert<span id="index-sntp_002dipv6"></span>
3082b15cb3dSCy Schubert
309052d159aSCy Schubert<p>This is the &ldquo;force ipv6 dns name resolution&rdquo; option.
310052d159aSCy Schubert</p>
311052d159aSCy Schubert<p>This option has some usage constraints.  It:
312052d159aSCy Schubert</p><ul>
3132b15cb3dSCy Schubert<li> must not appear in combination with any of the following options:
3142b15cb3dSCy Schubertipv4.
315052d159aSCy Schubert</li></ul>
3162b15cb3dSCy Schubert
3172b15cb3dSCy Schubert<p>Force DNS resolution of the following host names on the command line
3182b15cb3dSCy Schubertto the IPv6 namespace.
319052d159aSCy Schubert</p><hr>
320a466cc55SCy Schubert<span id="sntp-authentication"></span><div class="header">
321052d159aSCy Schubert<p>
322052d159aSCy SchubertNext: <a href="#sntp-broadcast" accesskey="n" rel="next">sntp broadcast</a>, Previous: <a href="#sntp-ipv6" accesskey="p" rel="prev">sntp ipv6</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
3232b15cb3dSCy Schubert</div>
324a466cc55SCy Schubert<span id="authentication-option-_0028_002da_0029"></span><h4 class="subsection">1.1.4 authentication option (-a)</h4>
325a466cc55SCy Schubert<span id="index-sntp_002dauthentication"></span>
3262b15cb3dSCy Schubert
327052d159aSCy Schubert<p>This is the &ldquo;enable authentication with the key <var>auth-keynumber</var>&rdquo; option.
328052d159aSCy SchubertThis option takes a number argument <samp>auth-keynumber</samp>.
329052d159aSCy SchubertEnable authentication using the key specified in this option&rsquo;s
330052d159aSCy Schubertargument.  The argument of this option is the <samp>keyid</samp>, a
331052d159aSCy Schubertnumber specified in the <samp>keyfile</samp> as this key&rsquo;s identifier.
332052d159aSCy SchubertSee the <samp>keyfile</samp> option (<samp>-k</samp>) for more details.
333052d159aSCy Schubert</p><hr>
334a466cc55SCy Schubert<span id="sntp-broadcast"></span><div class="header">
335052d159aSCy Schubert<p>
336052d159aSCy SchubertNext: <a href="#sntp-concurrent" accesskey="n" rel="next">sntp concurrent</a>, Previous: <a href="#sntp-authentication" accesskey="p" rel="prev">sntp authentication</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
3372b15cb3dSCy Schubert</div>
338a466cc55SCy Schubert<span id="broadcast-option-_0028_002db_0029"></span><h4 class="subsection">1.1.5 broadcast option (-b)</h4>
339a466cc55SCy Schubert<span id="index-sntp_002dbroadcast"></span>
3402b15cb3dSCy Schubert
341052d159aSCy Schubert<p>This is the &ldquo;listen to the address specified for broadcast time sync&rdquo; option.
342052d159aSCy SchubertThis option takes a string argument <samp>broadcast-address</samp>.
343052d159aSCy Schubert</p>
344052d159aSCy Schubert<p>This option has some usage constraints.  It:
345052d159aSCy Schubert</p><ul>
3462b15cb3dSCy Schubert<li> may appear an unlimited number of times.
347052d159aSCy Schubert</li></ul>
3482b15cb3dSCy Schubert
3492b15cb3dSCy Schubert<p>If specified <code>sntp</code> will listen to the specified address
3502b15cb3dSCy Schubertfor NTP broadcasts.  The default maximum wait time
351052d159aSCy Schubertcan (and probably should) be modified with <samp>-t</samp>.
352052d159aSCy Schubert</p><hr>
353a466cc55SCy Schubert<span id="sntp-concurrent"></span><div class="header">
354052d159aSCy Schubert<p>
355052d159aSCy SchubertNext: <a href="#sntp-gap" accesskey="n" rel="next">sntp gap</a>, Previous: <a href="#sntp-broadcast" accesskey="p" rel="prev">sntp broadcast</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
3562b15cb3dSCy Schubert</div>
357a466cc55SCy Schubert<span id="concurrent-option-_0028_002dc_0029"></span><h4 class="subsection">1.1.6 concurrent option (-c)</h4>
358a466cc55SCy Schubert<span id="index-sntp_002dconcurrent"></span>
3592b15cb3dSCy Schubert
360052d159aSCy Schubert<p>This is the &ldquo;concurrently query all ips returned for host-name&rdquo; option.
361052d159aSCy SchubertThis option takes a string argument <samp>host-name</samp>.
362052d159aSCy Schubert</p>
363052d159aSCy Schubert<p>This option has some usage constraints.  It:
364052d159aSCy Schubert</p><ul>
3652b15cb3dSCy Schubert<li> may appear an unlimited number of times.
366052d159aSCy Schubert</li></ul>
3672b15cb3dSCy Schubert
368052d159aSCy Schubert<p>Requests from an NTP &quot;client&quot; to a &quot;server&quot; should never be sent
3692b15cb3dSCy Schubertmore rapidly than one every 2 seconds.  By default, any IPs returned
3702b15cb3dSCy Schubertas part of a DNS lookup are assumed to be for a single instance of
3712b15cb3dSCy Schubert<code>ntpd</code>, and therefore <code>sntp</code> will send queries to these IPs
3722b15cb3dSCy Schubertone after another, with a 2-second gap in between each query.
373052d159aSCy Schubert</p>
374052d159aSCy Schubert<p>The <samp>-c</samp> or <samp>--concurrent</samp> flag says that any IPs
3752b15cb3dSCy Schubertreturned for the DNS lookup of the supplied host-name are on
3762b15cb3dSCy Schubertdifferent machines, so we can send concurrent queries.
377052d159aSCy Schubert</p><hr>
378a466cc55SCy Schubert<span id="sntp-gap"></span><div class="header">
379052d159aSCy Schubert<p>
380052d159aSCy SchubertNext: <a href="#sntp-kod" accesskey="n" rel="next">sntp kod</a>, Previous: <a href="#sntp-concurrent" accesskey="p" rel="prev">sntp concurrent</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
3812b15cb3dSCy Schubert</div>
382a466cc55SCy Schubert<span id="gap-option-_0028_002dg_0029"></span><h4 class="subsection">1.1.7 gap option (-g)</h4>
383a466cc55SCy Schubert<span id="index-sntp_002dgap"></span>
3842b15cb3dSCy Schubert
385052d159aSCy Schubert<p>This is the &ldquo;the gap (in milliseconds) between time requests&rdquo; option.
386052d159aSCy SchubertThis option takes a number argument <samp>milliseconds</samp>.
387052d159aSCy SchubertSince we&rsquo;re only going to use the first valid response we get and
3882b15cb3dSCy Schubertthere is benefit to specifying a good number of servers to query,
3892b15cb3dSCy Schubertseparate the queries we send out by the specified number of
3902b15cb3dSCy Schubertmilliseconds.
391052d159aSCy Schubert</p><hr>
392a466cc55SCy Schubert<span id="sntp-kod"></span><div class="header">
393052d159aSCy Schubert<p>
394052d159aSCy SchubertNext: <a href="#sntp-keyfile" accesskey="n" rel="next">sntp keyfile</a>, Previous: <a href="#sntp-gap" accesskey="p" rel="prev">sntp gap</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
3952b15cb3dSCy Schubert</div>
396a466cc55SCy Schubert<span id="kod-option-_0028_002dK_0029"></span><h4 class="subsection">1.1.8 kod option (-K)</h4>
397a466cc55SCy Schubert<span id="index-sntp_002dkod"></span>
3982b15cb3dSCy Schubert
399052d159aSCy Schubert<p>This is the &ldquo;kod history filename&rdquo; option.
400052d159aSCy SchubertThis option takes a file argument <samp>file-name</samp>.
4012b15cb3dSCy SchubertSpecifies the filename to be used for the persistent history of KoD
4022b15cb3dSCy Schubertresponses received from servers.  If the file does not exist, a
4032b15cb3dSCy Schubertwarning message will be displayed.  The file will not be created.
404052d159aSCy Schubert</p><hr>
405a466cc55SCy Schubert<span id="sntp-keyfile"></span><div class="header">
406052d159aSCy Schubert<p>
407052d159aSCy SchubertNext: <a href="#sntp-logfile" accesskey="n" rel="next">sntp logfile</a>, Previous: <a href="#sntp-kod" accesskey="p" rel="prev">sntp kod</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
4082b15cb3dSCy Schubert</div>
409a466cc55SCy Schubert<span id="keyfile-option-_0028_002dk_0029"></span><h4 class="subsection">1.1.9 keyfile option (-k)</h4>
410a466cc55SCy Schubert<span id="index-sntp_002dkeyfile"></span>
4112b15cb3dSCy Schubert
412052d159aSCy Schubert<p>This is the &ldquo;look in this file for the key specified with <samp>-a</samp>&rdquo; option.
413052d159aSCy SchubertThis option takes a file argument <samp>file-name</samp>.
4142b15cb3dSCy SchubertThis option specifies the keyfile.
415052d159aSCy Schubert<code>sntp</code> will search for the key specified with <samp>-a</samp>
416052d159aSCy Schubert<samp>keyno</samp> in this file.  See <code>ntp.keys(5)</code> for more
4172b15cb3dSCy Schubertinformation.
418052d159aSCy Schubert</p><hr>
419a466cc55SCy Schubert<span id="sntp-logfile"></span><div class="header">
420052d159aSCy Schubert<p>
421052d159aSCy SchubertNext: <a href="#sntp-steplimit" accesskey="n" rel="next">sntp steplimit</a>, Previous: <a href="#sntp-keyfile" accesskey="p" rel="prev">sntp keyfile</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
4222b15cb3dSCy Schubert</div>
423a466cc55SCy Schubert<span id="logfile-option-_0028_002dl_0029"></span><h4 class="subsection">1.1.10 logfile option (-l)</h4>
424a466cc55SCy Schubert<span id="index-sntp_002dlogfile"></span>
4252b15cb3dSCy Schubert
426052d159aSCy Schubert<p>This is the &ldquo;log to specified logfile&rdquo; option.
427052d159aSCy SchubertThis option takes a file argument <samp>file-name</samp>.
4282b15cb3dSCy SchubertThis option causes the client to write log messages to the specified
429052d159aSCy Schubert<samp>logfile</samp>.
430052d159aSCy Schubert</p><hr>
431a466cc55SCy Schubert<span id="sntp-steplimit"></span><div class="header">
432052d159aSCy Schubert<p>
433052d159aSCy SchubertNext: <a href="#sntp-ntpversion" accesskey="n" rel="next">sntp ntpversion</a>, Previous: <a href="#sntp-logfile" accesskey="p" rel="prev">sntp logfile</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
4342b15cb3dSCy Schubert</div>
435a466cc55SCy Schubert<span id="steplimit-option-_0028_002dM_0029"></span><h4 class="subsection">1.1.11 steplimit option (-M)</h4>
436a466cc55SCy Schubert<span id="index-sntp_002dsteplimit"></span>
4372b15cb3dSCy Schubert
438052d159aSCy Schubert<p>This is the &ldquo;adjustments less than <var>steplimit</var> msec will be slewed&rdquo; option.
4392b15cb3dSCy SchubertThis option takes a number argument.
440052d159aSCy SchubertIf the time adjustment is less than <samp>steplimit</samp> milliseconds,
441052d159aSCy Schubertslew the amount using <code>adjtime(2)</code>.  Otherwise, step the
442052d159aSCy Schubertcorrection using <code>settimeofday(2)</code>.  The default value is 0,
4432b15cb3dSCy Schubertwhich means all adjustments will be stepped.  This is a feature, as
4442b15cb3dSCy Schubertdifferent situations demand different values.
445052d159aSCy Schubert</p><hr>
446a466cc55SCy Schubert<span id="sntp-ntpversion"></span><div class="header">
447052d159aSCy Schubert<p>
448052d159aSCy SchubertNext: <a href="#sntp-usereservedport" accesskey="n" rel="next">sntp usereservedport</a>, Previous: <a href="#sntp-steplimit" accesskey="p" rel="prev">sntp steplimit</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
4492b15cb3dSCy Schubert</div>
450a466cc55SCy Schubert<span id="ntpversion-option-_0028_002do_0029"></span><h4 class="subsection">1.1.12 ntpversion option (-o)</h4>
451a466cc55SCy Schubert<span id="index-sntp_002dntpversion"></span>
4522b15cb3dSCy Schubert
453052d159aSCy Schubert<p>This is the &ldquo;send <var>int</var> as our ntp protocol version&rdquo; option.
4542b15cb3dSCy SchubertThis option takes a number argument.
4552b15cb3dSCy SchubertWhen sending requests to a remote server, tell them we are running
456052d159aSCy SchubertNTP protocol version <samp>ntpversion</samp> .
457052d159aSCy Schubert</p><hr>
458a466cc55SCy Schubert<span id="sntp-usereservedport"></span><div class="header">
459052d159aSCy Schubert<p>
460052d159aSCy SchubertNext: <a href="#sntp-timeout" accesskey="n" rel="next">sntp timeout</a>, Previous: <a href="#sntp-ntpversion" accesskey="p" rel="prev">sntp ntpversion</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
4612b15cb3dSCy Schubert</div>
462a466cc55SCy Schubert<span id="usereservedport-option-_0028_002dr_0029"></span><h4 class="subsection">1.1.13 usereservedport option (-r)</h4>
463a466cc55SCy Schubert<span id="index-sntp_002dusereservedport"></span>
4642b15cb3dSCy Schubert
465052d159aSCy Schubert<p>This is the &ldquo;use the ntp reserved port (port 123)&rdquo; option.
4662b15cb3dSCy SchubertUse port 123, which is reserved for NTP, for our network
4672b15cb3dSCy Schubertcommunications.
468052d159aSCy Schubert</p><hr>
469a466cc55SCy Schubert<span id="sntp-timeout"></span><div class="header">
470052d159aSCy Schubert<p>
471052d159aSCy SchubertNext: <a href="#sntp-wait" accesskey="n" rel="next">sntp wait</a>, Previous: <a href="#sntp-usereservedport" accesskey="p" rel="prev">sntp usereservedport</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
4722b15cb3dSCy Schubert</div>
473a466cc55SCy Schubert<span id="timeout-option-_0028_002dt_0029"></span><h4 class="subsection">1.1.14 timeout option (-t)</h4>
474a466cc55SCy Schubert<span id="index-sntp_002dtimeout"></span>
4752b15cb3dSCy Schubert
476052d159aSCy Schubert<p>This is the &ldquo;the number of seconds to wait for responses&rdquo; option.
477052d159aSCy SchubertThis option takes a number argument <samp>seconds</samp>.
4782b15cb3dSCy SchubertWhen waiting for a reply, <code>sntp</code> will wait the number
4792b15cb3dSCy Schubertof seconds specified before giving up.  The default should be
4802b15cb3dSCy Schubertmore than enough for a unicast response.  If <code>sntp</code> is
4812b15cb3dSCy Schubertonly waiting for a broadcast response a longer timeout is
4822b15cb3dSCy Schubertlikely needed.
483052d159aSCy Schubert</p><hr>
484a466cc55SCy Schubert<span id="sntp-wait"></span><div class="header">
485052d159aSCy Schubert<p>
486052d159aSCy SchubertNext: <a href="#sntp-config" accesskey="n" rel="next">sntp config</a>, Previous: <a href="#sntp-timeout" accesskey="p" rel="prev">sntp timeout</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
4872b15cb3dSCy Schubert</div>
488a466cc55SCy Schubert<span id="wait-option"></span><h4 class="subsection">1.1.15 wait option</h4>
489a466cc55SCy Schubert<span id="index-sntp_002dwait"></span>
4902b15cb3dSCy Schubert
491052d159aSCy Schubert<p>This is the &ldquo;wait for pending replies (if not setting the time)&rdquo; option.
492052d159aSCy Schubert</p>
493052d159aSCy Schubert<p>This option has some usage constraints.  It:
494052d159aSCy Schubert</p><ul>
4952b15cb3dSCy Schubert<li> can be disabled with &ndash;no-wait.
496052d159aSCy Schubert</li><li> It is enabled by default.
497052d159aSCy Schubert</li></ul>
4982b15cb3dSCy Schubert
4992b15cb3dSCy Schubert<p>If we are not setting the time, wait for all pending responses.
500052d159aSCy Schubert</p>
5012b15cb3dSCy Schubert
502052d159aSCy Schubert<hr>
503a466cc55SCy Schubert<span id="sntp-config"></span><div class="header">
504052d159aSCy Schubert<p>
505052d159aSCy SchubertNext: <a href="#sntp-exit-status" accesskey="n" rel="next">sntp exit status</a>, Previous: <a href="#sntp-wait" accesskey="p" rel="prev">sntp wait</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
5062b15cb3dSCy Schubert</div>
507a466cc55SCy Schubert<span id="presetting_002fconfiguring-sntp"></span><h4 class="subsection">1.1.16 presetting/configuring sntp</h4>
5082b15cb3dSCy Schubert
5092b15cb3dSCy Schubert<p>Any option that is not marked as <i>not presettable</i> may be preset by
510052d159aSCy Schubertloading values from configuration (&quot;rc&quot; or &quot;ini&quot;) 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
5112b15cb3dSCy Schubertthe options listed above in upper case and segmented with underscores.
5122b15cb3dSCy SchubertThe <code>SNTP</code> variable will be tokenized and parsed like
5132b15cb3dSCy Schubertthe command line.  The remaining variables are tested for existence and their
5142b15cb3dSCy Schubertvalues are treated like option arguments.
515052d159aSCy Schubert</p>
5162b15cb3dSCy Schubert
517052d159aSCy Schubert<p><code>libopts</code> will search in 2 places for configuration files:
518052d159aSCy Schubert</p><ul>
5192b15cb3dSCy Schubert<li> $HOME
520052d159aSCy Schubert</li><li> $PWD
521052d159aSCy Schubert</li></ul>
522052d159aSCy Schubert<p>The environment variables <code>HOME</code>, and <code>PWD</code>
523052d159aSCy Schubertare expanded and replaced when <samp>sntp</samp> runs.
5242b15cb3dSCy SchubertFor any of these that are plain files, they are simply processed.
525052d159aSCy SchubertFor any that are directories, then a file named <samp>.ntprc</samp> is searched for
5262b15cb3dSCy Schubertwithin that directory and processed.
527052d159aSCy Schubert</p>
5282b15cb3dSCy Schubert<p>Configuration files may be in a wide variety of formats.
5292b15cb3dSCy SchubertThe basic format is an option name followed by a value (argument) on the
5302b15cb3dSCy Schubertsame line.  Values may be separated from the option name with a colon,
5312b15cb3dSCy Schubertequal sign or simply white space.  Values may be continued across multiple
5322b15cb3dSCy Schubertlines by escaping the newline with a backslash.
533052d159aSCy Schubert</p>
5342b15cb3dSCy Schubert<p>Multiple programs may also share the same initialization file.
5352b15cb3dSCy SchubertCommon options are collected at the top, followed by program specific
5362b15cb3dSCy Schubertsegments.  The segments are separated by lines like:
537052d159aSCy Schubert</p><div class="example">
5382b15cb3dSCy Schubert<pre class="example">[SNTP]
539052d159aSCy Schubert</pre></div>
540052d159aSCy Schubert<p>or by
541052d159aSCy Schubert</p><div class="example">
5422b15cb3dSCy Schubert<pre class="example">&lt;?program sntp&gt;
543052d159aSCy Schubert</pre></div>
544052d159aSCy Schubert<p>Do not mix these styles within one configuration file.
545052d159aSCy Schubert</p>
5462b15cb3dSCy Schubert<p>Compound values and carefully constructed string values may also be
5472b15cb3dSCy Schubertspecified using XML syntax:
548052d159aSCy Schubert</p><div class="example">
5492b15cb3dSCy Schubert<pre class="example">&lt;option-name&gt;
5502b15cb3dSCy Schubert   &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
5512b15cb3dSCy Schubert&lt;/option-name&gt;
552052d159aSCy Schubert</pre></div>
553052d159aSCy Schubert<p>yielding an <code>option-name.sub-opt</code> string value of
554052d159aSCy Schubert</p><div class="example">
555052d159aSCy Schubert<pre class="example">&quot;...&lt;...&gt;...&quot;
556052d159aSCy Schubert</pre></div>
5572b15cb3dSCy Schubert<p><code>AutoOpts</code> does not track suboptions.  You simply note that it is a
5582b15cb3dSCy Schuberthierarchicly valued option.  <code>AutoOpts</code> does provide a means for searching
5592b15cb3dSCy Schubertthe associated name/value pair list (see: optionFindValue).
560052d159aSCy Schubert</p>
5612b15cb3dSCy Schubert<p>The command line options relating to configuration and/or usage help are:
562052d159aSCy Schubert</p>
563a466cc55SCy Schubert<span id="version-_0028_002d_0029"></span><h4 class="subsubheading">version (-)</h4>
5642b15cb3dSCy Schubert
5652b15cb3dSCy Schubert<p>Print the program version to standard out, optionally with licensing
5662b15cb3dSCy Schubertinformation, then exit 0.  The optional argument specifies how much licensing
567a466cc55SCy Schubertdetail to provide.  The default is to print just the version.  The licensing information may be selected with an option argument.
5682b15cb3dSCy SchubertOnly the first letter of the argument is examined:
569052d159aSCy Schubert</p>
570052d159aSCy Schubert<dl compact="compact">
571052d159aSCy Schubert<dt>&lsquo;<samp>version</samp>&rsquo;</dt>
572052d159aSCy Schubert<dd><p>Only print the version.  This is the default.
573052d159aSCy Schubert</p></dd>
574052d159aSCy Schubert<dt>&lsquo;<samp>copyright</samp>&rsquo;</dt>
575052d159aSCy Schubert<dd><p>Name the copyright usage licensing terms.
576052d159aSCy Schubert</p></dd>
577052d159aSCy Schubert<dt>&lsquo;<samp>verbose</samp>&rsquo;</dt>
578052d159aSCy Schubert<dd><p>Print the full copyright usage licensing terms.
579052d159aSCy Schubert</p></dd>
5802b15cb3dSCy Schubert</dl>
5812b15cb3dSCy Schubert
582052d159aSCy Schubert<hr>
583a466cc55SCy Schubert<span id="sntp-exit-status"></span><div class="header">
584052d159aSCy Schubert<p>
585052d159aSCy SchubertNext: <a href="#sntp-Usage" accesskey="n" rel="next">sntp Usage</a>, Previous: <a href="#sntp-config" accesskey="p" rel="prev">sntp config</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
5862b15cb3dSCy Schubert</div>
587a466cc55SCy Schubert<span id="sntp-exit-status-1"></span><h4 class="subsection">1.1.17 sntp exit status</h4>
5882b15cb3dSCy Schubert
5892b15cb3dSCy Schubert<p>One of the following exit values will be returned:
590052d159aSCy Schubert</p><dl compact="compact">
591052d159aSCy Schubert<dt>&lsquo;<samp>0 (EXIT_SUCCESS)</samp>&rsquo;</dt>
592052d159aSCy Schubert<dd><p>Successful program execution.
593052d159aSCy Schubert</p></dd>
594052d159aSCy Schubert<dt>&lsquo;<samp>1 (EXIT_FAILURE)</samp>&rsquo;</dt>
595052d159aSCy Schubert<dd><p>The operation failed or the command syntax was not valid.
596052d159aSCy Schubert</p></dd>
597052d159aSCy Schubert<dt>&lsquo;<samp>66 (EX_NOINPUT)</samp>&rsquo;</dt>
598052d159aSCy Schubert<dd><p>A specified configuration file could not be loaded.
599052d159aSCy Schubert</p></dd>
600052d159aSCy Schubert<dt>&lsquo;<samp>70 (EX_SOFTWARE)</samp>&rsquo;</dt>
601052d159aSCy Schubert<dd><p>libopts had an internal operational error.  Please report
6022b15cb3dSCy Schubertit to autogen-users@lists.sourceforge.net.  Thank you.
603052d159aSCy Schubert</p></dd>
6042b15cb3dSCy Schubert</dl>
605052d159aSCy Schubert<hr>
606a466cc55SCy Schubert<span id="sntp-Usage"></span><div class="header">
607052d159aSCy Schubert<p>
608052d159aSCy SchubertNext: <a href="#sntp-Authors" accesskey="n" rel="next">sntp Authors</a>, Previous: <a href="#sntp-exit-status" accesskey="p" rel="prev">sntp exit status</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
6092b15cb3dSCy Schubert</div>
610a466cc55SCy Schubert<span id="sntp-Usage-1"></span><h4 class="subsection">1.1.18 sntp Usage</h4>
611052d159aSCy Schubert<hr>
612a466cc55SCy Schubert<span id="sntp-Authors"></span><div class="header">
613052d159aSCy Schubert<p>
614052d159aSCy SchubertPrevious: <a href="#sntp-Usage" accesskey="p" rel="prev">sntp Usage</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> &nbsp; </p>
6152b15cb3dSCy Schubert</div>
616a466cc55SCy Schubert<span id="sntp-Authors-1"></span><h4 class="subsection">1.1.19 sntp Authors</h4>
6172b15cb3dSCy Schubert
618052d159aSCy Schubert<hr>
619a466cc55SCy Schubert<span id="Usage"></span><div class="header">
620052d159aSCy Schubert<p>
621052d159aSCy SchubertPrevious: <a href="#sntp-Invocation" accesskey="p" rel="prev">sntp Invocation</a>, Up: <a href="#sntp-Description" accesskey="u" rel="up">sntp Description</a> &nbsp; </p>
6222b15cb3dSCy Schubert</div>
623a466cc55SCy Schubert<span id="Usage-1"></span><h3 class="section">1.2 Usage</h3>
6242b15cb3dSCy Schubert
6252b15cb3dSCy Schubert<p>The simplest use of this program is as an unprivileged command to
6262b15cb3dSCy Schubertcheck the current time, offset, and error in the local clock.
6272b15cb3dSCy SchubertFor example:
628052d159aSCy Schubert</p>
629052d159aSCy Schubert<div class="example">
6302b15cb3dSCy Schubert<pre class="example">sntp ntpserver.somewhere
631052d159aSCy Schubert</pre></div>
632052d159aSCy Schubert
6332b15cb3dSCy Schubert<p>With suitable privilege, it can be run as a command or in a
6342b15cb3dSCy Schubert<code>crom</code> job to reset the local clock from a reliable server, like
6352b15cb3dSCy Schubertthe <code>ntpdate</code> and <code>rdate</code> commands.
6362b15cb3dSCy SchubertFor example:
637052d159aSCy Schubert</p>
638052d159aSCy Schubert<div class="example">
6392b15cb3dSCy Schubert<pre class="example">sntp -a ntpserver.somewhere
640052d159aSCy Schubert</pre></div>
641052d159aSCy Schubert<hr>
6422b15cb3dSCy Schubert
643052d159aSCy Schubert
644052d159aSCy Schubert
645052d159aSCy Schubert</body>
646052d159aSCy Schubert</html>
647