sntp.html revision 1.1.1.15 1 1.1.1.15 christos <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 1.1.1.15 christos <html>
3 1.1.1.15 christos <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
4 1.1 kardel <head>
5 1.1.1.15 christos <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 1.1.1.15 christos <title>Sntp User’s Manual</title>
7 1.1.1.15 christos
8 1.1.1.15 christos <meta name="description" content="Sntp User’s Manual">
9 1.1.1.15 christos <meta name="keywords" content="Sntp User’s Manual">
10 1.1.1.15 christos <meta name="resource-type" content="document">
11 1.1.1.15 christos <meta name="distribution" content="global">
12 1.1.1.15 christos <meta name="Generator" content="makeinfo">
13 1.1.1.15 christos <link href="#Top" rel="start" title="Top">
14 1.1.1.15 christos <link href="dir.html#Top" rel="up" title="(dir)">
15 1.1.1.15 christos <style type="text/css">
16 1.1.1.15 christos <!--
17 1.1.1.15 christos a.summary-letter {text-decoration: none}
18 1.1.1.15 christos blockquote.indentedblock {margin-right: 0em}
19 1.1.1.15 christos blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
20 1.1.1.15 christos blockquote.smallquotation {font-size: smaller}
21 1.1.1.15 christos div.display {margin-left: 3.2em}
22 1.1.1.15 christos div.example {margin-left: 3.2em}
23 1.1.1.15 christos div.lisp {margin-left: 3.2em}
24 1.1.1.15 christos div.smalldisplay {margin-left: 3.2em}
25 1.1.1.15 christos div.smallexample {margin-left: 3.2em}
26 1.1.1.15 christos div.smalllisp {margin-left: 3.2em}
27 1.1.1.15 christos kbd {font-style: oblique}
28 1.1.1.15 christos pre.display {font-family: inherit}
29 1.1.1.15 christos pre.format {font-family: inherit}
30 1.1.1.15 christos pre.menu-comment {font-family: serif}
31 1.1.1.15 christos pre.menu-preformatted {font-family: serif}
32 1.1.1.15 christos pre.smalldisplay {font-family: inherit; font-size: smaller}
33 1.1.1.15 christos pre.smallexample {font-size: smaller}
34 1.1.1.15 christos pre.smallformat {font-family: inherit; font-size: smaller}
35 1.1.1.15 christos pre.smalllisp {font-size: smaller}
36 1.1.1.15 christos span.nolinebreak {white-space: nowrap}
37 1.1.1.15 christos span.roman {font-family: initial; font-weight: normal}
38 1.1.1.15 christos span.sansserif {font-family: sans-serif; font-weight: normal}
39 1.1.1.15 christos ul.no-bullet {list-style: none}
40 1.1.1.15 christos -->
41 1.1.1.15 christos </style>
42 1.1.1.15 christos
43 1.1.1.15 christos
44 1.1 kardel </head>
45 1.1 kardel
46 1.1.1.15 christos <body lang="en">
47 1.1.1.15 christos <h1 class="settitle" align="center">Sntp User’s Manual</h1>
48 1.1.1.15 christos
49 1.1.1.15 christos
50 1.1.1.15 christos
51 1.1.1.15 christos
52 1.1 kardel
53 1.1.1.15 christos <a name="Top"></a>
54 1.1.1.15 christos <div class="header">
55 1.1.1.15 christos <p>
56 1.1.1.15 christos Next: <a href="#sntp-Description" accesskey="n" rel="next">sntp Description</a>, Previous: <a href="dir.html#Top" accesskey="p" rel="prev">(dir)</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> </p>
57 1.1.1.15 christos </div>
58 1.1.1.15 christos <a name="Simple-Network-Time-Protocol-User-Manual"></a>
59 1.1.1.15 christos <h1 class="top">Simple Network Time Protocol User Manual</h1>
60 1.1.1.15 christos
61 1.1.1.15 christos <p>This document describes the use of the NTP Project’s <code>sntp</code> program,
62 1.1 kardel that can be used to query a Network Time Protocol (NTP) server and
63 1.1 kardel display the time offset of the system clock relative to the server
64 1.1 kardel clock. Run as root, it can correct the system clock to this offset as
65 1.1 kardel well. It can be run as an interactive command or from a cron job.
66 1.1.1.15 christos </p>
67 1.1.1.15 christos <p>This document applies to version 4.2.8p14 of <code>sntp</code>.
68 1.1.1.15 christos </p>
69 1.1.1.15 christos <p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
70 1.1 kardel IETF specification.
71 1.1.1.15 christos </p>
72 1.1.1.15 christos <a name="SEC_Overview"></a>
73 1.1.1.15 christos <h2 class="shortcontents-heading">Short Table of Contents</h2>
74 1.1.1.15 christos
75 1.1.1.15 christos <div class="shortcontents">
76 1.1.1.15 christos <ul class="no-bullet">
77 1.1.1.15 christos <li><a name="stoc-Description" href="#toc-Description">1 Description</a></li>
78 1.1 kardel </ul>
79 1.1 kardel </div>
80 1.1 kardel
81 1.1 kardel
82 1.1.1.15 christos <table class="menu" border="0" cellspacing="0">
83 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-Description" accesskey="1">sntp Description</a>:</td><td> </td><td align="left" valign="top">Description
84 1.1.1.15 christos </td></tr>
85 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-Invocation" accesskey="2">sntp Invocation</a>:</td><td> </td><td align="left" valign="top">Invoking sntp
86 1.1.1.15 christos </td></tr>
87 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#Usage" accesskey="3">Usage</a>:</td><td> </td><td align="left" valign="top">Usage
88 1.1.1.15 christos </td></tr>
89 1.1.1.15 christos </table>
90 1.1.1.15 christos
91 1.1.1.15 christos <hr>
92 1.1.1.2 kardel <a name="sntp-Description"></a>
93 1.1.1.15 christos <div class="header">
94 1.1.1.15 christos <p>
95 1.1.1.15 christos Next: <a href="#sntp-Invocation" accesskey="n" rel="next">sntp Invocation</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> </p>
96 1.1 kardel </div>
97 1.1.1.15 christos <a name="Description"></a>
98 1.1.1.15 christos <h2 class="chapter">1 Description</h2>
99 1.1 kardel
100 1.1 kardel <p>By default, <code>sntp</code> writes the local data and time (i.e., not UTC) to the
101 1.1 kardel standard output in the format:
102 1.1.1.15 christos </p>
103 1.1.1.15 christos <div class="example">
104 1.1.1.15 christos <pre class="example">1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs
105 1.1.1.15 christos </pre></div>
106 1.1 kardel
107 1.1.1.15 christos <p>where
108 1.1.1.3 christos YYYY-MM-DD HH:MM:SS.SUBSEC is the local date and time,
109 1.1.1.3 christos (+0800) is the local timezone adjustment (so we would add 8 hours and 0 minutes to convert the reported local time to UTC),
110 1.1.1.3 christos and
111 1.1.1.3 christos the +4.567 +/- 0.089 secs indicates the time offset and
112 1.1 kardel error bound of the system clock relative to the server clock.
113 1.1.1.15 christos </p>
114 1.1.1.15 christos <table class="menu" border="0" cellspacing="0">
115 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-Invocation" accesskey="1">sntp Invocation</a>:</td><td> </td><td align="left" valign="top">
116 1.1.1.15 christos </td></tr>
117 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#Usage" accesskey="2">Usage</a>:</td><td> </td><td align="left" valign="top">
118 1.1.1.15 christos </td></tr>
119 1.1.1.15 christos </table>
120 1.1 kardel
121 1.1.1.15 christos <hr>
122 1.1.1.2 kardel <a name="sntp-Invocation"></a>
123 1.1.1.15 christos <div class="header">
124 1.1.1.15 christos <p>
125 1.1.1.15 christos Next: <a href="#Usage" accesskey="n" rel="next">Usage</a>, Previous: <a href="#sntp-Description" accesskey="p" rel="prev">sntp Description</a>, Up: <a href="#sntp-Description" accesskey="u" rel="up">sntp Description</a> </p>
126 1.1.1.2 kardel </div>
127 1.1.1.15 christos <a name="Invoking-sntp"></a>
128 1.1.1.15 christos <h3 class="section">1.1 Invoking sntp</h3>
129 1.1.1.15 christos <a name="index-sntp"></a>
130 1.1.1.15 christos <a name="index-standard-Simple-Network-Time-Protocol-client-program"></a>
131 1.1.1.2 kardel
132 1.1.1.2 kardel
133 1.1.1.3 christos
134 1.1.1.15 christos <p><code>sntp</code>
135 1.1.1.3 christos can be used as an SNTP client to query a NTP or SNTP server and either display
136 1.1.1.15 christos the time or set the local system’s time (given suitable privilege). It can be
137 1.1.1.3 christos run as an interactive command or from a
138 1.1.1.2 kardel <code>cron</code>
139 1.1.1.2 kardel job.
140 1.1.1.15 christos </p>
141 1.1.1.15 christos <p>NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
142 1.1.1.2 kardel are defined and described by RFC 5905.
143 1.1.1.15 christos </p>
144 1.1.1.2 kardel
145 1.1.1.15 christos <p>The default is to write the estimated correct local date and time (i.e. not
146 1.1.1.3 christos UTC) to the standard output in a format like:
147 1.1.1.15 christos </p>
148 1.1.1.15 christos <p><code>'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 [host] IP sN'</code>
149 1.1.1.15 christos </p>
150 1.1.1.15 christos <p>where the
151 1.1.1.3 christos <code>'(+0800)'</code>
152 1.1.1.3 christos means that to get to UTC from the reported local time one must
153 1.1.1.3 christos add 8 hours and 0 minutes,
154 1.1.1.3 christos the
155 1.1.1.3 christos <code>'+4.567'</code>
156 1.1.1.3 christos indicates the local clock is 4.567 seconds behind the correct time
157 1.1.1.15 christos (so 4.567 seconds must be added to the local clock to get it to be correct).
158 1.1.1.3 christos Note that the number of decimals printed for this value will change
159 1.1.1.15 christos based on the reported precision of the server.
160 1.1.1.3 christos <code>'+/- 0.089'</code>
161 1.1.1.3 christos is the reported
162 1.1.1.3 christos <em>synchronization</em> <em>distance</em>
163 1.1.1.15 christos (in seconds), which represents the maximum error due to all causes.
164 1.1.1.3 christos If the server does not report valid data needed to calculate the
165 1.1.1.3 christos synchronization distance, this will be reported as
166 1.1.1.15 christos <code>'+/- ?'</code>.
167 1.1.1.3 christos If the
168 1.1.1.3 christos <em>host</em>
169 1.1.1.3 christos is different from the
170 1.1.1.3 christos <em>IP</em>,
171 1.1.1.15 christos both will be displayed.
172 1.1.1.15 christos Otherwise, only the
173 1.1.1.3 christos <em>IP</em>
174 1.1.1.15 christos is displayed.
175 1.1.1.3 christos Finally, the
176 1.1.1.3 christos <em>stratum</em>
177 1.1.1.5 christos of the host is reported
178 1.1.1.5 christos and the leap indicator is decoded and displayed.
179 1.1.1.15 christos </p>
180 1.1.1.15 christos <p>This section was generated by <strong>AutoGen</strong>,
181 1.1.1.15 christos using the <code>agtexi-cmd</code> template and the option descriptions for the <code>sntp</code> program.
182 1.1.1.3 christos This software is released under the NTP license, <http://ntp.org/license>.
183 1.1.1.15 christos </p>
184 1.1.1.15 christos <table class="menu" border="0" cellspacing="0">
185 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-usage" accesskey="1">sntp usage</a>:</td><td> </td><td align="left" valign="top">sntp help/usage (<samp>--help</samp>)
186 1.1.1.15 christos </td></tr>
187 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-ipv4" accesskey="2">sntp ipv4</a>:</td><td> </td><td align="left" valign="top">ipv4 option (-4)
188 1.1.1.15 christos </td></tr>
189 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-ipv6" accesskey="3">sntp ipv6</a>:</td><td> </td><td align="left" valign="top">ipv6 option (-6)
190 1.1.1.15 christos </td></tr>
191 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-authentication" accesskey="4">sntp authentication</a>:</td><td> </td><td align="left" valign="top">authentication option (-a)
192 1.1.1.15 christos </td></tr>
193 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-broadcast" accesskey="5">sntp broadcast</a>:</td><td> </td><td align="left" valign="top">broadcast option (-b)
194 1.1.1.15 christos </td></tr>
195 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-concurrent" accesskey="6">sntp concurrent</a>:</td><td> </td><td align="left" valign="top">concurrent option (-c)
196 1.1.1.15 christos </td></tr>
197 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-gap" accesskey="7">sntp gap</a>:</td><td> </td><td align="left" valign="top">gap option (-g)
198 1.1.1.15 christos </td></tr>
199 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-kod" accesskey="8">sntp kod</a>:</td><td> </td><td align="left" valign="top">kod option (-K)
200 1.1.1.15 christos </td></tr>
201 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-keyfile" accesskey="9">sntp keyfile</a>:</td><td> </td><td align="left" valign="top">keyfile option (-k)
202 1.1.1.15 christos </td></tr>
203 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-logfile">sntp logfile</a>:</td><td> </td><td align="left" valign="top">logfile option (-l)
204 1.1.1.15 christos </td></tr>
205 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-steplimit">sntp steplimit</a>:</td><td> </td><td align="left" valign="top">steplimit option (-M)
206 1.1.1.15 christos </td></tr>
207 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-ntpversion">sntp ntpversion</a>:</td><td> </td><td align="left" valign="top">ntpversion option (-o)
208 1.1.1.15 christos </td></tr>
209 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-usereservedport">sntp usereservedport</a>:</td><td> </td><td align="left" valign="top">usereservedport option (-r)
210 1.1.1.15 christos </td></tr>
211 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-timeout">sntp timeout</a>:</td><td> </td><td align="left" valign="top">timeout option (-t)
212 1.1.1.15 christos </td></tr>
213 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-wait">sntp wait</a>:</td><td> </td><td align="left" valign="top">wait option
214 1.1.1.15 christos </td></tr>
215 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-config">sntp config</a>:</td><td> </td><td align="left" valign="top">presetting/configuring sntp
216 1.1.1.15 christos </td></tr>
217 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-exit-status">sntp exit status</a>:</td><td> </td><td align="left" valign="top">exit status
218 1.1.1.15 christos </td></tr>
219 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-Usage">sntp Usage</a>:</td><td> </td><td align="left" valign="top">Usage
220 1.1.1.15 christos </td></tr>
221 1.1.1.15 christos <tr><td align="left" valign="top">• <a href="#sntp-Authors">sntp Authors</a>:</td><td> </td><td align="left" valign="top">Authors
222 1.1.1.15 christos </td></tr>
223 1.1.1.15 christos </table>
224 1.1.1.15 christos
225 1.1.1.15 christos <hr>
226 1.1.1.15 christos <a name="sntp-usage"></a>
227 1.1.1.15 christos <div class="header">
228 1.1.1.15 christos <p>
229 1.1.1.15 christos Next: <a href="#sntp-ipv4" accesskey="n" rel="next">sntp ipv4</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
230 1.1.1.15 christos </div>
231 1.1.1.15 christos <a name="sntp-help_002fusage-_0028_002d_002dhelp_0029"></a>
232 1.1.1.15 christos <h4 class="subsection">1.1.1 sntp help/usage (<samp>--help</samp>)</h4>
233 1.1.1.15 christos <a name="index-sntp-help"></a>
234 1.1.1.15 christos
235 1.1.1.15 christos <p>This is the automatically generated usage text for sntp.
236 1.1.1.15 christos </p>
237 1.1.1.15 christos <p>The text printed is the same whether selected with the <code>help</code> option
238 1.1.1.15 christos (<samp>--help</samp>) or the <code>more-help</code> option (<samp>--more-help</samp>). <code>more-help</code> will print
239 1.1.1.15 christos the usage text by passing it through a pager program.
240 1.1.1.3 christos <code>more-help</code> is disabled on platforms without a working
241 1.1.1.3 christos <code>fork(2)</code> function. The <code>PAGER</code> environment variable is
242 1.1.1.15 christos used to select the program, defaulting to <samp>more</samp>. Both will exit
243 1.1.1.3 christos with a status code of 0.
244 1.1.1.15 christos </p>
245 1.1.1.15 christos <div class="example">
246 1.1.1.15 christos <pre class="example">sntp - standard Simple Network Time Protocol client program - Ver. 4.2.8p14
247 1.1.1.14 christos Usage: sntp [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \
248 1.1.1.2 kardel [ hostname-or-IP ...]
249 1.1.1.2 kardel Flg Arg Option-Name Description
250 1.1.1.2 kardel -4 no ipv4 Force IPv4 DNS name resolution
251 1.1.1.14 christos - prohibits the option 'ipv6'
252 1.1.1.2 kardel -6 no ipv6 Force IPv6 DNS name resolution
253 1.1.1.14 christos - prohibits the option 'ipv4'
254 1.1.1.14 christos -a Num authentication Enable authentication with the key auth-keynumber
255 1.1.1.3 christos -b Str broadcast Listen to the address specified for broadcast time sync
256 1.1.1.3 christos - may appear multiple times
257 1.1.1.3 christos -c Str concurrent Concurrently query all IPs returned for host-name
258 1.1.1.3 christos - may appear multiple times
259 1.1.1.3 christos -d no debug-level Increase debug verbosity level
260 1.1.1.3 christos - may appear multiple times
261 1.1.1.14 christos -D Num set-debug-level Set the debug verbosity level
262 1.1.1.3 christos - may appear multiple times
263 1.1.1.3 christos -g Num gap The gap (in milliseconds) between time requests
264 1.1.1.3 christos -K Fil kod KoD history filename
265 1.1.1.14 christos -k Fil keyfile Look in this file for the key specified with -a
266 1.1.1.3 christos -l Fil logfile Log to specified logfile
267 1.1.1.14 christos -M Num steplimit Adjustments less than steplimit msec will be slewed
268 1.1.1.14 christos - it must be in the range:
269 1.1.1.3 christos greater than or equal to 0
270 1.1.1.14 christos -o Num ntpversion Send int as our NTP protocol version
271 1.1.1.14 christos - it must be in the range:
272 1.1.1.3 christos 0 to 7
273 1.1.1.3 christos -r no usereservedport Use the NTP Reserved Port (port 123)
274 1.1.1.14 christos -S no step OK to 'step' the time with settimeofday(2)
275 1.1.1.14 christos -s no slew OK to 'slew' the time with adjtime(2)
276 1.1.1.14 christos -t Num timeout The number of seconds to wait for responses
277 1.1.1.3 christos no wait Wait for pending replies (if not setting the time)
278 1.1.1.14 christos - disabled as '--no-wait'
279 1.1.1.3 christos - enabled by default
280 1.1.1.14 christos opt version output version information and exit
281 1.1.1.14 christos -? no help display extended usage information and exit
282 1.1.1.14 christos -! no more-help extended usage information passed thru pager
283 1.1.1.14 christos -> opt save-opts save the option state to a config file
284 1.1.1.14 christos -< Str load-opts load options from a config file
285 1.1.1.14 christos - disabled as '--no-load-opts'
286 1.1.1.2 kardel - may appear multiple times
287 1.1.1.2 kardel
288 1.1.1.2 kardel Options are specified by doubled hyphens and their name or by a single
289 1.1.1.2 kardel hyphen and the flag character.
290 1.1.1.2 kardel
291 1.1.1.2 kardel
292 1.1.1.2 kardel The following option preset mechanisms are supported:
293 1.1.1.2 kardel - reading file $HOME/.ntprc
294 1.1.1.2 kardel - reading file ./.ntprc
295 1.1.1.2 kardel - examining environment variables named SNTP_*
296 1.1.1.2 kardel
297 1.1.1.14 christos Please send bug reports to: <http://bugs.ntp.org, bugs (a] ntp.org>
298 1.1.1.15 christos </pre></div>
299 1.1.1.2 kardel
300 1.1.1.15 christos <hr>
301 1.1.1.15 christos <a name="sntp-ipv4"></a>
302 1.1.1.15 christos <div class="header">
303 1.1.1.15 christos <p>
304 1.1.1.15 christos Next: <a href="#sntp-ipv6" accesskey="n" rel="next">sntp ipv6</a>, Previous: <a href="#sntp-usage" accesskey="p" rel="prev">sntp usage</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
305 1.1.1.15 christos </div>
306 1.1.1.15 christos <a name="ipv4-option-_0028_002d4_0029"></a>
307 1.1.1.15 christos <h4 class="subsection">1.1.2 ipv4 option (-4)</h4>
308 1.1.1.15 christos <a name="index-sntp_002dipv4"></a>
309 1.1.1.15 christos
310 1.1.1.15 christos <p>This is the “force ipv4 dns name resolution” option.
311 1.1.1.15 christos </p>
312 1.1.1.15 christos <p>This option has some usage constraints. It:
313 1.1.1.15 christos </p><ul>
314 1.1.1.15 christos <li> must not appear in combination with any of the following options:
315 1.1.1.15 christos ipv6.
316 1.1.1.15 christos </li></ul>
317 1.1.1.15 christos
318 1.1.1.15 christos <p>Force DNS resolution of the following host names on the command line
319 1.1.1.15 christos to the IPv4 namespace.
320 1.1.1.15 christos </p><hr>
321 1.1.1.15 christos <a name="sntp-ipv6"></a>
322 1.1.1.15 christos <div class="header">
323 1.1.1.15 christos <p>
324 1.1.1.15 christos Next: <a href="#sntp-authentication" accesskey="n" rel="next">sntp authentication</a>, Previous: <a href="#sntp-ipv4" accesskey="p" rel="prev">sntp ipv4</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
325 1.1.1.15 christos </div>
326 1.1.1.15 christos <a name="ipv6-option-_0028_002d6_0029"></a>
327 1.1.1.15 christos <h4 class="subsection">1.1.3 ipv6 option (-6)</h4>
328 1.1.1.15 christos <a name="index-sntp_002dipv6"></a>
329 1.1.1.15 christos
330 1.1.1.15 christos <p>This is the “force ipv6 dns name resolution” option.
331 1.1.1.15 christos </p>
332 1.1.1.15 christos <p>This option has some usage constraints. It:
333 1.1.1.15 christos </p><ul>
334 1.1.1.15 christos <li> must not appear in combination with any of the following options:
335 1.1.1.15 christos ipv4.
336 1.1.1.15 christos </li></ul>
337 1.1.1.15 christos
338 1.1.1.15 christos <p>Force DNS resolution of the following host names on the command line
339 1.1.1.15 christos to the IPv6 namespace.
340 1.1.1.15 christos </p><hr>
341 1.1.1.15 christos <a name="sntp-authentication"></a>
342 1.1.1.15 christos <div class="header">
343 1.1.1.15 christos <p>
344 1.1.1.15 christos Next: <a href="#sntp-broadcast" accesskey="n" rel="next">sntp broadcast</a>, Previous: <a href="#sntp-ipv6" accesskey="p" rel="prev">sntp ipv6</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
345 1.1.1.15 christos </div>
346 1.1.1.15 christos <a name="authentication-option-_0028_002da_0029"></a>
347 1.1.1.15 christos <h4 class="subsection">1.1.4 authentication option (-a)</h4>
348 1.1.1.15 christos <a name="index-sntp_002dauthentication"></a>
349 1.1.1.15 christos
350 1.1.1.15 christos <p>This is the “enable authentication with the key <var>auth-keynumber</var>” option.
351 1.1.1.15 christos This option takes a number argument <samp>auth-keynumber</samp>.
352 1.1.1.15 christos Enable authentication using the key specified in this option’s
353 1.1.1.15 christos argument. The argument of this option is the <samp>keyid</samp>, a
354 1.1.1.15 christos number specified in the <samp>keyfile</samp> as this key’s identifier.
355 1.1.1.15 christos See the <samp>keyfile</samp> option (<samp>-k</samp>) for more details.
356 1.1.1.15 christos </p><hr>
357 1.1.1.15 christos <a name="sntp-broadcast"></a>
358 1.1.1.15 christos <div class="header">
359 1.1.1.15 christos <p>
360 1.1.1.15 christos Next: <a href="#sntp-concurrent" accesskey="n" rel="next">sntp concurrent</a>, Previous: <a href="#sntp-authentication" accesskey="p" rel="prev">sntp authentication</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
361 1.1.1.15 christos </div>
362 1.1.1.15 christos <a name="broadcast-option-_0028_002db_0029"></a>
363 1.1.1.15 christos <h4 class="subsection">1.1.5 broadcast option (-b)</h4>
364 1.1.1.15 christos <a name="index-sntp_002dbroadcast"></a>
365 1.1.1.15 christos
366 1.1.1.15 christos <p>This is the “listen to the address specified for broadcast time sync” option.
367 1.1.1.15 christos This option takes a string argument <samp>broadcast-address</samp>.
368 1.1.1.15 christos </p>
369 1.1.1.15 christos <p>This option has some usage constraints. It:
370 1.1.1.15 christos </p><ul>
371 1.1.1.15 christos <li> may appear an unlimited number of times.
372 1.1.1.15 christos </li></ul>
373 1.1.1.2 kardel
374 1.1.1.15 christos <p>If specified <code>sntp</code> will listen to the specified address
375 1.1.1.3 christos for NTP broadcasts. The default maximum wait time
376 1.1.1.15 christos can (and probably should) be modified with <samp>-t</samp>.
377 1.1.1.15 christos </p><hr>
378 1.1.1.15 christos <a name="sntp-concurrent"></a>
379 1.1.1.15 christos <div class="header">
380 1.1.1.15 christos <p>
381 1.1.1.15 christos Next: <a href="#sntp-gap" accesskey="n" rel="next">sntp gap</a>, Previous: <a href="#sntp-broadcast" accesskey="p" rel="prev">sntp broadcast</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
382 1.1.1.15 christos </div>
383 1.1.1.15 christos <a name="concurrent-option-_0028_002dc_0029"></a>
384 1.1.1.15 christos <h4 class="subsection">1.1.6 concurrent option (-c)</h4>
385 1.1.1.15 christos <a name="index-sntp_002dconcurrent"></a>
386 1.1.1.15 christos
387 1.1.1.15 christos <p>This is the “concurrently query all ips returned for host-name” option.
388 1.1.1.15 christos This option takes a string argument <samp>host-name</samp>.
389 1.1.1.15 christos </p>
390 1.1.1.15 christos <p>This option has some usage constraints. It:
391 1.1.1.15 christos </p><ul>
392 1.1.1.15 christos <li> may appear an unlimited number of times.
393 1.1.1.15 christos </li></ul>
394 1.1.1.2 kardel
395 1.1.1.15 christos <p>Requests from an NTP "client" to a "server" should never be sent
396 1.1.1.3 christos more rapidly than one every 2 seconds. By default, any IPs returned
397 1.1.1.3 christos as part of a DNS lookup are assumed to be for a single instance of
398 1.1.1.3 christos <code>ntpd</code>, and therefore <code>sntp</code> will send queries to these IPs
399 1.1.1.3 christos one after another, with a 2-second gap in between each query.
400 1.1.1.15 christos </p>
401 1.1.1.15 christos <p>The <samp>-c</samp> or <samp>--concurrent</samp> flag says that any IPs
402 1.1.1.3 christos returned for the DNS lookup of the supplied host-name are on
403 1.1.1.15 christos different machines, so we can send concurrent queries.
404 1.1.1.15 christos </p><hr>
405 1.1.1.15 christos <a name="sntp-gap"></a>
406 1.1.1.15 christos <div class="header">
407 1.1.1.15 christos <p>
408 1.1.1.15 christos Next: <a href="#sntp-kod" accesskey="n" rel="next">sntp kod</a>, Previous: <a href="#sntp-concurrent" accesskey="p" rel="prev">sntp concurrent</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
409 1.1.1.15 christos </div>
410 1.1.1.15 christos <a name="gap-option-_0028_002dg_0029"></a>
411 1.1.1.15 christos <h4 class="subsection">1.1.7 gap option (-g)</h4>
412 1.1.1.15 christos <a name="index-sntp_002dgap"></a>
413 1.1.1.15 christos
414 1.1.1.15 christos <p>This is the “the gap (in milliseconds) between time requests” option.
415 1.1.1.15 christos This option takes a number argument <samp>milliseconds</samp>.
416 1.1.1.15 christos Since we’re only going to use the first valid response we get and
417 1.1.1.3 christos there is benefit to specifying a good number of servers to query,
418 1.1.1.3 christos separate the queries we send out by the specified number of
419 1.1.1.15 christos milliseconds.
420 1.1.1.15 christos </p><hr>
421 1.1.1.15 christos <a name="sntp-kod"></a>
422 1.1.1.15 christos <div class="header">
423 1.1.1.15 christos <p>
424 1.1.1.15 christos Next: <a href="#sntp-keyfile" accesskey="n" rel="next">sntp keyfile</a>, Previous: <a href="#sntp-gap" accesskey="p" rel="prev">sntp gap</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
425 1.1.1.15 christos </div>
426 1.1.1.15 christos <a name="kod-option-_0028_002dK_0029"></a>
427 1.1.1.15 christos <h4 class="subsection">1.1.8 kod option (-K)</h4>
428 1.1.1.15 christos <a name="index-sntp_002dkod"></a>
429 1.1.1.2 kardel
430 1.1.1.15 christos <p>This is the “kod history filename” option.
431 1.1.1.15 christos This option takes a file argument <samp>file-name</samp>.
432 1.1.1.3 christos Specifies the filename to be used for the persistent history of KoD
433 1.1.1.4 christos responses received from servers. If the file does not exist, a
434 1.1.1.15 christos warning message will be displayed. The file will not be created.
435 1.1.1.15 christos </p><hr>
436 1.1.1.15 christos <a name="sntp-keyfile"></a>
437 1.1.1.15 christos <div class="header">
438 1.1.1.15 christos <p>
439 1.1.1.15 christos Next: <a href="#sntp-logfile" accesskey="n" rel="next">sntp logfile</a>, Previous: <a href="#sntp-kod" accesskey="p" rel="prev">sntp kod</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
440 1.1.1.15 christos </div>
441 1.1.1.15 christos <a name="keyfile-option-_0028_002dk_0029"></a>
442 1.1.1.15 christos <h4 class="subsection">1.1.9 keyfile option (-k)</h4>
443 1.1.1.15 christos <a name="index-sntp_002dkeyfile"></a>
444 1.1.1.15 christos
445 1.1.1.15 christos <p>This is the “look in this file for the key specified with <samp>-a</samp>” option.
446 1.1.1.15 christos This option takes a file argument <samp>file-name</samp>.
447 1.1.1.15 christos This option specifies the keyfile.
448 1.1.1.15 christos <code>sntp</code> will search for the key specified with <samp>-a</samp>
449 1.1.1.15 christos <samp>keyno</samp> in this file. See <code>ntp.keys(5)</code> for more
450 1.1.1.15 christos information.
451 1.1.1.15 christos </p><hr>
452 1.1.1.15 christos <a name="sntp-logfile"></a>
453 1.1.1.15 christos <div class="header">
454 1.1.1.15 christos <p>
455 1.1.1.15 christos Next: <a href="#sntp-steplimit" accesskey="n" rel="next">sntp steplimit</a>, Previous: <a href="#sntp-keyfile" accesskey="p" rel="prev">sntp keyfile</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
456 1.1.1.15 christos </div>
457 1.1.1.15 christos <a name="logfile-option-_0028_002dl_0029"></a>
458 1.1.1.15 christos <h4 class="subsection">1.1.10 logfile option (-l)</h4>
459 1.1.1.15 christos <a name="index-sntp_002dlogfile"></a>
460 1.1.1.15 christos
461 1.1.1.15 christos <p>This is the “log to specified logfile” option.
462 1.1.1.15 christos This option takes a file argument <samp>file-name</samp>.
463 1.1.1.3 christos This option causes the client to write log messages to the specified
464 1.1.1.15 christos <samp>logfile</samp>.
465 1.1.1.15 christos </p><hr>
466 1.1.1.15 christos <a name="sntp-steplimit"></a>
467 1.1.1.15 christos <div class="header">
468 1.1.1.15 christos <p>
469 1.1.1.15 christos Next: <a href="#sntp-ntpversion" accesskey="n" rel="next">sntp ntpversion</a>, Previous: <a href="#sntp-logfile" accesskey="p" rel="prev">sntp logfile</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
470 1.1.1.15 christos </div>
471 1.1.1.15 christos <a name="steplimit-option-_0028_002dM_0029"></a>
472 1.1.1.15 christos <h4 class="subsection">1.1.11 steplimit option (-M)</h4>
473 1.1.1.15 christos <a name="index-sntp_002dsteplimit"></a>
474 1.1.1.15 christos
475 1.1.1.15 christos <p>This is the “adjustments less than <var>steplimit</var> msec will be slewed” option.
476 1.1.1.15 christos This option takes a number argument.
477 1.1.1.15 christos If the time adjustment is less than <samp>steplimit</samp> milliseconds,
478 1.1.1.15 christos slew the amount using <code>adjtime(2)</code>. Otherwise, step the
479 1.1.1.15 christos correction using <code>settimeofday(2)</code>. The default value is 0,
480 1.1.1.5 christos which means all adjustments will be stepped. This is a feature, as
481 1.1.1.15 christos different situations demand different values.
482 1.1.1.15 christos </p><hr>
483 1.1.1.15 christos <a name="sntp-ntpversion"></a>
484 1.1.1.15 christos <div class="header">
485 1.1.1.15 christos <p>
486 1.1.1.15 christos Next: <a href="#sntp-usereservedport" accesskey="n" rel="next">sntp usereservedport</a>, Previous: <a href="#sntp-steplimit" accesskey="p" rel="prev">sntp steplimit</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
487 1.1.1.15 christos </div>
488 1.1.1.15 christos <a name="ntpversion-option-_0028_002do_0029"></a>
489 1.1.1.15 christos <h4 class="subsection">1.1.12 ntpversion option (-o)</h4>
490 1.1.1.15 christos <a name="index-sntp_002dntpversion"></a>
491 1.1.1.2 kardel
492 1.1.1.15 christos <p>This is the “send <var>int</var> as our ntp protocol version” option.
493 1.1.1.15 christos This option takes a number argument.
494 1.1.1.3 christos When sending requests to a remote server, tell them we are running
495 1.1.1.15 christos NTP protocol version <samp>ntpversion</samp> .
496 1.1.1.15 christos </p><hr>
497 1.1.1.15 christos <a name="sntp-usereservedport"></a>
498 1.1.1.15 christos <div class="header">
499 1.1.1.15 christos <p>
500 1.1.1.15 christos Next: <a href="#sntp-timeout" accesskey="n" rel="next">sntp timeout</a>, Previous: <a href="#sntp-ntpversion" accesskey="p" rel="prev">sntp ntpversion</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
501 1.1.1.15 christos </div>
502 1.1.1.15 christos <a name="usereservedport-option-_0028_002dr_0029"></a>
503 1.1.1.15 christos <h4 class="subsection">1.1.13 usereservedport option (-r)</h4>
504 1.1.1.15 christos <a name="index-sntp_002dusereservedport"></a>
505 1.1.1.2 kardel
506 1.1.1.15 christos <p>This is the “use the ntp reserved port (port 123)” option.
507 1.1.1.3 christos Use port 123, which is reserved for NTP, for our network
508 1.1.1.15 christos communications.
509 1.1.1.15 christos </p><hr>
510 1.1.1.15 christos <a name="sntp-timeout"></a>
511 1.1.1.15 christos <div class="header">
512 1.1.1.15 christos <p>
513 1.1.1.15 christos Next: <a href="#sntp-wait" accesskey="n" rel="next">sntp wait</a>, Previous: <a href="#sntp-usereservedport" accesskey="p" rel="prev">sntp usereservedport</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
514 1.1.1.15 christos </div>
515 1.1.1.15 christos <a name="timeout-option-_0028_002dt_0029"></a>
516 1.1.1.15 christos <h4 class="subsection">1.1.14 timeout option (-t)</h4>
517 1.1.1.15 christos <a name="index-sntp_002dtimeout"></a>
518 1.1.1.3 christos
519 1.1.1.15 christos <p>This is the “the number of seconds to wait for responses” option.
520 1.1.1.15 christos This option takes a number argument <samp>seconds</samp>.
521 1.1.1.3 christos When waiting for a reply, <code>sntp</code> will wait the number
522 1.1.1.3 christos of seconds specified before giving up. The default should be
523 1.1.1.3 christos more than enough for a unicast response. If <code>sntp</code> is
524 1.1.1.3 christos only waiting for a broadcast response a longer timeout is
525 1.1.1.15 christos likely needed.
526 1.1.1.15 christos </p><hr>
527 1.1.1.15 christos <a name="sntp-wait"></a>
528 1.1.1.15 christos <div class="header">
529 1.1.1.15 christos <p>
530 1.1.1.15 christos Next: <a href="#sntp-config" accesskey="n" rel="next">sntp config</a>, Previous: <a href="#sntp-timeout" accesskey="p" rel="prev">sntp timeout</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
531 1.1.1.15 christos </div>
532 1.1.1.15 christos <a name="wait-option"></a>
533 1.1.1.15 christos <h4 class="subsection">1.1.15 wait option</h4>
534 1.1.1.15 christos <a name="index-sntp_002dwait"></a>
535 1.1.1.15 christos
536 1.1.1.15 christos <p>This is the “wait for pending replies (if not setting the time)” option.
537 1.1.1.15 christos </p>
538 1.1.1.15 christos <p>This option has some usage constraints. It:
539 1.1.1.15 christos </p><ul>
540 1.1.1.15 christos <li> can be disabled with –no-wait.
541 1.1.1.15 christos </li><li> It is enabled by default.
542 1.1.1.15 christos </li></ul>
543 1.1.1.15 christos
544 1.1.1.15 christos <p>If we are not setting the time, wait for all pending responses.
545 1.1.1.15 christos </p>
546 1.1.1.15 christos
547 1.1.1.15 christos <hr>
548 1.1.1.15 christos <a name="sntp-config"></a>
549 1.1.1.15 christos <div class="header">
550 1.1.1.15 christos <p>
551 1.1.1.15 christos Next: <a href="#sntp-exit-status" accesskey="n" rel="next">sntp exit status</a>, Previous: <a href="#sntp-wait" accesskey="p" rel="prev">sntp wait</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
552 1.1.1.2 kardel </div>
553 1.1.1.15 christos <a name="presetting_002fconfiguring-sntp"></a>
554 1.1.1.15 christos <h4 class="subsection">1.1.16 presetting/configuring sntp</h4>
555 1.1.1.2 kardel
556 1.1.1.3 christos <p>Any option that is not marked as <i>not presettable</i> may be preset by
557 1.1.1.15 christos 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
558 1.1.1.15 christos the options listed above in upper case and segmented with underscores.
559 1.1.1.3 christos The <code>SNTP</code> variable will be tokenized and parsed like
560 1.1.1.3 christos the command line. The remaining variables are tested for existence and their
561 1.1.1.3 christos values are treated like option arguments.
562 1.1.1.15 christos </p>
563 1.1.1.2 kardel
564 1.1.1.15 christos <p><code>libopts</code> will search in 2 places for configuration files:
565 1.1.1.15 christos </p><ul>
566 1.1.1.15 christos <li> $HOME
567 1.1.1.15 christos </li><li> $PWD
568 1.1.1.15 christos </li></ul>
569 1.1.1.15 christos <p>The environment variables <code>HOME</code>, and <code>PWD</code>
570 1.1.1.15 christos are expanded and replaced when <samp>sntp</samp> runs.
571 1.1.1.15 christos For any of these that are plain files, they are simply processed.
572 1.1.1.15 christos For any that are directories, then a file named <samp>.ntprc</samp> is searched for
573 1.1.1.3 christos within that directory and processed.
574 1.1.1.15 christos </p>
575 1.1.1.15 christos <p>Configuration files may be in a wide variety of formats.
576 1.1.1.3 christos The basic format is an option name followed by a value (argument) on the
577 1.1.1.3 christos same line. Values may be separated from the option name with a colon,
578 1.1.1.3 christos equal sign or simply white space. Values may be continued across multiple
579 1.1.1.3 christos lines by escaping the newline with a backslash.
580 1.1.1.15 christos </p>
581 1.1.1.15 christos <p>Multiple programs may also share the same initialization file.
582 1.1.1.3 christos Common options are collected at the top, followed by program specific
583 1.1.1.3 christos segments. The segments are separated by lines like:
584 1.1.1.15 christos </p><div class="example">
585 1.1.1.15 christos <pre class="example">[SNTP]
586 1.1.1.15 christos </pre></div>
587 1.1.1.15 christos <p>or by
588 1.1.1.15 christos </p><div class="example">
589 1.1.1.15 christos <pre class="example"><?program sntp>
590 1.1.1.15 christos </pre></div>
591 1.1.1.15 christos <p>Do not mix these styles within one configuration file.
592 1.1.1.15 christos </p>
593 1.1.1.15 christos <p>Compound values and carefully constructed string values may also be
594 1.1.1.3 christos specified using XML syntax:
595 1.1.1.15 christos </p><div class="example">
596 1.1.1.15 christos <pre class="example"><option-name>
597 1.1.1.15 christos <sub-opt>...&lt;...&gt;...</sub-opt>
598 1.1.1.15 christos </option-name>
599 1.1.1.15 christos </pre></div>
600 1.1.1.15 christos <p>yielding an <code>option-name.sub-opt</code> string value of
601 1.1.1.15 christos </p><div class="example">
602 1.1.1.15 christos <pre class="example">"...<...>..."
603 1.1.1.15 christos </pre></div>
604 1.1.1.15 christos <p><code>AutoOpts</code> does not track suboptions. You simply note that it is a
605 1.1.1.3 christos hierarchicly valued option. <code>AutoOpts</code> does provide a means for searching
606 1.1.1.3 christos the associated name/value pair list (see: optionFindValue).
607 1.1.1.15 christos </p>
608 1.1.1.15 christos <p>The command line options relating to configuration and/or usage help are:
609 1.1.1.15 christos </p>
610 1.1.1.15 christos <a name="version-_0028_002d_0029"></a>
611 1.1.1.15 christos <h4 class="subsubheading">version (-)</h4>
612 1.1.1.3 christos
613 1.1.1.3 christos <p>Print the program version to standard out, optionally with licensing
614 1.1.1.3 christos information, then exit 0. The optional argument specifies how much licensing
615 1.1.1.15 christos detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
616 1.1.1.3 christos Only the first letter of the argument is examined:
617 1.1.1.15 christos </p>
618 1.1.1.15 christos <dl compact="compact">
619 1.1.1.15 christos <dt>‘<samp>version</samp>’</dt>
620 1.1.1.15 christos <dd><p>Only print the version. This is the default.
621 1.1.1.15 christos </p></dd>
622 1.1.1.15 christos <dt>‘<samp>copyright</samp>’</dt>
623 1.1.1.15 christos <dd><p>Name the copyright usage licensing terms.
624 1.1.1.15 christos </p></dd>
625 1.1.1.15 christos <dt>‘<samp>verbose</samp>’</dt>
626 1.1.1.15 christos <dd><p>Print the full copyright usage licensing terms.
627 1.1.1.15 christos </p></dd>
628 1.1.1.3 christos </dl>
629 1.1.1.2 kardel
630 1.1.1.15 christos <hr>
631 1.1.1.15 christos <a name="sntp-exit-status"></a>
632 1.1.1.15 christos <div class="header">
633 1.1.1.15 christos <p>
634 1.1.1.15 christos Next: <a href="#sntp-Usage" accesskey="n" rel="next">sntp Usage</a>, Previous: <a href="#sntp-config" accesskey="p" rel="prev">sntp config</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
635 1.1.1.2 kardel </div>
636 1.1.1.15 christos <a name="sntp-exit-status-1"></a>
637 1.1.1.15 christos <h4 class="subsection">1.1.17 sntp exit status</h4>
638 1.1.1.3 christos
639 1.1.1.3 christos <p>One of the following exit values will be returned:
640 1.1.1.15 christos </p><dl compact="compact">
641 1.1.1.15 christos <dt>‘<samp>0 (EXIT_SUCCESS)</samp>’</dt>
642 1.1.1.15 christos <dd><p>Successful program execution.
643 1.1.1.15 christos </p></dd>
644 1.1.1.15 christos <dt>‘<samp>1 (EXIT_FAILURE)</samp>’</dt>
645 1.1.1.15 christos <dd><p>The operation failed or the command syntax was not valid.
646 1.1.1.15 christos </p></dd>
647 1.1.1.15 christos <dt>‘<samp>66 (EX_NOINPUT)</samp>’</dt>
648 1.1.1.15 christos <dd><p>A specified configuration file could not be loaded.
649 1.1.1.15 christos </p></dd>
650 1.1.1.15 christos <dt>‘<samp>70 (EX_SOFTWARE)</samp>’</dt>
651 1.1.1.15 christos <dd><p>libopts had an internal operational error. Please report
652 1.1.1.15 christos it to autogen-users (a] lists.sourceforge.net. Thank you.
653 1.1.1.15 christos </p></dd>
654 1.1.1.3 christos </dl>
655 1.1.1.15 christos <hr>
656 1.1.1.15 christos <a name="sntp-Usage"></a>
657 1.1.1.15 christos <div class="header">
658 1.1.1.15 christos <p>
659 1.1.1.15 christos Next: <a href="#sntp-Authors" accesskey="n" rel="next">sntp Authors</a>, Previous: <a href="#sntp-exit-status" accesskey="p" rel="prev">sntp exit status</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
660 1.1.1.15 christos </div>
661 1.1.1.15 christos <a name="sntp-Usage-1"></a>
662 1.1.1.15 christos <h4 class="subsection">1.1.18 sntp Usage</h4>
663 1.1.1.15 christos <hr>
664 1.1.1.15 christos <a name="sntp-Authors"></a>
665 1.1.1.15 christos <div class="header">
666 1.1.1.15 christos <p>
667 1.1.1.15 christos Previous: <a href="#sntp-Usage" accesskey="p" rel="prev">sntp Usage</a>, Up: <a href="#sntp-Invocation" accesskey="u" rel="up">sntp Invocation</a> </p>
668 1.1.1.3 christos </div>
669 1.1.1.15 christos <a name="sntp-Authors-1"></a>
670 1.1.1.15 christos <h4 class="subsection">1.1.19 sntp Authors</h4>
671 1.1.1.3 christos
672 1.1.1.15 christos <hr>
673 1.1.1.2 kardel <a name="Usage"></a>
674 1.1.1.15 christos <div class="header">
675 1.1.1.15 christos <p>
676 1.1.1.15 christos Previous: <a href="#sntp-Invocation" accesskey="p" rel="prev">sntp Invocation</a>, Up: <a href="#sntp-Description" accesskey="u" rel="up">sntp Description</a> </p>
677 1.1 kardel </div>
678 1.1.1.15 christos <a name="Usage-1"></a>
679 1.1.1.15 christos <h3 class="section">1.2 Usage</h3>
680 1.1 kardel
681 1.1 kardel <p>The simplest use of this program is as an unprivileged command to
682 1.1.1.15 christos check the current time, offset, and error in the local clock.
683 1.1 kardel For example:
684 1.1.1.15 christos </p>
685 1.1.1.15 christos <div class="example">
686 1.1.1.15 christos <pre class="example">sntp ntpserver.somewhere
687 1.1.1.15 christos </pre></div>
688 1.1 kardel
689 1.1.1.15 christos <p>With suitable privilege, it can be run as a command or in a
690 1.1 kardel <code>crom</code> job to reset the local clock from a reliable server, like
691 1.1.1.15 christos the <code>ntpdate</code> and <code>rdate</code> commands.
692 1.1 kardel For example:
693 1.1.1.15 christos </p>
694 1.1.1.15 christos <div class="example">
695 1.1.1.15 christos <pre class="example">sntp -a ntpserver.somewhere
696 1.1.1.15 christos </pre></div>
697 1.1.1.15 christos <hr>
698 1.1.1.15 christos
699 1.1 kardel
700 1.1 kardel
701 1.1.1.15 christos </body>
702 1.1.1.15 christos </html>
703