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