sntp.html revision 1.1.1.2 1 1.1 kardel <html lang="en">
2 1.1 kardel <head>
3 1.1 kardel <title>Sntp User's Manual</title>
4 1.1 kardel <meta http-equiv="Content-Type" content="text/html">
5 1.1 kardel <meta name="description" content="Sntp User's Manual">
6 1.1.1.2 kardel <meta name="generator" content="makeinfo 4.7">
7 1.1 kardel <link title="Top" rel="top" href="#Top">
8 1.1 kardel <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
9 1.1 kardel <meta http-equiv="Content-Style-Type" content="text/css">
10 1.1 kardel <style type="text/css"><!--
11 1.1 kardel pre.display { font-family:inherit }
12 1.1 kardel pre.format { font-family:inherit }
13 1.1 kardel pre.smalldisplay { font-family:inherit; font-size:smaller }
14 1.1 kardel pre.smallformat { font-family:inherit; font-size:smaller }
15 1.1 kardel pre.smallexample { font-size:smaller }
16 1.1 kardel pre.smalllisp { font-size:smaller }
17 1.1.1.2 kardel span.sc { font-variant:small-caps }
18 1.1.1.2 kardel span.roman { font-family: serif; font-weight: normal; }
19 1.1 kardel --></style>
20 1.1 kardel </head>
21 1.1 kardel <body>
22 1.1 kardel <h1 class="settitle">Sntp User's Manual</h1>
23 1.1 kardel <div class="node">
24 1.1 kardel <p><hr>
25 1.1.1.2 kardel <a name="Top"></a>Next: <a rel="next" accesskey="n" href="#sntp-Description">sntp Description</a>,
26 1.1 kardel Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
27 1.1 kardel Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
28 1.1.1.2 kardel <br>
29 1.1 kardel </div>
30 1.1 kardel
31 1.1 kardel <h2 class="unnumbered">Simple Network Time Protocol User Manual</h2>
32 1.1 kardel
33 1.1 kardel <p>This document describes the use of the NTP Project's <code>sntp</code> program,
34 1.1 kardel that can be used to query a Network Time Protocol (NTP) server and
35 1.1 kardel display the time offset of the system clock relative to the server
36 1.1 kardel clock. Run as root, it can correct the system clock to this offset as
37 1.1 kardel well. It can be run as an interactive command or from a cron job.
38 1.1 kardel
39 1.1.1.2 kardel <p>This document applies to version 4.2.6p5 of <code>sntp</code>.
40 1.1 kardel
41 1.1.1.2 kardel <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
42 1.1 kardel IETF specification.
43 1.1 kardel
44 1.1 kardel <div class="shortcontents">
45 1.1 kardel <h2>Short Contents</h2>
46 1.1 kardel <ul>
47 1.1 kardel <a href="#Top">Simple Network Time Protocol User Manual</a>
48 1.1 kardel </ul>
49 1.1 kardel </div>
50 1.1 kardel
51 1.1 kardel <ul class="menu">
52 1.1 kardel <li><a accesskey="1" href="#sntp-Description">sntp Description</a>: Description
53 1.1.1.2 kardel <li><a accesskey="2" href="#sntp-Invocation">sntp Invocation</a>: Invoking sntp
54 1.1.1.2 kardel <li><a accesskey="3" href="#Usage">Usage</a>: Usage
55 1.1 kardel </ul>
56 1.1 kardel
57 1.1 kardel <div class="node">
58 1.1 kardel <p><hr>
59 1.1.1.2 kardel <a name="sntp-Description"></a>
60 1.1.1.2 kardel <br>
61 1.1 kardel </div>
62 1.1 kardel
63 1.1 kardel <!-- node-name, next, previous, up -->
64 1.1 kardel <h3 class="section">Description</h3>
65 1.1 kardel
66 1.1 kardel <p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
67 1.1 kardel standard output in the format:
68 1.1 kardel
69 1.1 kardel <pre class="example"> 1996 Oct 15 20:17:25.123 +4.567 +/- 0.089 secs
70 1.1 kardel </pre>
71 1.1 kardel <p>where the +4.567 +/- 0.089 secs indicates the time offset and
72 1.1 kardel error bound of the system clock relative to the server clock.
73 1.1 kardel
74 1.1 kardel <div class="node">
75 1.1 kardel <p><hr>
76 1.1.1.2 kardel <a name="sntp-Invocation"></a>
77 1.1.1.2 kardel <br>
78 1.1.1.2 kardel </div>
79 1.1.1.2 kardel
80 1.1.1.2 kardel <h3 class="section">Invoking sntp</h3>
81 1.1.1.2 kardel
82 1.1.1.2 kardel <p><a name="index-sntp-1"></a><a name="index-standard-Simple-Network-Time-Protocol-program-2"></a>
83 1.1.1.2 kardel <code>sntp</code>
84 1.1.1.2 kardel can be used as a SNTP client to query a NTP or SNTP server and either display
85 1.1.1.2 kardel the time or set the local system's time (given suitable privilege). It can be
86 1.1.1.2 kardel run as an interactive command or in a
87 1.1.1.2 kardel <code>cron</code>
88 1.1.1.2 kardel job.
89 1.1.1.2 kardel
90 1.1.1.2 kardel <p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
91 1.1.1.2 kardel are defined and described by RFC 5905.
92 1.1.1.2 kardel
93 1.1.1.2 kardel <p class="indent">The default is to write the estimated correct local date and time (i.e. not
94 1.1.1.2 kardel UTC) to the standard output in a format like
95 1.1.1.2 kardel <pre class="example"> 1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
96 1.1.1.2 kardel </pre>
97 1.1.1.2 kardel <p>where the
98 1.1.1.2 kardel <pre class="example"> +4.567 +/- 0.089 secs
99 1.1.1.2 kardel </pre>
100 1.1.1.2 kardel <p>indicates the local clock is 4.567 seconds behind the correct time
101 1.1.1.2 kardel (so 4.567 seconds must be added to the local clock to get it to be correct),
102 1.1.1.2 kardel and the (local) time of
103 1.1.1.2 kardel <code>1996-10-15 20:17:25.123</code>
104 1.1.1.2 kardel can be converted to UTC time by adding 8 hours and 0 minutes, and
105 1.1.1.2 kardel is believed to be correct to within
106 1.1.1.2 kardel <code>+/- 0.089</code>
107 1.1.1.2 kardel seconds.
108 1.1.1.2 kardel
109 1.1.1.2 kardel <p>This section was generated by <strong>AutoGen</strong>,
110 1.1.1.2 kardel the 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.
111 1.1.1.2 kardel
112 1.1.1.2 kardel <p>This software is released under a specialized copyright license.
113 1.1.1.2 kardel
114 1.1.1.2 kardel <ul class="menu">
115 1.1.1.2 kardel <li><a accesskey="1" href="#sntp-usage">sntp usage</a>: sntp usage help (-?)
116 1.1.1.2 kardel <li><a accesskey="2" href="#sntp-adjtime">sntp adjtime</a>: adjtime option (-j)
117 1.1.1.2 kardel <li><a accesskey="3" href="#sntp-authentication">sntp authentication</a>: authentication option (-a)
118 1.1.1.2 kardel <li><a accesskey="4" href="#sntp-broadcast">sntp broadcast</a>: broadcast option (-b)
119 1.1.1.2 kardel <li><a accesskey="5" href="#sntp-ipv4">sntp ipv4</a>: ipv4 option (-4)
120 1.1.1.2 kardel <li><a accesskey="6" href="#sntp-ipv6">sntp ipv6</a>: ipv6 option (-6)
121 1.1.1.2 kardel <li><a accesskey="7" href="#sntp-keyfile">sntp keyfile</a>: keyfile option (-k)
122 1.1.1.2 kardel <li><a accesskey="8" href="#sntp-kod">sntp kod</a>: kod option (-K)
123 1.1.1.2 kardel <li><a accesskey="9" href="#sntp-logfile">sntp logfile</a>: logfile option (-l)
124 1.1.1.2 kardel <li><a href="#sntp-normalverbose">sntp normalverbose</a>: normalverbose option (-d)
125 1.1.1.2 kardel <li><a href="#sntp-settod">sntp settod</a>: settod option (-s)
126 1.1.1.2 kardel <li><a href="#sntp-syslog">sntp syslog</a>: syslog option (-p)
127 1.1.1.2 kardel <li><a href="#sntp-timeout">sntp timeout</a>: timeout option (-t)
128 1.1.1.2 kardel </ul>
129 1.1.1.2 kardel
130 1.1.1.2 kardel <div class="node">
131 1.1.1.2 kardel <p><hr>
132 1.1.1.2 kardel <a name="sntp-usage"></a>Next: <a rel="next" accesskey="n" href="#sntp-adjtime">sntp adjtime</a>,
133 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
134 1.1.1.2 kardel <br>
135 1.1.1.2 kardel </div>
136 1.1.1.2 kardel
137 1.1.1.2 kardel <h4 class="subsection">sntp usage help (-?)</h4>
138 1.1.1.2 kardel
139 1.1.1.2 kardel <p><a name="index-sntp-usage-3"></a>
140 1.1.1.2 kardel This is the automatically generated usage text for sntp:
141 1.1.1.2 kardel
142 1.1.1.2 kardel <pre class="example">sntp - standard Simple Network Time Protocol program - Ver. 4.2.6p5
143 1.1.1.2 kardel USAGE: sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
144 1.1.1.2 kardel [ hostname-or-IP ...]
145 1.1.1.2 kardel Flg Arg Option-Name Description
146 1.1.1.2 kardel -4 no ipv4 Force IPv4 DNS name resolution
147 1.1.1.2 kardel - prohibits these options:
148 1.1.1.2 kardel ipv6
149 1.1.1.2 kardel -6 no ipv6 Force IPv6 DNS name resolution
150 1.1.1.2 kardel - prohibits these options:
151 1.1.1.2 kardel ipv4
152 1.1.1.2 kardel -d no normalverbose Normal verbose
153 1.1.1.2 kardel -K Str kod KoD history filename
154 1.1.1.2 kardel -p no syslog Logging with syslog
155 1.1.1.2 kardel - prohibits these options:
156 1.1.1.2 kardel logfile
157 1.1.1.2 kardel -l Str logfile Log to specified logfile
158 1.1.1.2 kardel - prohibits these options:
159 1.1.1.2 kardel syslog
160 1.1.1.2 kardel -s no settod Set (step) the time with settimeofday()
161 1.1.1.2 kardel - prohibits these options:
162 1.1.1.2 kardel adjtime
163 1.1.1.2 kardel -j no adjtime Set (slew) the time with adjtime()
164 1.1.1.2 kardel - prohibits these options:
165 1.1.1.2 kardel settod
166 1.1.1.2 kardel -b Str broadcast Use broadcasts to the address specified for synchronisation
167 1.1.1.2 kardel -t Num timeout Specify the number of seconds to wait for broadcasts
168 1.1.1.2 kardel -a Num authentication Enable authentication with the key auth-keynumber
169 1.1.1.2 kardel -k Str keyfile Specify a keyfile. SNTP will look in this file for the key specified with -a
170 1.1.1.2 kardel opt version Output version information and exit
171 1.1.1.2 kardel -? no help Display extended usage information and exit
172 1.1.1.2 kardel -! no more-help Extended usage information passed thru pager
173 1.1.1.2 kardel -> opt save-opts Save the option state to a config file
174 1.1.1.2 kardel -< Str load-opts Load options from a config file
175 1.1.1.2 kardel - disabled as --no-load-opts
176 1.1.1.2 kardel - may appear multiple times
177 1.1.1.2 kardel
178 1.1.1.2 kardel Options are specified by doubled hyphens and their name or by a single
179 1.1.1.2 kardel hyphen and the flag character.
180 1.1.1.2 kardel
181 1.1.1.2 kardel
182 1.1.1.2 kardel
183 1.1.1.2 kardel The following option preset mechanisms are supported:
184 1.1.1.2 kardel - reading file $HOME/.ntprc
185 1.1.1.2 kardel - reading file ./.ntprc
186 1.1.1.2 kardel - examining environment variables named SNTP_*
187 1.1.1.2 kardel
188 1.1.1.2 kardel sntp implements the Simple Network Time Protocol, and is used to query an
189 1.1.1.2 kardel NTP or SNTP server and either display the time or set the local system's
190 1.1.1.2 kardel time (given suitable privilege).
191 1.1.1.2 kardel
192 1.1.1.2 kardel It can be run interactively from the command line or as a cron job.
193 1.1.1.2 kardel
194 1.1.1.2 kardel NTP and SNTP are defined by RFC 5905, which obsoletes RFC 4330 and RFC
195 1.1.1.2 kardel 1305.
196 1.1.1.2 kardel
197 1.1.1.2 kardel please send bug reports to: http://bugs.ntp.org, bugs (a] ntp.org
198 1.1.1.2 kardel </pre>
199 1.1.1.2 kardel <div class="node">
200 1.1.1.2 kardel <p><hr>
201 1.1.1.2 kardel <a name="sntp-adjtime"></a>Next: <a rel="next" accesskey="n" href="#sntp-authentication">sntp authentication</a>,
202 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-usage">sntp usage</a>,
203 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
204 1.1.1.2 kardel <br>
205 1.1.1.2 kardel </div>
206 1.1.1.2 kardel
207 1.1.1.2 kardel <h4 class="subsection">adjtime option (-j)</h4>
208 1.1.1.2 kardel
209 1.1.1.2 kardel <p><a name="index-sntp_002dadjtime-4"></a>
210 1.1.1.2 kardel This is the “set (slew) the time with adjtime()” option.
211 1.1.1.2 kardel
212 1.1.1.2 kardel <p>This option has some usage constraints. It:
213 1.1.1.2 kardel <ul>
214 1.1.1.2 kardel <li>must not appear in combination with any of the following options:
215 1.1.1.2 kardel settod.
216 1.1.1.2 kardel </ul>
217 1.1.1.2 kardel
218 1.1.1.2 kardel <div class="node">
219 1.1.1.2 kardel <p><hr>
220 1.1.1.2 kardel <a name="sntp-authentication"></a>Next: <a rel="next" accesskey="n" href="#sntp-broadcast">sntp broadcast</a>,
221 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-adjtime">sntp adjtime</a>,
222 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
223 1.1.1.2 kardel <br>
224 1.1.1.2 kardel </div>
225 1.1.1.2 kardel
226 1.1.1.2 kardel <h4 class="subsection">authentication option (-a)</h4>
227 1.1.1.2 kardel
228 1.1.1.2 kardel <p><a name="index-sntp_002dauthentication-5"></a>
229 1.1.1.2 kardel This is the “enable authentication with the key auth-keynumber” option.
230 1.1.1.2 kardel This option enables authentication using the key specified in this option's argument.
231 1.1.1.2 kardel The argument of this option is the keyid, a number specified in the keyfile as this
232 1.1.1.2 kardel key's identifier. See the keyfile option (-k) for more details.
233 1.1.1.2 kardel
234 1.1.1.2 kardel <div class="node">
235 1.1.1.2 kardel <p><hr>
236 1.1.1.2 kardel <a name="sntp-broadcast"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv4">sntp ipv4</a>,
237 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-authentication">sntp authentication</a>,
238 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
239 1.1.1.2 kardel <br>
240 1.1.1.2 kardel </div>
241 1.1.1.2 kardel
242 1.1.1.2 kardel <h4 class="subsection">broadcast option (-b)</h4>
243 1.1.1.2 kardel
244 1.1.1.2 kardel <p><a name="index-sntp_002dbroadcast-6"></a>
245 1.1.1.2 kardel This is the “use broadcasts to the address specified for synchronisation” option.
246 1.1.1.2 kardel If specified SNTP will listen to the specified broadcast address
247 1.1.1.2 kardel for NTP broadcasts. The default maximum wait time,
248 1.1.1.2 kardel 68 seconds, can be modified with -t.
249 1.1.1.2 kardel
250 1.1.1.2 kardel <div class="node">
251 1.1.1.2 kardel <p><hr>
252 1.1.1.2 kardel <a name="sntp-ipv4"></a>Next: <a rel="next" accesskey="n" href="#sntp-ipv6">sntp ipv6</a>,
253 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-broadcast">sntp broadcast</a>,
254 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
255 1.1.1.2 kardel <br>
256 1.1.1.2 kardel </div>
257 1.1.1.2 kardel
258 1.1.1.2 kardel <h4 class="subsection">ipv4 option (-4)</h4>
259 1.1.1.2 kardel
260 1.1.1.2 kardel <p><a name="index-sntp_002dipv4-7"></a>
261 1.1.1.2 kardel This is the “force ipv4 dns name resolution” option.
262 1.1.1.2 kardel
263 1.1.1.2 kardel <p>This option has some usage constraints. It:
264 1.1.1.2 kardel <ul>
265 1.1.1.2 kardel <li>must not appear in combination with any of the following options:
266 1.1.1.2 kardel ipv6.
267 1.1.1.2 kardel </ul>
268 1.1.1.2 kardel
269 1.1.1.2 kardel <p>Force DNS resolution of the following host names on the command line
270 1.1.1.2 kardel to the IPv4 namespace.
271 1.1.1.2 kardel
272 1.1.1.2 kardel <div class="node">
273 1.1.1.2 kardel <p><hr>
274 1.1.1.2 kardel <a name="sntp-ipv6"></a>Next: <a rel="next" accesskey="n" href="#sntp-keyfile">sntp keyfile</a>,
275 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-ipv4">sntp ipv4</a>,
276 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
277 1.1.1.2 kardel <br>
278 1.1.1.2 kardel </div>
279 1.1 kardel
280 1.1.1.2 kardel <h4 class="subsection">ipv6 option (-6)</h4>
281 1.1.1.2 kardel
282 1.1.1.2 kardel <p><a name="index-sntp_002dipv6-8"></a>
283 1.1.1.2 kardel This is the “force ipv6 dns name resolution” option.
284 1.1.1.2 kardel
285 1.1.1.2 kardel <p>This option has some usage constraints. It:
286 1.1.1.2 kardel <ul>
287 1.1.1.2 kardel <li>must not appear in combination with any of the following options:
288 1.1.1.2 kardel ipv4.
289 1.1.1.2 kardel </ul>
290 1.1.1.2 kardel
291 1.1.1.2 kardel <p>Force DNS resolution of the following host names on the command line
292 1.1.1.2 kardel to the IPv6 namespace.
293 1.1.1.2 kardel
294 1.1.1.2 kardel <div class="node">
295 1.1.1.2 kardel <p><hr>
296 1.1.1.2 kardel <a name="sntp-keyfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-kod">sntp kod</a>,
297 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-ipv6">sntp ipv6</a>,
298 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
299 1.1.1.2 kardel <br>
300 1.1.1.2 kardel </div>
301 1.1.1.2 kardel
302 1.1.1.2 kardel <h4 class="subsection">keyfile option (-k)</h4>
303 1.1.1.2 kardel
304 1.1.1.2 kardel <p><a name="index-sntp_002dkeyfile-9"></a>
305 1.1.1.2 kardel This is the “specify a keyfile. sntp will look in this file for the key specified with -a” option.
306 1.1.1.2 kardel This option specifies the keyfile. SNTP will search for the key specified with -a keyno in this
307 1.1.1.2 kardel file. Key files follow the following format:
308 1.1.1.2 kardel
309 1.1.1.2 kardel <p>keyid keytype key
310 1.1.1.2 kardel
311 1.1.1.2 kardel <p>Where keyid is a number identifying this key
312 1.1.1.2 kardel keytype is one of the follow:
313 1.1.1.2 kardel S Key in 64 Bit hexadecimal number as specified in in the DES specification.
314 1.1.1.2 kardel N Key in 64 Bit hexadecimal number as specified in the NTP standard.
315 1.1.1.2 kardel A Key in a 1-to-8 character ASCII string.
316 1.1.1.2 kardel M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
317 1.1.1.2 kardel
318 1.1.1.2 kardel <p>For more information see ntp.keys(5).
319 1.1.1.2 kardel
320 1.1.1.2 kardel <div class="node">
321 1.1.1.2 kardel <p><hr>
322 1.1.1.2 kardel <a name="sntp-kod"></a>Next: <a rel="next" accesskey="n" href="#sntp-logfile">sntp logfile</a>,
323 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-keyfile">sntp keyfile</a>,
324 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
325 1.1.1.2 kardel <br>
326 1.1.1.2 kardel </div>
327 1.1.1.2 kardel
328 1.1.1.2 kardel <h4 class="subsection">kod option (-K)</h4>
329 1.1.1.2 kardel
330 1.1.1.2 kardel <p><a name="index-sntp_002dkod-10"></a>
331 1.1.1.2 kardel This is the “kod history filename” option.
332 1.1.1.2 kardel Specifies the filename to be used to persist the history of KoD
333 1.1.1.2 kardel responses received from servers. The default is
334 1.1.1.2 kardel /var/db/ntp-kod.
335 1.1.1.2 kardel
336 1.1.1.2 kardel <div class="node">
337 1.1.1.2 kardel <p><hr>
338 1.1.1.2 kardel <a name="sntp-logfile"></a>Next: <a rel="next" accesskey="n" href="#sntp-normalverbose">sntp normalverbose</a>,
339 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-kod">sntp kod</a>,
340 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
341 1.1.1.2 kardel <br>
342 1.1.1.2 kardel </div>
343 1.1.1.2 kardel
344 1.1.1.2 kardel <h4 class="subsection">logfile option (-l)</h4>
345 1.1.1.2 kardel
346 1.1.1.2 kardel <p><a name="index-sntp_002dlogfile-11"></a>
347 1.1.1.2 kardel This is the “log to specified logfile” option.
348 1.1.1.2 kardel
349 1.1.1.2 kardel <p>This option has some usage constraints. It:
350 1.1.1.2 kardel <ul>
351 1.1.1.2 kardel <li>must not appear in combination with any of the following options:
352 1.1.1.2 kardel syslog.
353 1.1.1.2 kardel </ul>
354 1.1.1.2 kardel
355 1.1.1.2 kardel <p>This option causes the client to write log messages to the specified
356 1.1.1.2 kardel logfile.
357 1.1.1.2 kardel
358 1.1.1.2 kardel <div class="node">
359 1.1.1.2 kardel <p><hr>
360 1.1.1.2 kardel <a name="sntp-normalverbose"></a>Next: <a rel="next" accesskey="n" href="#sntp-settod">sntp settod</a>,
361 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-logfile">sntp logfile</a>,
362 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
363 1.1.1.2 kardel <br>
364 1.1.1.2 kardel </div>
365 1.1.1.2 kardel
366 1.1.1.2 kardel <h4 class="subsection">normalverbose option (-d)</h4>
367 1.1.1.2 kardel
368 1.1.1.2 kardel <p><a name="index-sntp_002dnormalverbose-12"></a>
369 1.1.1.2 kardel This is the “normal verbose” option.
370 1.1.1.2 kardel Diagnostic messages for non-fatal errors and a limited amount of
371 1.1.1.2 kardel tracing should be written to standard error. Fatal ones always
372 1.1.1.2 kardel produce a diagnostic. This option should be set when there is a
373 1.1.1.2 kardel suspected problem with the server, network or the source.
374 1.1.1.2 kardel
375 1.1.1.2 kardel <div class="node">
376 1.1.1.2 kardel <p><hr>
377 1.1.1.2 kardel <a name="sntp-settod"></a>Next: <a rel="next" accesskey="n" href="#sntp-syslog">sntp syslog</a>,
378 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-normalverbose">sntp normalverbose</a>,
379 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
380 1.1.1.2 kardel <br>
381 1.1.1.2 kardel </div>
382 1.1.1.2 kardel
383 1.1.1.2 kardel <h4 class="subsection">settod option (-s)</h4>
384 1.1.1.2 kardel
385 1.1.1.2 kardel <p><a name="index-sntp_002dsettod-13"></a>
386 1.1.1.2 kardel This is the “set (step) the time with settimeofday()” option.
387 1.1.1.2 kardel
388 1.1.1.2 kardel <p>This option has some usage constraints. It:
389 1.1.1.2 kardel <ul>
390 1.1.1.2 kardel <li>must not appear in combination with any of the following options:
391 1.1.1.2 kardel adjtime.
392 1.1.1.2 kardel </ul>
393 1.1.1.2 kardel
394 1.1.1.2 kardel <div class="node">
395 1.1.1.2 kardel <p><hr>
396 1.1.1.2 kardel <a name="sntp-syslog"></a>Next: <a rel="next" accesskey="n" href="#sntp-timeout">sntp timeout</a>,
397 1.1.1.2 kardel Previous: <a rel="previous" accesskey="p" href="#sntp-settod">sntp settod</a>,
398 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
399 1.1.1.2 kardel <br>
400 1.1.1.2 kardel </div>
401 1.1.1.2 kardel
402 1.1.1.2 kardel <h4 class="subsection">syslog option (-p)</h4>
403 1.1.1.2 kardel
404 1.1.1.2 kardel <p><a name="index-sntp_002dsyslog-14"></a>
405 1.1.1.2 kardel This is the “logging with syslog” option.
406 1.1.1.2 kardel
407 1.1.1.2 kardel <p>This option has some usage constraints. It:
408 1.1.1.2 kardel <ul>
409 1.1.1.2 kardel <li>must not appear in combination with any of the following options:
410 1.1.1.2 kardel logfile.
411 1.1.1.2 kardel </ul>
412 1.1.1.2 kardel
413 1.1.1.2 kardel <p>When this option is set all logging will be done using syslog.
414 1.1.1.2 kardel
415 1.1.1.2 kardel <div class="node">
416 1.1.1.2 kardel <p><hr>
417 1.1.1.2 kardel <a name="sntp-timeout"></a>Previous: <a rel="previous" accesskey="p" href="#sntp-syslog">sntp syslog</a>,
418 1.1.1.2 kardel Up: <a rel="up" accesskey="u" href="#sntp-Invocation">sntp Invocation</a>
419 1.1.1.2 kardel <br>
420 1.1.1.2 kardel </div>
421 1.1.1.2 kardel
422 1.1.1.2 kardel <h4 class="subsection">timeout option (-t)</h4>
423 1.1.1.2 kardel
424 1.1.1.2 kardel <p><a name="index-sntp_002dtimeout-15"></a>
425 1.1.1.2 kardel This is the “specify the number of seconds to wait for broadcasts” option.
426 1.1.1.2 kardel When waiting for a broadcast packet SNTP will wait the number
427 1.1.1.2 kardel of seconds specified before giving up. Default 68 seconds.
428 1.1.1.2 kardel
429 1.1.1.2 kardel <div class="node">
430 1.1.1.2 kardel <p><hr>
431 1.1.1.2 kardel <a name="Usage"></a>
432 1.1.1.2 kardel <br>
433 1.1 kardel </div>
434 1.1 kardel
435 1.1 kardel <!-- node-name, next, previous, up -->
436 1.1 kardel <h3 class="section">Usage</h3>
437 1.1 kardel
438 1.1 kardel <p>The simplest use of this program is as an unprivileged command to
439 1.1 kardel check the current time, offset, and error in the local clock.
440 1.1 kardel For example:
441 1.1 kardel
442 1.1.1.2 kardel <pre class="example"> sntp ntpserver.somewhere
443 1.1 kardel </pre>
444 1.1 kardel <p>With suitable privilege, it can be run as a command or in a
445 1.1 kardel <code>crom</code> job to reset the local clock from a reliable server, like
446 1.1 kardel the <code>ntpdate</code> and <code>rdate</code> commands.
447 1.1 kardel For example:
448 1.1 kardel
449 1.1.1.2 kardel <pre class="example"> sntp -a ntpserver.somewhere
450 1.1 kardel </pre>
451 1.1 kardel </body></html>
452 1.1 kardel
453