xref: /freebsd/contrib/ntp/sntp/sntp.html (revision 2b15cb3d0922bd70ea592f0da9b4a5b167f4d53f)
1*2b15cb3dSCy Schubert<html lang="en">
2*2b15cb3dSCy Schubert<head>
3*2b15cb3dSCy Schubert<title>Sntp User's Manual</title>
4*2b15cb3dSCy Schubert<meta http-equiv="Content-Type" content="text/html">
5*2b15cb3dSCy Schubert<meta name="description" content="Sntp User's Manual">
6*2b15cb3dSCy Schubert<meta name="generator" content="makeinfo 4.7">
7*2b15cb3dSCy Schubert<link title="Top" rel="top" href="#Top">
8*2b15cb3dSCy Schubert<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9*2b15cb3dSCy Schubert<meta http-equiv="Content-Style-Type" content="text/css">
10*2b15cb3dSCy Schubert<style type="text/css"><!--
11*2b15cb3dSCy Schubert  pre.display { font-family:inherit }
12*2b15cb3dSCy Schubert  pre.format  { font-family:inherit }
13*2b15cb3dSCy Schubert  pre.smalldisplay { font-family:inherit; font-size:smaller }
14*2b15cb3dSCy Schubert  pre.smallformat  { font-family:inherit; font-size:smaller }
15*2b15cb3dSCy Schubert  pre.smallexample { font-size:smaller }
16*2b15cb3dSCy Schubert  pre.smalllisp    { font-size:smaller }
17*2b15cb3dSCy Schubert  span.sc { font-variant:small-caps }
18*2b15cb3dSCy Schubert  span.roman { font-family: serif; font-weight: normal; }
19*2b15cb3dSCy Schubert--></style>
20*2b15cb3dSCy Schubert</head>
21*2b15cb3dSCy Schubert<body>
22*2b15cb3dSCy Schubert<h1 class="settitle">Sntp User's Manual</h1>
23*2b15cb3dSCy Schubert<div class="node">
24*2b15cb3dSCy Schubert<p><hr>
25*2b15cb3dSCy Schubert<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
26*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
28*2b15cb3dSCy Schubert<br>
29*2b15cb3dSCy Schubert</div>
30*2b15cb3dSCy Schubert
31*2b15cb3dSCy Schubert<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
32*2b15cb3dSCy Schubert
33*2b15cb3dSCy Schubert<p>This document describes the use of the NTP Project's <code>sntp</code> program,
34*2b15cb3dSCy Schubertthat can be used to query a Network Time Protocol (NTP) server and
35*2b15cb3dSCy Schubertdisplay the time offset of the system clock relative to the server
36*2b15cb3dSCy Schubertclock.  Run as root, it can correct the system clock to this offset as
37*2b15cb3dSCy Schubertwell.  It can be run as an interactive command or from a cron job.
38*2b15cb3dSCy Schubert
39*2b15cb3dSCy Schubert  <p>This document applies to version 4.2.8p1 of <code>sntp</code>.
40*2b15cb3dSCy Schubert
41*2b15cb3dSCy Schubert  <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
42*2b15cb3dSCy SchubertIETF specification.
43*2b15cb3dSCy Schubert
44*2b15cb3dSCy Schubert  <div class="shortcontents">
45*2b15cb3dSCy Schubert<h2>Short Contents</h2>
46*2b15cb3dSCy Schubert<ul>
47*2b15cb3dSCy Schubert<a href="#Top">Simple Network Time Protocol User Manual</a>
48*2b15cb3dSCy Schubert</ul>
49*2b15cb3dSCy Schubert</div>
50*2b15cb3dSCy Schubert
51*2b15cb3dSCy Schubert<ul class="menu">
52*2b15cb3dSCy Schubert<li><a accesskey="1" href="#sntp-Description">sntp Description</a>:             Description
53*2b15cb3dSCy Schubert<li><a accesskey="2" href="#sntp-Invocation">sntp Invocation</a>: 		Invoking sntp
54*2b15cb3dSCy Schubert<li><a accesskey="3" href="#Usage">Usage</a>:                        Usage
55*2b15cb3dSCy Schubert</ul>
56*2b15cb3dSCy Schubert
57*2b15cb3dSCy Schubert<div class="node">
58*2b15cb3dSCy Schubert<p><hr>
59*2b15cb3dSCy Schubert<a name="sntp-Description"></a>
60*2b15cb3dSCy Schubert<br>
61*2b15cb3dSCy Schubert</div>
62*2b15cb3dSCy Schubert
63*2b15cb3dSCy Schubert<!-- node-name,  next,  previous,  up -->
64*2b15cb3dSCy Schubert<h3 class="section">Description</h3>
65*2b15cb3dSCy Schubert
66*2b15cb3dSCy Schubert<p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
67*2b15cb3dSCy Schubertstandard output in the format:
68*2b15cb3dSCy Schubert
69*2b15cb3dSCy Schubert<pre class="example">     1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
70*2b15cb3dSCy Schubert</pre>
71*2b15cb3dSCy Schubert  <p>where
72*2b15cb3dSCy SchubertYYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
73*2b15cb3dSCy Schubert(+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
74*2b15cb3dSCy Schubertand
75*2b15cb3dSCy Schubertthe +4.567 +/- 0.089 secs indicates the time offset and
76*2b15cb3dSCy Schuberterror bound of the system clock relative to the server clock.
77*2b15cb3dSCy Schubert
78*2b15cb3dSCy Schubert<div class="node">
79*2b15cb3dSCy Schubert<p><hr>
80*2b15cb3dSCy Schubert<a name="sntp-Invocation"></a>
81*2b15cb3dSCy Schubert<br>
82*2b15cb3dSCy Schubert</div>
83*2b15cb3dSCy Schubert
84*2b15cb3dSCy Schubert<h3 class="section">Invoking sntp</h3>
85*2b15cb3dSCy Schubert
86*2b15cb3dSCy Schubert<p><a name="index-sntp-1"></a><a name="index-standard-Simple-Network-Time-Protocol-client-program-2"></a>
87*2b15cb3dSCy Schubert
88*2b15cb3dSCy Schubert  <p><code>sntp</code>
89*2b15cb3dSCy Schubertcan be used as an SNTP client to query a NTP or SNTP server and either display
90*2b15cb3dSCy Schubertthe time or set the local system's time (given suitable privilege).  It can be
91*2b15cb3dSCy Schubertrun as an interactive command or from a
92*2b15cb3dSCy Schubert<code>cron</code>
93*2b15cb3dSCy Schubertjob.
94*2b15cb3dSCy Schubert
95*2b15cb3dSCy Schubert  <p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
96*2b15cb3dSCy Schubertare defined and described by RFC 5905.
97*2b15cb3dSCy Schubert
98*2b15cb3dSCy Schubert  <p>The default is to write the estimated correct local date and time (i.e. not
99*2b15cb3dSCy SchubertUTC) to the standard output in a format like:
100*2b15cb3dSCy Schubert
101*2b15cb3dSCy Schubert  <p><code>'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'</code>
102*2b15cb3dSCy Schubert
103*2b15cb3dSCy Schubert  <p>where the
104*2b15cb3dSCy Schubert<code>'(+0800)'</code>
105*2b15cb3dSCy Schubertmeans that to get to UTC from the reported local time one must
106*2b15cb3dSCy Schubertadd 8 hours and 0 minutes,
107*2b15cb3dSCy Schubertthe
108*2b15cb3dSCy Schubert<code>'+4.567'</code>
109*2b15cb3dSCy Schubertindicates the local clock is 4.567 seconds behind the correct time
110*2b15cb3dSCy Schubert(so 4.567 seconds must be added to the local clock to get it to be correct).
111*2b15cb3dSCy SchubertNote that the number of decimals printed for this value will change
112*2b15cb3dSCy Schubertbased on the reported precision of the server.
113*2b15cb3dSCy Schubert<code>'+/- 0.089'</code>
114*2b15cb3dSCy Schubertis the reported
115*2b15cb3dSCy Schubert<em>synchronization</em> <em>distance</em>
116*2b15cb3dSCy Schubert(in seconds), which represents the maximum error due to all causes.
117*2b15cb3dSCy SchubertIf the server does not report valid data needed to calculate the
118*2b15cb3dSCy Schubertsynchronization distance, this will be reported as
119*2b15cb3dSCy Schubert<code>'+/- ?'</code>.
120*2b15cb3dSCy SchubertIf the
121*2b15cb3dSCy Schubert<em>host</em>
122*2b15cb3dSCy Schubertis different from the
123*2b15cb3dSCy Schubert<em>IP</em>,
124*2b15cb3dSCy Schubertboth will be displayed.
125*2b15cb3dSCy SchubertOtherwise, only the
126*2b15cb3dSCy Schubert<em>IP</em>
127*2b15cb3dSCy Schubertis displayed.
128*2b15cb3dSCy SchubertFinally, the
129*2b15cb3dSCy Schubert<em>stratum</em>
130*2b15cb3dSCy Schubertof the host is reported.
131*2b15cb3dSCy Schubert
132*2b15cb3dSCy Schubert  <p>This section was generated by <strong>AutoGen</strong>,
133*2b15cb3dSCy Schubertusing the <code>agtexi-cmd</code> template and the option descriptions for the <code>sntp</code> program.
134*2b15cb3dSCy SchubertThis software is released under the NTP license, &lt;http://ntp.org/license&gt;.
135*2b15cb3dSCy Schubert
136*2b15cb3dSCy Schubert<ul class="menu">
137*2b15cb3dSCy Schubert<li><a accesskey="1" href="#sntp-usage">sntp usage</a>:                   sntp help/usage (<span class="option">--help</span>)
138*2b15cb3dSCy Schubert<li><a accesskey="2" href="#sntp-ipv4">sntp ipv4</a>:                    ipv4 option (-4)
139*2b15cb3dSCy Schubert<li><a accesskey="3" href="#sntp-ipv6">sntp ipv6</a>:                    ipv6 option (-6)
140*2b15cb3dSCy Schubert<li><a accesskey="4" href="#sntp-authentication">sntp authentication</a>:          authentication option (-a)
141*2b15cb3dSCy Schubert<li><a accesskey="5" href="#sntp-broadcast">sntp broadcast</a>:               broadcast option (-b)
142*2b15cb3dSCy Schubert<li><a accesskey="6" href="#sntp-concurrent">sntp concurrent</a>:              concurrent option (-c)
143*2b15cb3dSCy Schubert<li><a accesskey="7" href="#sntp-gap">sntp gap</a>:                     gap option (-g)
144*2b15cb3dSCy Schubert<li><a accesskey="8" href="#sntp-kod">sntp kod</a>:                     kod option (-K)
145*2b15cb3dSCy Schubert<li><a accesskey="9" href="#sntp-keyfile">sntp keyfile</a>:                 keyfile option (-k)
146*2b15cb3dSCy Schubert<li><a href="#sntp-logfile">sntp logfile</a>:                 logfile option (-l)
147*2b15cb3dSCy Schubert<li><a href="#sntp-steplimit">sntp steplimit</a>:               steplimit option (-M)
148*2b15cb3dSCy Schubert<li><a href="#sntp-ntpversion">sntp ntpversion</a>:              ntpversion option (-o)
149*2b15cb3dSCy Schubert<li><a href="#sntp-usereservedport">sntp usereservedport</a>:         usereservedport option (-r)
150*2b15cb3dSCy Schubert<li><a href="#sntp-timeout">sntp timeout</a>:                 timeout option (-t)
151*2b15cb3dSCy Schubert<li><a href="#sntp-wait">sntp wait</a>:                    wait option
152*2b15cb3dSCy Schubert<li><a href="#sntp-config">sntp config</a>:                  presetting/configuring sntp
153*2b15cb3dSCy Schubert<li><a href="#sntp-exit-status">sntp exit status</a>:             exit status
154*2b15cb3dSCy Schubert<li><a href="#sntp-Usage">sntp Usage</a>:                   Usage
155*2b15cb3dSCy Schubert<li><a href="#sntp-Authors">sntp Authors</a>:                 Authors
156*2b15cb3dSCy Schubert</ul>
157*2b15cb3dSCy Schubert
158*2b15cb3dSCy Schubert<div class="node">
159*2b15cb3dSCy Schubert<p><hr>
160*2b15cb3dSCy Schubert<a name="sntp-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
161*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
162*2b15cb3dSCy Schubert<br>
163*2b15cb3dSCy Schubert</div>
164*2b15cb3dSCy Schubert
165*2b15cb3dSCy Schubert<h4 class="subsection">sntp help/usage (<span class="option">--help</span>)</h4>
166*2b15cb3dSCy Schubert
167*2b15cb3dSCy Schubert<p><a name="index-sntp-help-3"></a>
168*2b15cb3dSCy SchubertThis is the automatically generated usage text for sntp.
169*2b15cb3dSCy Schubert
170*2b15cb3dSCy Schubert  <p>The text printed is the same whether selected with the <code>help</code> option
171*2b15cb3dSCy 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
172*2b15cb3dSCy Schubertthe usage text by passing it through a pager program.
173*2b15cb3dSCy Schubert<code>more-help</code> is disabled on platforms without a working
174*2b15cb3dSCy Schubert<code>fork(2)</code> function.  The <code>PAGER</code> environment variable is
175*2b15cb3dSCy Schubertused to select the program, defaulting to <span class="file">more</span>.  Both will exit
176*2b15cb3dSCy Schubertwith a status code of 0.
177*2b15cb3dSCy Schubert
178*2b15cb3dSCy Schubert<pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p1
179*2b15cb3dSCy SchubertUsage:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
180*2b15cb3dSCy Schubert                [ hostname-or-IP ...]
181*2b15cb3dSCy Schubert  Flg Arg Option-Name    Description
182*2b15cb3dSCy Schubert   -4 no  ipv4           Force IPv4 DNS name resolution
183*2b15cb3dSCy Schubert                                - prohibits the option 'ipv6'
184*2b15cb3dSCy Schubert   -6 no  ipv6           Force IPv6 DNS name resolution
185*2b15cb3dSCy Schubert                                - prohibits the option 'ipv4'
186*2b15cb3dSCy Schubert   -a Num authentication Enable authentication with the key auth-keynumber
187*2b15cb3dSCy Schubert   -b Str broadcast      Listen to the address specified for broadcast time sync
188*2b15cb3dSCy Schubert                                - may appear multiple times
189*2b15cb3dSCy Schubert   -c Str concurrent     Concurrently query all IPs returned for host-name
190*2b15cb3dSCy Schubert                                - may appear multiple times
191*2b15cb3dSCy Schubert   -d no  debug-level    Increase debug verbosity level
192*2b15cb3dSCy Schubert                                - may appear multiple times
193*2b15cb3dSCy Schubert   -D Num set-debug-level Set the debug verbosity level
194*2b15cb3dSCy Schubert                                - may appear multiple times
195*2b15cb3dSCy Schubert   -g Num gap            The gap (in milliseconds) between time requests
196*2b15cb3dSCy Schubert   -K Fil kod            KoD history filename
197*2b15cb3dSCy Schubert   -k Fil keyfile        Look in this file for the key specified with -a
198*2b15cb3dSCy Schubert   -l Fil logfile        Log to specified logfile
199*2b15cb3dSCy Schubert   -M Num steplimit      Adjustments less than steplimit msec will be slewed
200*2b15cb3dSCy Schubert                                - it must be in the range:
201*2b15cb3dSCy Schubert                                  greater than or equal to 0
202*2b15cb3dSCy Schubert   -o Num ntpversion     Send int as our NTP protocol version
203*2b15cb3dSCy Schubert                                - it must be in the range:
204*2b15cb3dSCy Schubert                                  0 to 7
205*2b15cb3dSCy Schubert   -r no  usereservedport Use the NTP Reserved Port (port 123)
206*2b15cb3dSCy Schubert   -S no  step           OK to 'step' the time with settimeofday(2)
207*2b15cb3dSCy Schubert   -s no  slew           OK to 'slew' the time with adjtime(2)
208*2b15cb3dSCy Schubert   -t Num timeout        The number of seconds to wait for responses
209*2b15cb3dSCy Schubert      no  wait           Wait for pending replies (if not setting the time)
210*2b15cb3dSCy Schubert                                - disabled as '--no-wait'
211*2b15cb3dSCy Schubert                                - enabled by default
212*2b15cb3dSCy Schubert      opt version        output version information and exit
213*2b15cb3dSCy Schubert   -? no  help           display extended usage information and exit
214*2b15cb3dSCy Schubert   -! no  more-help      extended usage information passed thru pager
215*2b15cb3dSCy Schubert   -&gt; opt save-opts      save the option state to a config file
216*2b15cb3dSCy Schubert   -&lt; Str load-opts      load options from a config file
217*2b15cb3dSCy Schubert                                - disabled as '--no-load-opts'
218*2b15cb3dSCy Schubert                                - may appear multiple times
219*2b15cb3dSCy Schubert
220*2b15cb3dSCy SchubertOptions are specified by doubled hyphens and their name or by a single
221*2b15cb3dSCy Schuberthyphen and the flag character.
222*2b15cb3dSCy Schubert
223*2b15cb3dSCy Schubert
224*2b15cb3dSCy SchubertThe following option preset mechanisms are supported:
225*2b15cb3dSCy Schubert - reading file $HOME/.ntprc
226*2b15cb3dSCy Schubert - reading file ./.ntprc
227*2b15cb3dSCy Schubert - examining environment variables named SNTP_*
228*2b15cb3dSCy Schubert
229*2b15cb3dSCy SchubertPlease send bug reports to:  &lt;http://bugs.ntp.org, bugs@ntp.org&gt;
230*2b15cb3dSCy Schubert</pre>
231*2b15cb3dSCy Schubert  <div class="node">
232*2b15cb3dSCy Schubert<p><hr>
233*2b15cb3dSCy Schubert<a name="sntp-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
234*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
235*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
236*2b15cb3dSCy Schubert<br>
237*2b15cb3dSCy Schubert</div>
238*2b15cb3dSCy Schubert
239*2b15cb3dSCy Schubert<h4 class="subsection">ipv4 option (-4)</h4>
240*2b15cb3dSCy Schubert
241*2b15cb3dSCy Schubert<p><a name="index-sntp_002dipv4-4"></a>
242*2b15cb3dSCy SchubertThis is the &ldquo;force ipv4 dns name resolution&rdquo; option.
243*2b15cb3dSCy Schubert
244*2b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
245*2b15cb3dSCy Schubert     <ul>
246*2b15cb3dSCy Schubert<li>must not appear in combination with any of the following options:
247*2b15cb3dSCy Schubertipv6.
248*2b15cb3dSCy Schubert</ul>
249*2b15cb3dSCy Schubert
250*2b15cb3dSCy Schubert  <p>Force DNS resolution of the following host names on the command line
251*2b15cb3dSCy Schubertto the IPv4 namespace.
252*2b15cb3dSCy Schubert<div class="node">
253*2b15cb3dSCy Schubert<p><hr>
254*2b15cb3dSCy Schubert<a name="sntp-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
255*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
256*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
257*2b15cb3dSCy Schubert<br>
258*2b15cb3dSCy Schubert</div>
259*2b15cb3dSCy Schubert
260*2b15cb3dSCy Schubert<h4 class="subsection">ipv6 option (-6)</h4>
261*2b15cb3dSCy Schubert
262*2b15cb3dSCy Schubert<p><a name="index-sntp_002dipv6-5"></a>
263*2b15cb3dSCy SchubertThis is the &ldquo;force ipv6 dns name resolution&rdquo; option.
264*2b15cb3dSCy Schubert
265*2b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
266*2b15cb3dSCy Schubert     <ul>
267*2b15cb3dSCy Schubert<li>must not appear in combination with any of the following options:
268*2b15cb3dSCy Schubertipv4.
269*2b15cb3dSCy Schubert</ul>
270*2b15cb3dSCy Schubert
271*2b15cb3dSCy Schubert  <p>Force DNS resolution of the following host names on the command line
272*2b15cb3dSCy Schubertto the IPv6 namespace.
273*2b15cb3dSCy Schubert<div class="node">
274*2b15cb3dSCy Schubert<p><hr>
275*2b15cb3dSCy Schubert<a name="sntp-authentication"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
276*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
277*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
278*2b15cb3dSCy Schubert<br>
279*2b15cb3dSCy Schubert</div>
280*2b15cb3dSCy Schubert
281*2b15cb3dSCy Schubert<h4 class="subsection">authentication option (-a)</h4>
282*2b15cb3dSCy Schubert
283*2b15cb3dSCy Schubert<p><a name="index-sntp_002dauthentication-6"></a>
284*2b15cb3dSCy SchubertThis is the &ldquo;enable authentication with the key <var>auth-keynumber</var>&rdquo; option.
285*2b15cb3dSCy SchubertThis option takes a number argument <span class="file">auth-keynumber</span>.
286*2b15cb3dSCy SchubertEnable authentication using the key specified in this option's
287*2b15cb3dSCy Schubertargument.  The argument of this option is the <span class="option">keyid</span>, a
288*2b15cb3dSCy Schubertnumber specified in the <span class="option">keyfile</span> as this key's identifier.
289*2b15cb3dSCy SchubertSee the <span class="option">keyfile</span> option (<span class="option">-k</span>) for more details.
290*2b15cb3dSCy Schubert<div class="node">
291*2b15cb3dSCy Schubert<p><hr>
292*2b15cb3dSCy Schubert<a name="sntp-broadcast"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
293*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
294*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
295*2b15cb3dSCy Schubert<br>
296*2b15cb3dSCy Schubert</div>
297*2b15cb3dSCy Schubert
298*2b15cb3dSCy Schubert<h4 class="subsection">broadcast option (-b)</h4>
299*2b15cb3dSCy Schubert
300*2b15cb3dSCy Schubert<p><a name="index-sntp_002dbroadcast-7"></a>
301*2b15cb3dSCy SchubertThis is the &ldquo;listen to the address specified for broadcast time sync&rdquo; option.
302*2b15cb3dSCy SchubertThis option takes a string argument <span class="file">broadcast-address</span>.
303*2b15cb3dSCy Schubert
304*2b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
305*2b15cb3dSCy Schubert     <ul>
306*2b15cb3dSCy Schubert<li>may appear an unlimited number of times.
307*2b15cb3dSCy Schubert</ul>
308*2b15cb3dSCy Schubert
309*2b15cb3dSCy Schubert  <p>If specified <code>sntp</code> will listen to the specified address
310*2b15cb3dSCy Schubertfor NTP broadcasts.  The default maximum wait time
311*2b15cb3dSCy Schubertcan (and probably should) be modified with <span class="option">-t</span>.
312*2b15cb3dSCy Schubert<div class="node">
313*2b15cb3dSCy Schubert<p><hr>
314*2b15cb3dSCy Schubert<a name="sntp-concurrent"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
315*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
316*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
317*2b15cb3dSCy Schubert<br>
318*2b15cb3dSCy Schubert</div>
319*2b15cb3dSCy Schubert
320*2b15cb3dSCy Schubert<h4 class="subsection">concurrent option (-c)</h4>
321*2b15cb3dSCy Schubert
322*2b15cb3dSCy Schubert<p><a name="index-sntp_002dconcurrent-8"></a>
323*2b15cb3dSCy SchubertThis is the &ldquo;concurrently query all ips returned for host-name&rdquo; option.
324*2b15cb3dSCy SchubertThis option takes a string argument <span class="file">host-name</span>.
325*2b15cb3dSCy Schubert
326*2b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
327*2b15cb3dSCy Schubert     <ul>
328*2b15cb3dSCy Schubert<li>may appear an unlimited number of times.
329*2b15cb3dSCy Schubert</ul>
330*2b15cb3dSCy Schubert
331*2b15cb3dSCy Schubert  <p>Requests from an NTP "client" to a "server" should never be sent
332*2b15cb3dSCy Schubertmore rapidly than one every 2 seconds.  By default, any IPs returned
333*2b15cb3dSCy Schubertas part of a DNS lookup are assumed to be for a single instance of
334*2b15cb3dSCy Schubert<code>ntpd</code>, and therefore <code>sntp</code> will send queries to these IPs
335*2b15cb3dSCy Schubertone after another, with a 2-second gap in between each query.
336*2b15cb3dSCy Schubert
337*2b15cb3dSCy Schubert  <p>The <span class="option">-c</span> or <span class="option">--concurrent</span> flag says that any IPs
338*2b15cb3dSCy Schubertreturned for the DNS lookup of the supplied host-name are on
339*2b15cb3dSCy Schubertdifferent machines, so we can send concurrent queries.
340*2b15cb3dSCy Schubert<div class="node">
341*2b15cb3dSCy Schubert<p><hr>
342*2b15cb3dSCy Schubert<a name="sntp-gap"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
343*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-concurrent">sntp concurrent</a>,
344*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
345*2b15cb3dSCy Schubert<br>
346*2b15cb3dSCy Schubert</div>
347*2b15cb3dSCy Schubert
348*2b15cb3dSCy Schubert<h4 class="subsection">gap option (-g)</h4>
349*2b15cb3dSCy Schubert
350*2b15cb3dSCy Schubert<p><a name="index-sntp_002dgap-9"></a>
351*2b15cb3dSCy SchubertThis is the &ldquo;the gap (in milliseconds) between time requests&rdquo; option.
352*2b15cb3dSCy SchubertThis option takes a number argument <span class="file">milliseconds</span>.
353*2b15cb3dSCy SchubertSince we're only going to use the first valid response we get and
354*2b15cb3dSCy Schubertthere is benefit to specifying a good number of servers to query,
355*2b15cb3dSCy Schubertseparate the queries we send out by the specified number of
356*2b15cb3dSCy Schubertmilliseconds.
357*2b15cb3dSCy Schubert<div class="node">
358*2b15cb3dSCy Schubert<p><hr>
359*2b15cb3dSCy Schubert<a name="sntp-kod"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
360*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-gap">sntp gap</a>,
361*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
362*2b15cb3dSCy Schubert<br>
363*2b15cb3dSCy Schubert</div>
364*2b15cb3dSCy Schubert
365*2b15cb3dSCy Schubert<h4 class="subsection">kod option (-K)</h4>
366*2b15cb3dSCy Schubert
367*2b15cb3dSCy Schubert<p><a name="index-sntp_002dkod-10"></a>
368*2b15cb3dSCy SchubertThis is the &ldquo;kod history filename&rdquo; option.
369*2b15cb3dSCy SchubertThis option takes a file argument <span class="file">file-name</span>.
370*2b15cb3dSCy SchubertSpecifies the filename to be used for the persistent history of KoD
371*2b15cb3dSCy Schubertresponses received from servers.  If the file does not exist, a
372*2b15cb3dSCy Schubertwarning message will be displayed.  The file will not be created.
373*2b15cb3dSCy Schubert<div class="node">
374*2b15cb3dSCy Schubert<p><hr>
375*2b15cb3dSCy Schubert<a name="sntp-keyfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
376*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
377*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
378*2b15cb3dSCy Schubert<br>
379*2b15cb3dSCy Schubert</div>
380*2b15cb3dSCy Schubert
381*2b15cb3dSCy Schubert<h4 class="subsection">keyfile option (-k)</h4>
382*2b15cb3dSCy Schubert
383*2b15cb3dSCy Schubert<p><a name="index-sntp_002dkeyfile-11"></a>
384*2b15cb3dSCy SchubertThis is the &ldquo;look in this file for the key specified with <span class="option">-a</span>&rdquo; option.
385*2b15cb3dSCy SchubertThis option takes a file argument <span class="file">file-name</span>.
386*2b15cb3dSCy SchubertThis option specifies the keyfile.
387*2b15cb3dSCy Schubert<code>sntp</code> will search for the key specified with <span class="option">-a</span>
388*2b15cb3dSCy Schubert<span class="file">keyno</span> in this file.  See <span class="command">ntp.keys(5)</span> for more
389*2b15cb3dSCy Schubertinformation.
390*2b15cb3dSCy Schubert<div class="node">
391*2b15cb3dSCy Schubert<p><hr>
392*2b15cb3dSCy Schubert<a name="sntp-logfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
393*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
394*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
395*2b15cb3dSCy Schubert<br>
396*2b15cb3dSCy Schubert</div>
397*2b15cb3dSCy Schubert
398*2b15cb3dSCy Schubert<h4 class="subsection">logfile option (-l)</h4>
399*2b15cb3dSCy Schubert
400*2b15cb3dSCy Schubert<p><a name="index-sntp_002dlogfile-12"></a>
401*2b15cb3dSCy SchubertThis is the &ldquo;log to specified logfile&rdquo; option.
402*2b15cb3dSCy SchubertThis option takes a file argument <span class="file">file-name</span>.
403*2b15cb3dSCy SchubertThis option causes the client to write log messages to the specified
404*2b15cb3dSCy Schubert<span class="file">logfile</span>.
405*2b15cb3dSCy Schubert<div class="node">
406*2b15cb3dSCy Schubert<p><hr>
407*2b15cb3dSCy Schubert<a name="sntp-steplimit"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ntpversion">sntp ntpversion</a>,
408*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
409*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
410*2b15cb3dSCy Schubert<br>
411*2b15cb3dSCy Schubert</div>
412*2b15cb3dSCy Schubert
413*2b15cb3dSCy Schubert<h4 class="subsection">steplimit option (-M)</h4>
414*2b15cb3dSCy Schubert
415*2b15cb3dSCy Schubert<p><a name="index-sntp_002dsteplimit-13"></a>
416*2b15cb3dSCy SchubertThis is the &ldquo;adjustments less than <var>steplimit</var> msec will be slewed&rdquo; option.
417*2b15cb3dSCy SchubertThis option takes a number argument.
418*2b15cb3dSCy SchubertIf the time adjustment is less than <span class="file">steplimit</span> milliseconds,
419*2b15cb3dSCy Schubertslew the amount using <span class="command">adjtime(2)</span>.  Otherwise, step the
420*2b15cb3dSCy Schubertcorrection using <span class="command">settimeofday(2)</span>.  The default value is 0,
421*2b15cb3dSCy Schubertwhich means all adjustments will be stepped.  This is a feature, as
422*2b15cb3dSCy Schubertdifferent situations demand different values.
423*2b15cb3dSCy Schubert<div class="node">
424*2b15cb3dSCy Schubert<p><hr>
425*2b15cb3dSCy Schubert<a name="sntp-ntpversion"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
426*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-steplimit">sntp steplimit</a>,
427*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
428*2b15cb3dSCy Schubert<br>
429*2b15cb3dSCy Schubert</div>
430*2b15cb3dSCy Schubert
431*2b15cb3dSCy Schubert<h4 class="subsection">ntpversion option (-o)</h4>
432*2b15cb3dSCy Schubert
433*2b15cb3dSCy Schubert<p><a name="index-sntp_002dntpversion-14"></a>
434*2b15cb3dSCy SchubertThis is the &ldquo;send <var>int</var> as our ntp protocol version&rdquo; option.
435*2b15cb3dSCy SchubertThis option takes a number argument.
436*2b15cb3dSCy SchubertWhen sending requests to a remote server, tell them we are running
437*2b15cb3dSCy SchubertNTP protocol version <span class="file">ntpversion</span> .
438*2b15cb3dSCy Schubert<div class="node">
439*2b15cb3dSCy Schubert<p><hr>
440*2b15cb3dSCy Schubert<a name="sntp-usereservedport"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
441*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ntpversion">sntp ntpversion</a>,
442*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
443*2b15cb3dSCy Schubert<br>
444*2b15cb3dSCy Schubert</div>
445*2b15cb3dSCy Schubert
446*2b15cb3dSCy Schubert<h4 class="subsection">usereservedport option (-r)</h4>
447*2b15cb3dSCy Schubert
448*2b15cb3dSCy Schubert<p><a name="index-sntp_002dusereservedport-15"></a>
449*2b15cb3dSCy SchubertThis is the &ldquo;use the ntp reserved port (port 123)&rdquo; option.
450*2b15cb3dSCy SchubertUse port 123, which is reserved for NTP, for our network
451*2b15cb3dSCy Schubertcommunications.
452*2b15cb3dSCy Schubert<div class="node">
453*2b15cb3dSCy Schubert<p><hr>
454*2b15cb3dSCy Schubert<a name="sntp-timeout"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-wait">sntp wait</a>,
455*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-usereservedport">sntp usereservedport</a>,
456*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
457*2b15cb3dSCy Schubert<br>
458*2b15cb3dSCy Schubert</div>
459*2b15cb3dSCy Schubert
460*2b15cb3dSCy Schubert<h4 class="subsection">timeout option (-t)</h4>
461*2b15cb3dSCy Schubert
462*2b15cb3dSCy Schubert<p><a name="index-sntp_002dtimeout-16"></a>
463*2b15cb3dSCy SchubertThis is the &ldquo;the number of seconds to wait for responses&rdquo; option.
464*2b15cb3dSCy SchubertThis option takes a number argument <span class="file">seconds</span>.
465*2b15cb3dSCy SchubertWhen waiting for a reply, <code>sntp</code> will wait the number
466*2b15cb3dSCy Schubertof seconds specified before giving up.  The default should be
467*2b15cb3dSCy Schubertmore than enough for a unicast response.  If <code>sntp</code> is
468*2b15cb3dSCy Schubertonly waiting for a broadcast response a longer timeout is
469*2b15cb3dSCy Schubertlikely needed.
470*2b15cb3dSCy Schubert<div class="node">
471*2b15cb3dSCy Schubert<p><hr>
472*2b15cb3dSCy Schubert<a name="sntp-wait"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-config">sntp config</a>,
473*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-timeout">sntp timeout</a>,
474*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
475*2b15cb3dSCy Schubert<br>
476*2b15cb3dSCy Schubert</div>
477*2b15cb3dSCy Schubert
478*2b15cb3dSCy Schubert<h4 class="subsection">wait option</h4>
479*2b15cb3dSCy Schubert
480*2b15cb3dSCy Schubert<p><a name="index-sntp_002dwait-17"></a>
481*2b15cb3dSCy SchubertThis is the &ldquo;wait for pending replies (if not setting the time)&rdquo; option.
482*2b15cb3dSCy Schubert
483*2b15cb3dSCy Schubert<p class="noindent">This option has some usage constraints.  It:
484*2b15cb3dSCy Schubert     <ul>
485*2b15cb3dSCy Schubert<li>can be disabled with &ndash;no-wait.
486*2b15cb3dSCy Schubert<li>It is enabled by default.
487*2b15cb3dSCy Schubert</ul>
488*2b15cb3dSCy Schubert
489*2b15cb3dSCy Schubert  <p>If we are not setting the time, wait for all pending responses.
490*2b15cb3dSCy Schubert
491*2b15cb3dSCy Schubert<div class="node">
492*2b15cb3dSCy Schubert<p><hr>
493*2b15cb3dSCy Schubert<a name="sntp-config"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-exit-status">sntp exit status</a>,
494*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-wait">sntp wait</a>,
495*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
496*2b15cb3dSCy Schubert<br>
497*2b15cb3dSCy Schubert</div>
498*2b15cb3dSCy Schubert
499*2b15cb3dSCy Schubert<h4 class="subsection">presetting/configuring sntp</h4>
500*2b15cb3dSCy Schubert
501*2b15cb3dSCy Schubert<p>Any option that is not marked as <i>not presettable</i> may be preset by
502*2b15cb3dSCy 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
503*2b15cb3dSCy Schubertthe options listed above in upper case and segmented with underscores.
504*2b15cb3dSCy SchubertThe <code>SNTP</code> variable will be tokenized and parsed like
505*2b15cb3dSCy Schubertthe command line.  The remaining variables are tested for existence and their
506*2b15cb3dSCy Schubertvalues are treated like option arguments.
507*2b15cb3dSCy Schubert
508*2b15cb3dSCy Schubert<p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
509*2b15cb3dSCy Schubert     <ul>
510*2b15cb3dSCy Schubert<li>$HOME
511*2b15cb3dSCy Schubert<li>$PWD
512*2b15cb3dSCy Schubert</ul>
513*2b15cb3dSCy Schubert  The environment variables <code>HOME</code>, and <code>PWD</code>
514*2b15cb3dSCy Schubertare expanded and replaced when <span class="file">sntp</span> runs.
515*2b15cb3dSCy SchubertFor any of these that are plain files, they are simply processed.
516*2b15cb3dSCy SchubertFor any that are directories, then a file named <span class="file">.ntprc</span> is searched for
517*2b15cb3dSCy Schubertwithin that directory and processed.
518*2b15cb3dSCy Schubert
519*2b15cb3dSCy Schubert  <p>Configuration files may be in a wide variety of formats.
520*2b15cb3dSCy SchubertThe basic format is an option name followed by a value (argument) on the
521*2b15cb3dSCy Schubertsame line.  Values may be separated from the option name with a colon,
522*2b15cb3dSCy Schubertequal sign or simply white space.  Values may be continued across multiple
523*2b15cb3dSCy Schubertlines by escaping the newline with a backslash.
524*2b15cb3dSCy Schubert
525*2b15cb3dSCy Schubert  <p>Multiple programs may also share the same initialization file.
526*2b15cb3dSCy SchubertCommon options are collected at the top, followed by program specific
527*2b15cb3dSCy Schubertsegments.  The segments are separated by lines like:
528*2b15cb3dSCy Schubert<pre class="example">    [SNTP]
529*2b15cb3dSCy Schubert</pre>
530*2b15cb3dSCy Schubert  <p class="noindent">or by
531*2b15cb3dSCy Schubert<pre class="example">    &lt;?program sntp&gt;
532*2b15cb3dSCy Schubert</pre>
533*2b15cb3dSCy Schubert  <p class="noindent">Do not mix these styles within one configuration file.
534*2b15cb3dSCy Schubert
535*2b15cb3dSCy Schubert  <p>Compound values and carefully constructed string values may also be
536*2b15cb3dSCy Schubertspecified using XML syntax:
537*2b15cb3dSCy Schubert<pre class="example">    &lt;option-name&gt;
538*2b15cb3dSCy Schubert       &lt;sub-opt&gt;...&amp;lt;...&amp;gt;...&lt;/sub-opt&gt;
539*2b15cb3dSCy Schubert    &lt;/option-name&gt;
540*2b15cb3dSCy Schubert</pre>
541*2b15cb3dSCy Schubert  <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
542*2b15cb3dSCy Schubert<pre class="example">    "...&lt;...&gt;..."
543*2b15cb3dSCy Schubert</pre>
544*2b15cb3dSCy Schubert  <p><code>AutoOpts</code> does not track suboptions.  You simply note that it is a
545*2b15cb3dSCy Schuberthierarchicly valued option.  <code>AutoOpts</code> does provide a means for searching
546*2b15cb3dSCy Schubertthe associated name/value pair list (see: optionFindValue).
547*2b15cb3dSCy Schubert
548*2b15cb3dSCy Schubert  <p>The command line options relating to configuration and/or usage help are:
549*2b15cb3dSCy Schubert
550*2b15cb3dSCy Schubert<h5 class="subsubheading">version (-)</h5>
551*2b15cb3dSCy Schubert
552*2b15cb3dSCy Schubert<p>Print the program version to standard out, optionally with licensing
553*2b15cb3dSCy Schubertinformation, then exit 0.  The optional argument specifies how much licensing
554*2b15cb3dSCy Schubertdetail to provide.  The default is to print just the version.  The licensing infomation may be selected with an option argument.
555*2b15cb3dSCy SchubertOnly the first letter of the argument is examined:
556*2b15cb3dSCy Schubert
557*2b15cb3dSCy Schubert     <dl>
558*2b15cb3dSCy Schubert<dt><span class="samp">version</span><dd>Only print the version.  This is the default.
559*2b15cb3dSCy Schubert<br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
560*2b15cb3dSCy Schubert<br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
561*2b15cb3dSCy Schubert</dl>
562*2b15cb3dSCy Schubert
563*2b15cb3dSCy Schubert<div class="node">
564*2b15cb3dSCy Schubert<p><hr>
565*2b15cb3dSCy Schubert<a name="sntp-exit-status"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Usage">sntp Usage</a>,
566*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-config">sntp config</a>,
567*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
568*2b15cb3dSCy Schubert<br>
569*2b15cb3dSCy Schubert</div>
570*2b15cb3dSCy Schubert
571*2b15cb3dSCy Schubert<h4 class="subsection">sntp exit status</h4>
572*2b15cb3dSCy Schubert
573*2b15cb3dSCy Schubert<p>One of the following exit values will be returned:
574*2b15cb3dSCy Schubert     <dl>
575*2b15cb3dSCy Schubert<dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
576*2b15cb3dSCy Schubert<br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
577*2b15cb3dSCy Schubert<br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
578*2b15cb3dSCy Schubert<br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error.  Please report
579*2b15cb3dSCy Schubertit to autogen-users@lists.sourceforge.net.  Thank you.
580*2b15cb3dSCy Schubert</dl>
581*2b15cb3dSCy Schubert  <div class="node">
582*2b15cb3dSCy Schubert<p><hr>
583*2b15cb3dSCy Schubert<a name="sntp-Usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Authors">sntp Authors</a>,
584*2b15cb3dSCy SchubertPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-exit-status">sntp exit status</a>,
585*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
586*2b15cb3dSCy Schubert<br>
587*2b15cb3dSCy Schubert</div>
588*2b15cb3dSCy Schubert
589*2b15cb3dSCy Schubert<h4 class="subsection">sntp Usage</h4>
590*2b15cb3dSCy Schubert
591*2b15cb3dSCy Schubert<div class="node">
592*2b15cb3dSCy Schubert<p><hr>
593*2b15cb3dSCy Schubert<a name="sntp-Authors"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-Usage">sntp Usage</a>,
594*2b15cb3dSCy SchubertUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
595*2b15cb3dSCy Schubert<br>
596*2b15cb3dSCy Schubert</div>
597*2b15cb3dSCy Schubert
598*2b15cb3dSCy Schubert<h4 class="subsection">sntp Authors</h4>
599*2b15cb3dSCy Schubert
600*2b15cb3dSCy Schubert<div class="node">
601*2b15cb3dSCy Schubert<p><hr>
602*2b15cb3dSCy Schubert<a name="Usage"></a>
603*2b15cb3dSCy Schubert<br>
604*2b15cb3dSCy Schubert</div>
605*2b15cb3dSCy Schubert
606*2b15cb3dSCy Schubert<!-- node-name,  next,  previous,  up -->
607*2b15cb3dSCy Schubert<h3 class="section">Usage</h3>
608*2b15cb3dSCy Schubert
609*2b15cb3dSCy Schubert<p>The simplest use of this program is as an unprivileged command to
610*2b15cb3dSCy Schubertcheck the current time, offset, and error in the local clock.
611*2b15cb3dSCy SchubertFor example:
612*2b15cb3dSCy Schubert
613*2b15cb3dSCy Schubert<pre class="example">    sntp ntpserver.somewhere
614*2b15cb3dSCy Schubert</pre>
615*2b15cb3dSCy Schubert  <p>With suitable privilege, it can be run as a command or in a
616*2b15cb3dSCy Schubert<code>crom</code> job to reset the local clock from a reliable server, like
617*2b15cb3dSCy Schubertthe <code>ntpdate</code> and <code>rdate</code> commands.
618*2b15cb3dSCy SchubertFor example:
619*2b15cb3dSCy Schubert
620*2b15cb3dSCy Schubert<pre class="example">    sntp -a ntpserver.somewhere
621*2b15cb3dSCy Schubert</pre>
622*2b15cb3dSCy Schubert  </body></html>
623*2b15cb3dSCy Schubert
624