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.13">
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
; }
19 span
.sansserif
{ font-family:sans-serif
; font-weight:normal
; }
23 <h1 class=
"settitle">Sntp User's Manual
</h1>
27 Next:
<a rel=
"next" accesskey=
"n" href=
"#sntp-Description">sntp Description
</a>,
28 Previous:
<a rel=
"previous" accesskey=
"p" href=
"#dir">(dir)
</a>,
29 Up:
<a rel=
"up" accesskey=
"u" href=
"#dir">(dir)
</a>
33 <h2 class=
"unnumbered">Simple Network Time Protocol User Manual
</h2>
35 <p>This document describes the use of the NTP Project's
<code>sntp
</code> program,
36 that can be used to query a Network Time Protocol (NTP) server and
37 display the time offset of the system clock relative to the server
38 clock. Run as root, it can correct the system clock to this offset as
39 well. It can be run as an interactive command or from a cron job.
41 <p>This document applies to version
4.2.6 of
<code>sntp
</code>.
43 <p>The program implements the SNTP protocol as defined by the draft NTPv4
46 <div class=
"shortcontents">
47 <h2>Short Contents
</h2>
49 <a href=
"#Top">Simple Network Time Protocol User Manual
</a>
54 <li><a accesskey=
"1" href=
"#sntp-Description">sntp Description
</a>: Description
55 * sntp Invocation:: Invoking sntp
56 <li><a accesskey=
"2" href=
"#Usage">Usage
</a>: Usage
60 <a name=
"sntp-Description"></a>
62 Next:
<a rel=
"next" accesskey=
"n" href=
"#Usage">Usage
</a>,
63 Previous:
<a rel=
"previous" accesskey=
"p" href=
"#Top">Top
</a>,
64 Up:
<a rel=
"up" accesskey=
"u" href=
"#Top">Top
</a>
68 <!-- node-name, next, previous, up -->
69 <h3 class=
"section">Description
</h3>
71 <p>By default,
<code>sntp
</code> writes the local data and time (i.e., not UTC) to the
72 standard output in the format:
74 <pre class=
"example"> 1996 Oct
15 20:
17:
25.123 +
4.567 +/-
0.089 secs
76 <p>where the +
4.567 +/-
0.089 secs indicates the time offset and
77 error bound of the system clock relative to the server clock.
79 <!-- @include sntp-opts.texi -->
83 Previous:
<a rel=
"previous" accesskey=
"p" href=
"#sntp-Description">sntp Description
</a>,
84 Up:
<a rel=
"up" accesskey=
"u" href=
"#Top">Top
</a>
88 <!-- node-name, next, previous, up -->
89 <h3 class=
"section">Usage
</h3>
91 <p>The simplest use of this program is as an unprivileged command to
92 check the current time, offset, and error in the local clock.
95 <pre class=
"example"> sntp ntpserver.somewhere
97 <p>With suitable privilege, it can be run as a command or in a
98 <code>crom
</code> job to reset the local clock from a reliable server, like
99 the
<code>ntpdate
</code> and
<code>rdate
</code> commands.
102 <pre class=
"example"> sntp -a ntpserver.somewhere