3 <title>Sntp User's Manual</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="Sntp User's Manual">
6 <meta name="generator" content="makeinfo 4.7">
7 <link title="Top" rel="top" href="#Top">
8 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 <meta http-equiv="Content-Style-Type" content="text/css">
10 <style type="text/css"><!--
11 pre.display { font-family:inherit }
12 pre.format { font-family:inherit }
13 pre.smalldisplay { font-family:inherit; font-size:smaller }
14 pre.smallformat { font-family:inherit; font-size:smaller }
15 pre.smallexample { font-size:smaller }
16 pre.smalllisp { font-size:smaller }
17 span.sc { font-variant:small-caps }
18 span.roman { font-family: serif; font-weight: normal; }
22 <h1 class="settitle">Sntp User's Manual</h1>
25 <a name="Top"></a>Next: <a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
26 Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27 Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
31 <h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
33 <p>This document describes the use of the NTP Project's <code>sntp</code> program,
34 that can be used to query a Network Time Protocol (NTP) server and
35 display the time offset of the system clock relative to the server
36 clock. Run as root, it can correct the system clock to this offset as
37 well. It can be run as an interactive command or from a cron job.
39 <p>This document applies to version 4.2.8p11 of <code>sntp</code>.
41 <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
44 <div class="shortcontents">
45 <h2>Short Contents</h2>
47 <a href="#Top">Simple Network Time Protocol User Manual</a>
52 <li><a accesskey="1" href="#sntp-Description">sntp Description</a>: Description
53 <li><a accesskey="2" href="#sntp-Invocation">sntp Invocation</a>: Invoking sntp
54 <li><a accesskey="3" href="#Usage">Usage</a>: Usage
59 <a name="sntp-Description"></a>
63 <!-- node-name, next, previous, up -->
64 <h3 class="section">Description</h3>
66 <p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
67 standard output in the format:
69 <pre class="example"> 1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
72 YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
73 (+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
75 the +4.567 +/- 0.089 secs indicates the time offset and
76 error bound of the system clock relative to the server clock.
80 <a name="sntp-Invocation"></a>
84 <h3 class="section">Invoking sntp</h3>
86 <p><a name="index-sntp-1"></a><a name="index-standard-Simple-Network-Time-Protocol-client-program-2"></a>
89 can be used as an SNTP client to query a NTP or SNTP server and either display
90 the time or set the local system's time (given suitable privilege). It can be
91 run as an interactive command or from a
95 <p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
96 are defined and described by RFC 5905.
98 <p>The default is to write the estimated correct local date and time (i.e. not
99 UTC) to the standard output in a format like:
101 <p><code>'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'</code>
104 <code>'(+0800)'</code>
105 means that to get to UTC from the reported local time one must
106 add 8 hours and 0 minutes,
108 <code>'+4.567'</code>
109 indicates the local clock is 4.567 seconds behind the correct time
110 (so 4.567 seconds must be added to the local clock to get it to be correct).
111 Note that the number of decimals printed for this value will change
112 based on the reported precision of the server.
113 <code>'+/- 0.089'</code>
115 <em>synchronization</em> <em>distance</em>
116 (in seconds), which represents the maximum error due to all causes.
117 If the server does not report valid data needed to calculate the
118 synchronization distance, this will be reported as
119 <code>'+/- ?'</code>.
122 is different from the
124 both will be displayed.
130 of the host is reported
131 and the leap indicator is decoded and displayed.
133 <p>This section was generated by <strong>AutoGen</strong>,
134 using the <code>agtexi-cmd</code> template and the option descriptions for the <code>sntp</code> program.
135 This software is released under the NTP license, <http://ntp.org/license>.
138 <li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp help/usage (<span class="option">--help</span>)
139 <li><a accesskey="2" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
140 <li><a accesskey="3" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
141 <li><a accesskey="4" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
142 <li><a accesskey="5" href="#sntp-broadcast">sntp broadcast</a>: broadcast option (-b)
143 <li><a accesskey="6" href="#sntp-concurrent">sntp concurrent</a>: concurrent option (-c)
144 <li><a accesskey="7" href="#sntp-gap">sntp gap</a>: gap option (-g)
145 <li><a accesskey="8" href="#sntp-kod">sntp kod</a>: kod option (-K)
146 <li><a accesskey="9" href="#sntp-keyfile">sntp keyfile</a>: keyfile option (-k)
147 <li><a href="#sntp-logfile">sntp logfile</a>: logfile option (-l)
148 <li><a href="#sntp-steplimit">sntp steplimit</a>: steplimit option (-M)
149 <li><a href="#sntp-ntpversion">sntp ntpversion</a>: ntpversion option (-o)
150 <li><a href="#sntp-usereservedport">sntp usereservedport</a>: usereservedport option (-r)
151 <li><a href="#sntp-timeout">sntp timeout</a>: timeout option (-t)
152 <li><a href="#sntp-wait">sntp wait</a>: wait option
153 <li><a href="#sntp-config">sntp config</a>: presetting/configuring sntp
154 <li><a href="#sntp-exit-status">sntp exit status</a>: exit status
155 <li><a href="#sntp-Usage">sntp Usage</a>: Usage
156 <li><a href="#sntp-Authors">sntp Authors</a>: Authors
161 <a name="sntp-usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
162 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
166 <h4 class="subsection">sntp help/usage (<span class="option">--help</span>)</h4>
168 <p><a name="index-sntp-help-3"></a>
169 This is the automatically generated usage text for sntp.
171 <p>The text printed is the same whether selected with the <code>help</code> option
172 (<span class="option">--help</span>) or the <code>more-help</code> option (<span class="option">--more-help</span>). <code>more-help</code> will print
173 the usage text by passing it through a pager program.
174 <code>more-help</code> is disabled on platforms without a working
175 <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
176 used to select the program, defaulting to <span class="file">more</span>. Both will exit
177 with a status code of 0.
179 <pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.7p245
180 USAGE: sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
181 [ hostname-or-IP ...]
182 Flg Arg Option-Name Description
183 -4 no ipv4 Force IPv4 DNS name resolution
184 - prohibits these options:
186 -6 no ipv6 Force IPv6 DNS name resolution
187 - prohibits these options:
189 -a Num authentication Enable authentication with the key @var{auth-keynumber}
190 -B Num bctimeout The number of seconds to wait for broadcasts
191 -b Str broadcast Listen to the address specified for broadcast time sync
192 - may appear multiple times
193 -c Str concurrent Concurrently query all IPs returned for host-name
194 - may appear multiple times
195 -d no debug-level Increase debug verbosity level
196 - may appear multiple times
197 -D Str set-debug-level Set the debug verbosity level
198 - may appear multiple times
199 -g Num gap The gap (in milliseconds) between time requests
200 -K Fil kod KoD history filename
201 -k Fil keyfile Look in this file for the key specified with @option{-a}
202 -l Fil logfile Log to specified logfile
203 -M Num steplimit Adjustments less than @var{steplimit} msec will be slewed
204 - It must be in the range:
205 greater than or equal to 0
206 -o Num ntpversion Send @var{int} as our NTP version
207 - It must be in the range:
209 -r no usereservedport Use the NTP Reserved Port (port 123)
210 -S no step OK to 'step' the time with @command{settimeofday(2)}
211 -s no slew OK to 'slew' the time with @command{adjtime(2)}
212 -u Num uctimeout The number of seconds to wait for unicast responses
213 no wait Wait for pending replies (if not setting the time)
214 - disabled as --no-wait
216 opt version Output version information and exit
217 -? no help Display extended usage information and exit
218 -! no more-help Extended usage information passed thru pager
219 -> opt save-opts Save the option state to a config file
220 -< Str load-opts Load options from a config file
221 - disabled as --no-load-opts
222 - may appear multiple times
224 Options are specified by doubled hyphens and their name or by a single
225 hyphen and the flag character.
229 The following option preset mechanisms are supported:
230 - reading file $HOME/.ntprc
231 - reading file ./.ntprc
232 - examining environment variables named SNTP_*
234 please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
238 <a name="sntp-ipv4"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
239 Previous: <a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
240 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
244 <h4 class="subsection">ipv4 option (-4)</h4>
246 <p><a name="index-sntp_002dipv4-4"></a>
247 This is the “force ipv4 dns name resolution” option.
249 <p class="noindent">This option has some usage constraints. It:
251 <li>must not appear in combination with any of the following options:
255 <p>Force DNS resolution of the following host names on the command line
256 to the IPv4 namespace.
259 <a name="sntp-ipv6"></a>Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
260 Previous: <a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
261 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
265 <h4 class="subsection">ipv6 option (-6)</h4>
267 <p><a name="index-sntp_002dipv6-5"></a>
268 This is the “force ipv6 dns name resolution” option.
270 <p class="noindent">This option has some usage constraints. It:
272 <li>must not appear in combination with any of the following options:
276 <p>Force DNS resolution of the following host names on the command line
277 to the IPv6 namespace.
280 <a name="sntp-authentication"></a>Next: <a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
281 Previous: <a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
282 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
286 <h4 class="subsection">authentication option (-a)</h4>
288 <p><a name="index-sntp_002dauthentication-6"></a>
289 This is the “enable authentication with the key <var>auth-keynumber</var>” option.
290 This option takes a number argument <span class="file">auth-keynumber</span>.
291 Enable authentication using the key specified in this option's
292 argument. The argument of this option is the <span class="option">keyid</span>, a
293 number specified in the <span class="option">keyfile</span> as this key's identifier.
294 See the <span class="option">keyfile</span> option (<span class="option">-k</span>) for more details.
297 <a name="sntp-broadcast"></a>Next: <a rel="next" accesskey="n" href="#sntp-concurrent">sntp concurrent</a>,
298 Previous: <a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
299 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
303 <h4 class="subsection">broadcast option (-b)</h4>
305 <p><a name="index-sntp_002dbroadcast-7"></a>
306 This is the “listen to the address specified for broadcast time sync” option.
307 This option takes a string argument <span class="file">broadcast-address</span>.
309 <p class="noindent">This option has some usage constraints. It:
311 <li>may appear an unlimited number of times.
314 <p>If specified <code>sntp</code> will listen to the specified address
315 for NTP broadcasts. The default maximum wait time
316 can (and probably should) be modified with <span class="option">-t</span>.
319 <a name="sntp-concurrent"></a>Next: <a rel="next" accesskey="n" href="#sntp-gap">sntp gap</a>,
320 Previous: <a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
321 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
325 <h4 class="subsection">concurrent option (-c)</h4>
327 <p><a name="index-sntp_002dconcurrent-8"></a>
328 This is the “concurrently query all ips returned for host-name” option.
329 This option takes a string argument <span class="file">host-name</span>.
331 <p class="noindent">This option has some usage constraints. It:
333 <li>may appear an unlimited number of times.
336 <p>Requests from an NTP "client" to a "server" should never be sent
337 more rapidly than one every 2 seconds. By default, any IPs returned
338 as part of a DNS lookup are assumed to be for a single instance of
339 <code>ntpd</code>, and therefore <code>sntp</code> will send queries to these IPs
340 one after another, with a 2-second gap in between each query.
342 <p>The <span class="option">-c</span> or <span class="option">--concurrent</span> flag says that any IPs
343 returned for the DNS lookup of the supplied host-name are on
344 different machines, so we can send concurrent queries.
347 <a name="sntp-gap"></a>Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
348 Previous: <a rel="previous" accesskey="p" href="#sntp-concurrent">sntp concurrent</a>,
349 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
353 <h4 class="subsection">gap option (-g)</h4>
355 <p><a name="index-sntp_002dgap-9"></a>
356 This is the “the gap (in milliseconds) between time requests” option.
357 This option takes a number argument <span class="file">milliseconds</span>.
358 Since we're only going to use the first valid response we get and
359 there is benefit to specifying a good number of servers to query,
360 separate the queries we send out by the specified number of
364 <a name="sntp-kod"></a>Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
365 Previous: <a rel="previous" accesskey="p" href="#sntp-gap">sntp gap</a>,
366 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
370 <h4 class="subsection">kod option (-K)</h4>
372 <p><a name="index-sntp_002dkod-10"></a>
373 This is the “kod history filename” option.
374 This option takes a file argument <span class="file">file-name</span>.
375 Specifies the filename to be used for the persistent history of KoD
376 responses received from servers. If the file does not exist, a
377 warning message will be displayed. The file will not be created.
380 <a name="sntp-keyfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
381 Previous: <a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
382 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
386 <h4 class="subsection">keyfile option (-k)</h4>
388 <p><a name="index-sntp_002dkeyfile-11"></a>
389 This is the “look in this file for the key specified with <span class="option">-a</span>” option.
390 This option takes a file argument <span class="file">file-name</span>.
391 This option specifies the keyfile.
392 <code>sntp</code> will search for the key specified with <span class="option">-a</span>
393 <span class="file">keyno</span> in this file. See <span class="command">ntp.keys(5)</span> for more
397 <a name="sntp-logfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-steplimit">sntp steplimit</a>,
398 Previous: <a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
399 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
403 <h4 class="subsection">logfile option (-l)</h4>
405 <p><a name="index-sntp_002dlogfile-12"></a>
406 This is the “log to specified logfile” option.
407 This option takes a file argument <span class="file">file-name</span>.
408 This option causes the client to write log messages to the specified
409 <span class="file">logfile</span>.
412 <a name="sntp-steplimit"></a>Next: <a rel="next" accesskey="n" href="#sntp-ntpversion">sntp ntpversion</a>,
413 Previous: <a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
414 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
418 <h4 class="subsection">steplimit option (-M)</h4>
420 <p><a name="index-sntp_002dsteplimit-13"></a>
421 This is the “adjustments less than <var>steplimit</var> msec will be slewed” option.
422 This option takes a number argument.
423 If the time adjustment is less than <span class="file">steplimit</span> milliseconds,
424 slew the amount using <span class="command">adjtime(2)</span>. Otherwise, step the
425 correction using <span class="command">settimeofday(2)</span>. The default value is 0,
426 which means all adjustments will be stepped. This is a feature, as
427 different situations demand different values.
430 <a name="sntp-ntpversion"></a>Next: <a rel="next" accesskey="n" href="#sntp-usereservedport">sntp usereservedport</a>,
431 Previous: <a rel="previous" accesskey="p" href="#sntp-steplimit">sntp steplimit</a>,
432 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
436 <h4 class="subsection">ntpversion option (-o)</h4>
438 <p><a name="index-sntp_002dntpversion-14"></a>
439 This is the “send <var>int</var> as our ntp protocol version” option.
440 This option takes a number argument.
441 When sending requests to a remote server, tell them we are running
442 NTP protocol version <span class="file">ntpversion</span> .
445 <a name="sntp-usereservedport"></a>Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
446 Previous: <a rel="previous" accesskey="p" href="#sntp-ntpversion">sntp ntpversion</a>,
447 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
451 <h4 class="subsection">usereservedport option (-r)</h4>
453 <p><a name="index-sntp_002dusereservedport-15"></a>
454 This is the “use the ntp reserved port (port 123)” option.
455 Use port 123, which is reserved for NTP, for our network
459 <a name="sntp-timeout"></a>Next: <a rel="next" accesskey="n" href="#sntp-wait">sntp wait</a>,
460 Previous: <a rel="previous" accesskey="p" href="#sntp-usereservedport">sntp usereservedport</a>,
461 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
465 <h4 class="subsection">timeout option (-t)</h4>
467 <p><a name="index-sntp_002dtimeout-16"></a>
468 This is the “the number of seconds to wait for responses” option.
469 This option takes a number argument <span class="file">seconds</span>.
470 When waiting for a reply, <code>sntp</code> will wait the number
471 of seconds specified before giving up. The default should be
472 more than enough for a unicast response. If <code>sntp</code> is
473 only waiting for a broadcast response a longer timeout is
477 <a name="sntp-wait"></a>Next: <a rel="next" accesskey="n" href="#sntp-config">sntp config</a>,
478 Previous: <a rel="previous" accesskey="p" href="#sntp-timeout">sntp timeout</a>,
479 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
483 <h4 class="subsection">wait option</h4>
485 <p><a name="index-sntp_002dwait-17"></a>
486 This is the “wait for pending replies (if not setting the time)” option.
488 <p class="noindent">This option has some usage constraints. It:
490 <li>can be disabled with –no-wait.
491 <li>It is enabled by default.
494 <p>If we are not setting the time, wait for all pending responses.
498 <a name="sntp-config"></a>Next: <a rel="next" accesskey="n" href="#sntp-exit-status">sntp exit status</a>,
499 Previous: <a rel="previous" accesskey="p" href="#sntp-wait">sntp wait</a>,
500 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
504 <h4 class="subsection">presetting/configuring sntp</h4>
506 <p>Any option that is not marked as <i>not presettable</i> may be preset by
507 loading values from configuration ("rc" or "ini") files, and values from environment variables named <code>SNTP</code> and <code>SNTP_<OPTION_NAME></code>. <code><OPTION_NAME></code> must be one of
508 the options listed above in upper case and segmented with underscores.
509 The <code>SNTP</code> variable will be tokenized and parsed like
510 the command line. The remaining variables are tested for existence and their
511 values are treated like option arguments.
513 <p class="noindent"><code>libopts</code> will search in 2 places for configuration files:
518 The environment variables <code>HOME</code>, and <code>PWD</code>
519 are expanded and replaced when <span class="file">sntp</span> runs.
520 For any of these that are plain files, they are simply processed.
521 For any that are directories, then a file named <span class="file">.ntprc</span> is searched for
522 within that directory and processed.
524 <p>Configuration files may be in a wide variety of formats.
525 The basic format is an option name followed by a value (argument) on the
526 same line. Values may be separated from the option name with a colon,
527 equal sign or simply white space. Values may be continued across multiple
528 lines by escaping the newline with a backslash.
530 <p>Multiple programs may also share the same initialization file.
531 Common options are collected at the top, followed by program specific
532 segments. The segments are separated by lines like:
533 <pre class="example"> [SNTP]
535 <p class="noindent">or by
536 <pre class="example"> <?program sntp>
538 <p class="noindent">Do not mix these styles within one configuration file.
540 <p>Compound values and carefully constructed string values may also be
541 specified using XML syntax:
542 <pre class="example"> <option-name>
543 <sub-opt>...&lt;...&gt;...</sub-opt>
546 <p class="noindent">yielding an <code>option-name.sub-opt</code> string value of
547 <pre class="example"> "...<...>..."
549 <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
550 hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
551 the associated name/value pair list (see: optionFindValue).
553 <p>The command line options relating to configuration and/or usage help are:
555 <h5 class="subsubheading">version (-)</h5>
557 <p>Print the program version to standard out, optionally with licensing
558 information, then exit 0. The optional argument specifies how much licensing
559 detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
560 Only the first letter of the argument is examined:
563 <dt><span class="samp">version</span><dd>Only print the version. This is the default.
564 <br><dt><span class="samp">copyright</span><dd>Name the copyright usage licensing terms.
565 <br><dt><span class="samp">verbose</span><dd>Print the full copyright usage licensing terms.
570 <a name="sntp-exit-status"></a>Next: <a rel="next" accesskey="n" href="#sntp-Usage">sntp Usage</a>,
571 Previous: <a rel="previous" accesskey="p" href="#sntp-config">sntp config</a>,
572 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
576 <h4 class="subsection">sntp exit status</h4>
578 <p>One of the following exit values will be returned:
580 <dt><span class="samp">0 (EXIT_SUCCESS)</span><dd>Successful program execution.
581 <br><dt><span class="samp">1 (EXIT_FAILURE)</span><dd>The operation failed or the command syntax was not valid.
582 <br><dt><span class="samp">66 (EX_NOINPUT)</span><dd>A specified configuration file could not be loaded.
583 <br><dt><span class="samp">70 (EX_SOFTWARE)</span><dd>libopts had an internal operational error. Please report
584 it to autogen-users@lists.sourceforge.net. Thank you.
588 <a name="sntp-Usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-Authors">sntp Authors</a>,
589 Previous: <a rel="previous" accesskey="p" href="#sntp-exit-status">sntp exit status</a>,
590 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
594 <h4 class="subsection">sntp Usage</h4>
598 <a name="sntp-Authors"></a>Previous: <a rel="previous" accesskey="p" href="#sntp-Usage">sntp Usage</a>,
599 Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
603 <h4 class="subsection">sntp Authors</h4>
611 <!-- node-name, next, previous, up -->
612 <h3 class="section">Usage</h3>
614 <p>The simplest use of this program is as an unprivileged command to
615 check the current time, offset, and error in the local clock.
618 <pre class="example"> sntp ntpserver.somewhere
620 <p>With suitable privilege, it can be run as a command or in a
621 <code>crom</code> job to reset the local clock from a reliable server, like
622 the <code>ntpdate</code> and <code>rdate</code> commands.
625 <pre class="example"> sntp -a ntpserver.somewhere