sntp.html revision 258945
1258945Sroberto<html lang="en">
2258945Sroberto<head>
3258945Sroberto<title>Sntp User's Manual</title>
4258945Sroberto<meta http-equiv="Content-Type" content="text/html">
5258945Sroberto<meta name="description" content="Sntp User's Manual">
6258945Sroberto<meta name="generator" content="makeinfo 4.7">
7258945Sroberto<link title="Top" rel="top" href="#Top">
8258945Sroberto<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9258945Sroberto<meta http-equiv="Content-Style-Type" content="text/css">
10258945Sroberto<style type="text/css"><!--
11258945Sroberto  pre.display { font-family:inherit }
12258945Sroberto  pre.format  { font-family:inherit }
13258945Sroberto  pre.smalldisplay { font-family:inherit; font-size:smaller }
14258945Sroberto  pre.smallformat  { font-family:inherit; font-size:smaller }
15258945Sroberto  pre.smallexample { font-size:smaller }
16258945Sroberto  pre.smalllisp    { font-size:smaller }
17258945Sroberto  span.sc { font-variant:small-caps }
18258945Sroberto  span.roman { font-family: serif; font-weight: normal; } 
19258945Sroberto--></style>
20258945Sroberto</head>
21258945Sroberto<body>
22258945Sroberto<h1 class="settitle">Sntp User's Manual</h1>
23258945Sroberto<div class="node">
24258945Sroberto<p><hr>
25258945Sroberto<a name="Top"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
26258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
28258945Sroberto<br>
29258945Sroberto</div>
30258945Sroberto
31258945Sroberto<h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
32258945Sroberto
33258945Sroberto<p>This document describes the use of the NTP Project's <code>sntp</code> program,
34258945Srobertothat can be used to query a Network Time Protocol (NTP) server and
35258945Srobertodisplay the time offset of the system clock relative to the server
36258945Srobertoclock.  Run as root, it can correct the system clock to this offset as
37258945Srobertowell.  It can be run as an interactive command or from a cron job.
38258945Sroberto
39258945Sroberto  <p>This document applies to version 4.2.6p5 of <code>sntp</code>.
40258945Sroberto
41258945Sroberto  <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
42258945SrobertoIETF specification.
43258945Sroberto
44258945Sroberto  <div class="shortcontents">
45258945Sroberto<h2>Short Contents</h2>
46258945Sroberto<ul>
47258945Sroberto<a href="#Top">Simple Network Time Protocol User Manual</a>
48258945Sroberto</ul>
49258945Sroberto</div>
50258945Sroberto
51258945Sroberto<ul class="menu">
52258945Sroberto<li><a accesskey="1" href="#sntp-Description">sntp Description</a>:             Description
53258945Sroberto<li><a accesskey="2" href="#sntp-Invocation">sntp Invocation</a>: 		Invoking sntp
54258945Sroberto<li><a accesskey="3" href="#Usage">Usage</a>:                        Usage
55258945Sroberto</ul>
56258945Sroberto
57258945Sroberto<div class="node">
58258945Sroberto<p><hr>
59258945Sroberto<a name="sntp-Description"></a>
60258945Sroberto<br>
61258945Sroberto</div>
62258945Sroberto
63258945Sroberto<!-- node-name,  next,  previous,  up -->
64258945Sroberto<h3 class="section">Description</h3>
65258945Sroberto
66258945Sroberto<p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
67258945Srobertostandard output in the format:
68258945Sroberto
69258945Sroberto<pre class="example">     1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
70258945Sroberto</pre>
71258945Sroberto  <p>where the +4.567 +/- 0.089 secs indicates the time offset and
72258945Srobertoerror bound of the system clock relative to the server clock.
73258945Sroberto
74258945Sroberto<div class="node">
75258945Sroberto<p><hr>
76258945Sroberto<a name="sntp-Invocation"></a>
77258945Sroberto<br>
78258945Sroberto</div>
79258945Sroberto
80258945Sroberto<h3 class="section">Invoking sntp</h3>
81258945Sroberto
82258945Sroberto<p><a name="index-sntp-1"></a><a name="index-standard-Simple-Network-Time-Protocol-program-2"></a>
83258945Sroberto<code>sntp</code>
84258945Srobertocan be used as a SNTP client to query a NTP or SNTP server and either display
85258945Srobertothe time or set the local system's time (given suitable privilege).  It can be
86258945Srobertorun as an interactive command or in a
87258945Sroberto<code>cron</code>
88258945Srobertojob.
89258945Sroberto
90258945Sroberto  <p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
91258945Srobertoare defined and described by RFC 5905.
92258945Sroberto
93258945Sroberto  <p class="indent">The default is to write the estimated correct local date and time (i.e. not
94258945SrobertoUTC) to the standard output in a format like
95258945Sroberto<pre class="example">     1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
96258945Sroberto</pre>
97258945Sroberto  <p>where the
98258945Sroberto<pre class="example">     +4.567 +/- 0.089 secs
99258945Sroberto</pre>
100258945Sroberto  <p>indicates the local clock is 4.567 seconds behind the correct time
101258945Sroberto(so 4.567 seconds must be added to the local clock to get it to be correct),
102258945Srobertoand the (local) time of
103258945Sroberto<code>1996-10-15 20:17:25.123</code>
104258945Srobertocan be converted to UTC time by adding 8 hours and 0 minutes, and
105258945Srobertois believed to be correct to within
106258945Sroberto<code>+/- 0.089</code>
107258945Srobertoseconds.
108258945Sroberto
109258945Sroberto  <p>This section was generated by <strong>AutoGen</strong>,
110258945Srobertothe aginfo template and the option descriptions for the <span class="command">sntp</span> program.  It documents the <span class="command">sntp</span> usage text and option meanings.
111258945Sroberto
112258945Sroberto  <p>This software is released under a specialized copyright license.
113258945Sroberto
114258945Sroberto<ul class="menu">
115258945Sroberto<li><a accesskey="1" href="#sntp-usage">sntp usage</a>:                   sntp usage help (-?) 
116258945Sroberto<li><a accesskey="2" href="#sntp-adjtime">sntp adjtime</a>:                adjtime option (-j)
117258945Sroberto<li><a accesskey="3" href="#sntp-authentication">sntp authentication</a>:         authentication option (-a)
118258945Sroberto<li><a accesskey="4" href="#sntp-broadcast">sntp broadcast</a>:              broadcast option (-b)
119258945Sroberto<li><a accesskey="5" href="#sntp-ipv4">sntp ipv4</a>:                   ipv4 option (-4)
120258945Sroberto<li><a accesskey="6" href="#sntp-ipv6">sntp ipv6</a>:                   ipv6 option (-6)
121258945Sroberto<li><a accesskey="7" href="#sntp-keyfile">sntp keyfile</a>:                keyfile option (-k)
122258945Sroberto<li><a accesskey="8" href="#sntp-kod">sntp kod</a>:                    kod option (-K)
123258945Sroberto<li><a accesskey="9" href="#sntp-logfile">sntp logfile</a>:                logfile option (-l)
124258945Sroberto<li><a href="#sntp-normalverbose">sntp normalverbose</a>:          normalverbose option (-d)
125258945Sroberto<li><a href="#sntp-settod">sntp settod</a>:                 settod option (-s)
126258945Sroberto<li><a href="#sntp-syslog">sntp syslog</a>:                 syslog option (-p)
127258945Sroberto<li><a href="#sntp-timeout">sntp timeout</a>:                timeout option (-t)
128258945Sroberto</ul>
129258945Sroberto
130258945Sroberto<div class="node">
131258945Sroberto<p><hr>
132258945Sroberto<a name="sntp-usage"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-adjtime">sntp adjtime</a>,
133258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
134258945Sroberto<br>
135258945Sroberto</div>
136258945Sroberto
137258945Sroberto<h4 class="subsection">sntp usage help (-?)</h4>
138258945Sroberto
139258945Sroberto<p><a name="index-sntp-usage-3"></a>
140258945SrobertoThis is the automatically generated usage text for sntp:
141258945Sroberto
142258945Sroberto<pre class="example">sntp - standard Simple Network Time Protocol program - Ver. 4.2.6p5
143258945SrobertoUSAGE:  sntp [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
144258945Sroberto                [ hostname-or-IP ...]
145258945Sroberto  Flg Arg Option-Name    Description
146258945Sroberto   -4 no  ipv4           Force IPv4 DNS name resolution
147258945Sroberto                                - prohibits these options:
148258945Sroberto                                ipv6
149258945Sroberto   -6 no  ipv6           Force IPv6 DNS name resolution
150258945Sroberto                                - prohibits these options:
151258945Sroberto                                ipv4
152258945Sroberto   -d no  normalverbose  Normal verbose
153258945Sroberto   -K Str kod            KoD history filename
154258945Sroberto   -p no  syslog         Logging with syslog
155258945Sroberto                                - prohibits these options:
156258945Sroberto                                logfile
157258945Sroberto   -l Str logfile        Log to specified logfile
158258945Sroberto                                - prohibits these options:
159258945Sroberto                                syslog
160258945Sroberto   -s no  settod         Set (step) the time with settimeofday()
161258945Sroberto                                - prohibits these options:
162258945Sroberto                                adjtime
163258945Sroberto   -j no  adjtime        Set (slew) the time with adjtime()
164258945Sroberto                                - prohibits these options:
165258945Sroberto                                settod
166258945Sroberto   -b Str broadcast      Use broadcasts to the address specified for synchronisation
167258945Sroberto   -t Num timeout        Specify the number of seconds to wait for broadcasts
168258945Sroberto   -a Num authentication Enable authentication with the key auth-keynumber
169258945Sroberto   -k Str keyfile        Specify a keyfile. SNTP will look in this file for the key specified with -a
170258945Sroberto      opt version        Output version information and exit
171258945Sroberto   -? no  help           Display extended usage information and exit
172258945Sroberto   -! no  more-help      Extended usage information passed thru pager
173258945Sroberto   -&gt; opt save-opts      Save the option state to a config file
174258945Sroberto   -&lt; Str load-opts      Load options from a config file
175258945Sroberto                                - disabled as --no-load-opts
176258945Sroberto                                - may appear multiple times
177258945Sroberto
178258945SrobertoOptions are specified by doubled hyphens and their name or by a single
179258945Srobertohyphen and the flag character.
180258945Sroberto
181258945Sroberto
182258945Sroberto
183258945SrobertoThe following option preset mechanisms are supported:
184258945Sroberto - reading file $HOME/.ntprc
185258945Sroberto - reading file ./.ntprc
186258945Sroberto - examining environment variables named SNTP_*
187258945Sroberto
188258945Srobertosntp implements the Simple Network Time Protocol, and is used to query an
189258945SrobertoNTP or SNTP server and either display the time or set the local system's
190258945Srobertotime (given suitable privilege).
191258945Sroberto
192258945SrobertoIt can be run interactively from the command line or as a cron job.
193258945Sroberto
194258945SrobertoNTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC
195258945Sroberto1305.
196258945Sroberto
197258945Srobertoplease send bug reports to:  http://bugs.ntp.org, bugs@ntp.org
198258945Sroberto</pre>
199258945Sroberto  <div class="node">
200258945Sroberto<p><hr>
201258945Sroberto<a name="sntp-adjtime"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
202258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
203258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
204258945Sroberto<br>
205258945Sroberto</div>
206258945Sroberto
207258945Sroberto<h4 class="subsection">adjtime option (-j)</h4>
208258945Sroberto
209258945Sroberto<p><a name="index-sntp_002dadjtime-4"></a>
210258945SrobertoThis is the &ldquo;set (slew) the time with adjtime()&rdquo; option.
211258945Sroberto
212258945Sroberto  <p>This option has some usage constraints.  It:
213258945Sroberto     <ul>
214258945Sroberto<li>must not appear in combination with any of the following options:
215258945Srobertosettod. 
216258945Sroberto</ul>
217258945Sroberto
218258945Sroberto<div class="node">
219258945Sroberto<p><hr>
220258945Sroberto<a name="sntp-authentication"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
221258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-adjtime">sntp adjtime</a>,
222258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
223258945Sroberto<br>
224258945Sroberto</div>
225258945Sroberto
226258945Sroberto<h4 class="subsection">authentication option (-a)</h4>
227258945Sroberto
228258945Sroberto<p><a name="index-sntp_002dauthentication-5"></a>
229258945SrobertoThis is the &ldquo;enable authentication with the key auth-keynumber&rdquo; option. 
230258945SrobertoThis option enables authentication using the key specified in this option's argument. 
231258945SrobertoThe argument of this option is the keyid, a number specified in the keyfile as this
232258945Srobertokey's identifier. See the keyfile option (-k) for more details.
233258945Sroberto
234258945Sroberto<div class="node">
235258945Sroberto<p><hr>
236258945Sroberto<a name="sntp-broadcast"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
237258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
238258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
239258945Sroberto<br>
240258945Sroberto</div>
241258945Sroberto
242258945Sroberto<h4 class="subsection">broadcast option (-b)</h4>
243258945Sroberto
244258945Sroberto<p><a name="index-sntp_002dbroadcast-6"></a>
245258945SrobertoThis is the &ldquo;use broadcasts to the address specified for synchronisation&rdquo; option. 
246258945SrobertoIf specified SNTP will listen to the specified broadcast address
247258945Srobertofor NTP broadcasts.  The default maximum wait time,
248258945Sroberto68 seconds, can be modified with -t.
249258945Sroberto
250258945Sroberto<div class="node">
251258945Sroberto<p><hr>
252258945Sroberto<a name="sntp-ipv4"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
253258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
254258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
255258945Sroberto<br>
256258945Sroberto</div>
257258945Sroberto
258258945Sroberto<h4 class="subsection">ipv4 option (-4)</h4>
259258945Sroberto
260258945Sroberto<p><a name="index-sntp_002dipv4-7"></a>
261258945SrobertoThis is the &ldquo;force ipv4 dns name resolution&rdquo; option.
262258945Sroberto
263258945Sroberto  <p>This option has some usage constraints.  It:
264258945Sroberto     <ul>
265258945Sroberto<li>must not appear in combination with any of the following options:
266258945Srobertoipv6. 
267258945Sroberto</ul>
268258945Sroberto
269258945Sroberto  <p>Force DNS resolution of the following host names on the command line
270258945Srobertoto the IPv4 namespace.
271258945Sroberto
272258945Sroberto<div class="node">
273258945Sroberto<p><hr>
274258945Sroberto<a name="sntp-ipv6"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
275258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
276258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
277258945Sroberto<br>
278258945Sroberto</div>
279258945Sroberto
280258945Sroberto<h4 class="subsection">ipv6 option (-6)</h4>
281258945Sroberto
282258945Sroberto<p><a name="index-sntp_002dipv6-8"></a>
283258945SrobertoThis is the &ldquo;force ipv6 dns name resolution&rdquo; option.
284258945Sroberto
285258945Sroberto  <p>This option has some usage constraints.  It:
286258945Sroberto     <ul>
287258945Sroberto<li>must not appear in combination with any of the following options:
288258945Srobertoipv4. 
289258945Sroberto</ul>
290258945Sroberto
291258945Sroberto  <p>Force DNS resolution of the following host names on the command line
292258945Srobertoto the IPv6 namespace.
293258945Sroberto
294258945Sroberto<div class="node">
295258945Sroberto<p><hr>
296258945Sroberto<a name="sntp-keyfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
297258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
298258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
299258945Sroberto<br>
300258945Sroberto</div>
301258945Sroberto
302258945Sroberto<h4 class="subsection">keyfile option (-k)</h4>
303258945Sroberto
304258945Sroberto<p><a name="index-sntp_002dkeyfile-9"></a>
305258945SrobertoThis is the &ldquo;specify a keyfile. sntp will look in this file for the key specified with -a&rdquo; option. 
306258945SrobertoThis option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
307258945Srobertofile. Key files follow the following format:
308258945Sroberto
309258945Sroberto  <p>keyid keytype key
310258945Sroberto
311258945Sroberto  <p>Where	keyid is a number identifying this key
312258945Srobertokeytype is one of the follow:
313258945SrobertoS  Key in 64 Bit hexadecimal number as specified in in the DES specification. 
314258945SrobertoN  Key in 64 Bit hexadecimal number as specified in the NTP standard. 
315258945SrobertoA  Key in a 1-to-8 character ASCII string. 
316258945SrobertoM  Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
317258945Sroberto
318258945Sroberto  <p>For more information see ntp.keys(5).
319258945Sroberto
320258945Sroberto<div class="node">
321258945Sroberto<p><hr>
322258945Sroberto<a name="sntp-kod"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
323258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
324258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
325258945Sroberto<br>
326258945Sroberto</div>
327258945Sroberto
328258945Sroberto<h4 class="subsection">kod option (-K)</h4>
329258945Sroberto
330258945Sroberto<p><a name="index-sntp_002dkod-10"></a>
331258945SrobertoThis is the &ldquo;kod history filename&rdquo; option. 
332258945SrobertoSpecifies the filename to be used to persist the history of KoD
333258945Srobertoresponses received from servers.  The default is
334258945Sroberto/var/db/ntp-kod.
335258945Sroberto
336258945Sroberto<div class="node">
337258945Sroberto<p><hr>
338258945Sroberto<a name="sntp-logfile"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-normalverbose">sntp normalverbose</a>,
339258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
340258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
341258945Sroberto<br>
342258945Sroberto</div>
343258945Sroberto
344258945Sroberto<h4 class="subsection">logfile option (-l)</h4>
345258945Sroberto
346258945Sroberto<p><a name="index-sntp_002dlogfile-11"></a>
347258945SrobertoThis is the &ldquo;log to specified logfile&rdquo; option.
348258945Sroberto
349258945Sroberto  <p>This option has some usage constraints.  It:
350258945Sroberto     <ul>
351258945Sroberto<li>must not appear in combination with any of the following options:
352258945Srobertosyslog. 
353258945Sroberto</ul>
354258945Sroberto
355258945Sroberto  <p>This option causes the client to write log messages to the specified
356258945Srobertologfile.
357258945Sroberto
358258945Sroberto<div class="node">
359258945Sroberto<p><hr>
360258945Sroberto<a name="sntp-normalverbose"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-settod">sntp settod</a>,
361258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
362258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
363258945Sroberto<br>
364258945Sroberto</div>
365258945Sroberto
366258945Sroberto<h4 class="subsection">normalverbose option (-d)</h4>
367258945Sroberto
368258945Sroberto<p><a name="index-sntp_002dnormalverbose-12"></a>
369258945SrobertoThis is the &ldquo;normal verbose&rdquo; option. 
370258945SrobertoDiagnostic messages for non-fatal errors and a limited amount of
371258945Srobertotracing should be written to standard error.  Fatal ones always
372258945Srobertoproduce a diagnostic.  This option should be set when there is a
373258945Srobertosuspected problem with the server, network or the source.
374258945Sroberto
375258945Sroberto<div class="node">
376258945Sroberto<p><hr>
377258945Sroberto<a name="sntp-settod"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-syslog">sntp syslog</a>,
378258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-normalverbose">sntp normalverbose</a>,
379258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
380258945Sroberto<br>
381258945Sroberto</div>
382258945Sroberto
383258945Sroberto<h4 class="subsection">settod option (-s)</h4>
384258945Sroberto
385258945Sroberto<p><a name="index-sntp_002dsettod-13"></a>
386258945SrobertoThis is the &ldquo;set (step) the time with settimeofday()&rdquo; option.
387258945Sroberto
388258945Sroberto  <p>This option has some usage constraints.  It:
389258945Sroberto     <ul>
390258945Sroberto<li>must not appear in combination with any of the following options:
391258945Srobertoadjtime. 
392258945Sroberto</ul>
393258945Sroberto
394258945Sroberto<div class="node">
395258945Sroberto<p><hr>
396258945Sroberto<a name="sntp-syslog"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
397258945SrobertoPrevious:&nbsp;<a rel="previous" accesskey="p" href="#sntp-settod">sntp settod</a>,
398258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
399258945Sroberto<br>
400258945Sroberto</div>
401258945Sroberto
402258945Sroberto<h4 class="subsection">syslog option (-p)</h4>
403258945Sroberto
404258945Sroberto<p><a name="index-sntp_002dsyslog-14"></a>
405258945SrobertoThis is the &ldquo;logging with syslog&rdquo; option.
406258945Sroberto
407258945Sroberto  <p>This option has some usage constraints.  It:
408258945Sroberto     <ul>
409258945Sroberto<li>must not appear in combination with any of the following options:
410258945Srobertologfile. 
411258945Sroberto</ul>
412258945Sroberto
413258945Sroberto  <p>When this option is set all logging will be done using syslog.
414258945Sroberto
415258945Sroberto<div class="node">
416258945Sroberto<p><hr>
417258945Sroberto<a name="sntp-timeout"></a>Previous:&nbsp;<a rel="previous" accesskey="p" href="#sntp-syslog">sntp syslog</a>,
418258945SrobertoUp:&nbsp;<a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
419258945Sroberto<br>
420258945Sroberto</div>
421258945Sroberto
422258945Sroberto<h4 class="subsection">timeout option (-t)</h4>
423258945Sroberto
424258945Sroberto<p><a name="index-sntp_002dtimeout-15"></a>
425258945SrobertoThis is the &ldquo;specify the number of seconds to wait for broadcasts&rdquo; option. 
426258945SrobertoWhen waiting for a broadcast packet SNTP will wait the number
427258945Srobertoof seconds specified before giving up.  Default 68 seconds.
428258945Sroberto
429258945Sroberto<div class="node">
430258945Sroberto<p><hr>
431258945Sroberto<a name="Usage"></a>
432258945Sroberto<br>
433258945Sroberto</div>
434258945Sroberto
435258945Sroberto<!-- node-name,  next,  previous,  up -->
436258945Sroberto<h3 class="section">Usage</h3>
437258945Sroberto
438258945Sroberto<p>The simplest use of this program is as an unprivileged command to
439258945Srobertocheck the current time, offset, and error in the local clock. 
440258945SrobertoFor example:
441258945Sroberto
442258945Sroberto<pre class="example">    sntp ntpserver.somewhere
443258945Sroberto</pre>
444258945Sroberto  <p>With suitable privilege, it can be run as a command or in a
445258945Sroberto<code>crom</code> job to reset the local clock from a reliable server, like
446258945Srobertothe <code>ntpdate</code> and <code>rdate</code> commands. 
447258945SrobertoFor example:
448258945Sroberto
449258945Sroberto<pre class="example">    sntp -a ntpserver.somewhere
450258945Sroberto</pre>
451258945Sroberto  </body></html>
452258945Sroberto
453