19c2daa00SOllivier Robert<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 29c2daa00SOllivier Robert<html> 39c2daa00SOllivier Robert<head> 4ea906c41SOllivier Robert<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> 59c2daa00SOllivier Robert<meta name="generator" content="HTML Tidy, see www.w3.org"> 62b15cb3dSCy Schubert<title>Reference Clock Commands and Options</title> 79c2daa00SOllivier Robert<link href="scripts/style.css" type="text/css" rel="stylesheet"> 89c2daa00SOllivier Robert</head> 99c2daa00SOllivier Robert<body> 102b15cb3dSCy Schubert<h3>Reference Clock Commands and Options</h3> 112b15cb3dSCy Schubert<img src="pic/stack1a.jpg" alt="gif" align="left">Master Time Facility at the <a href="http://www.eecis.udel.edu/%7emills/lab.html">UDel Internet Research Laboratory</a> 122b15cb3dSCy Schubert<p>Last update: 132d4e511cSCy Schubert <!-- #BeginDate format:En2m -->26-Sep-2019 06:34<!-- #EndDate --> 142b15cb3dSCy Schubert UTC</p> 159c2daa00SOllivier Robert<br clear="left"> 169c2daa00SOllivier Robert<h4>Related Links</h4> 172b15cb3dSCy Schubert<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script> 182b15cb3dSCy Schubert<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script> 192b15cb3dSCy Schubert<script type="text/javascript" language="javascript" src="scripts/clockopt.txt"></script> 209c2daa00SOllivier Robert<hr> 212b15cb3dSCy Schubert<h4 id="addrs">Reference Clock Adddresses</h4> 222b15cb3dSCy Schubert<p>Unless noted otherwise, further information about these ccommands is on the <a href="refclock.html">Reference Clock Support</a> page.</p><p>Reference clocks are identified by a syntactically correct but invalid IP address, in order to distinguish them from ordinary NTP peers. These addresses are of the form 127.127.<em>t</em>.<em>u</em>, where <em>t</em> is an integer denoting the clock type and <em>u</em> indicates the unit number in the range 0-3. While it may seem overkill, it is in fact sometimes useful to configure multiple reference clocks of the same type, in which case the unit numbers must be unique.</p> 232b15cb3dSCy Schubert<h4 id="cmd"> Commands and Options</h4> 249c2daa00SOllivier Robert<dl> 252b15cb3dSCy Schubert <dt id="server"><tt>server 127.127.<i>t.u</i> [prefer] [mode <i>int</i>] [minpoll <i>int</i>] [maxpoll <i>int</i>]</tt></dt> 269c2daa00SOllivier Robert <dd>This command can be used to configure reference clocks in special ways. The options are interpreted as follows: 279c2daa00SOllivier Robert <dl> 282b15cb3dSCy Schubert <dt><tt>prefer</tt></dt> 292b15cb3dSCy Schubert <dd>Marks the reference clock as preferred. All other things being equal, this host will be chosen for synchronization among a set of correctly operating hosts. See the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page for further information.</dd> 302b15cb3dSCy Schubert <dt><tt>mode <i>int</i></tt></dt> 312b15cb3dSCy Schubert <dd>Specifies a mode number which is interpreted in a device-specific fashion. For instance, it selects a dialing protocol in the ACTS driver and a device subtype in the <tt>parse</tt> drivers.</dd> 322b15cb3dSCy Schubert <dt><tt>minpoll <i>int</i></tt><br> 332b15cb3dSCy Schubert <tt>maxpoll <i>int</i></tt></dt> 342b15cb3dSCy Schubert <dd>These options specify the minimum and maximum polling interval for reference clock messages in log<sub>2</sub> seconds. For most directly connected reference clocks, both <tt>minpoll</tt> and <tt>maxpoll</tt> default to 6 (64 s). For modem reference clocks, <tt>minpoll</tt> is ordinarily set to 10 (about 17 m) and <tt>maxpoll</tt> to 15 (about 9 h). The allowable range is 4 (16 s) to 17 (36 h) inclusive.</dd> 359c2daa00SOllivier Robert </dl> 362b15cb3dSCy Schubert </dd> 372b15cb3dSCy Schubert <dt id="fudge"><tt>fudge 127.127.<i>t.u</i> [time1 <i>sec</i>] [time2 <i>sec</i>] 382b15cb3dSCy Schubert [stratum <i>int</i>] [refid <i>string</i>] [flag1 0|1] 392b15cb3dSCy Schubert [flag2 0|1] [flag3 0|1] [flag4 0|1]</tt></dt> 409c2daa00SOllivier Robert <dd>This command can be used to configure reference clocks in special ways. It must immediately follow the <tt>server</tt> command which configures the driver. Note that the same capability is possible at run time using the <tt><a href="ntpdc.html">ntpdc</a></tt> program. The options are interpreted as follows: 419c2daa00SOllivier Robert <dl> 422b15cb3dSCy Schubert <dt><tt>time1 <i>sec</i></tt></dt> 432b15cb3dSCy Schubert <dd>Specifies a constant to be added to the time offset produced by the driver, a fixed-point decimal number in seconds. This is used as a calibration constant to adjust the nominal time offset of a particular clock to agree with an external standard, such as a precision PPS signal. It also provides a way to correct a systematic error or bias due to serial port or operating system latencies, different cable lengths or receiver internal delay. The specified offset is in addition to the propagation delay provided by other means, such as internal DIPswitches. Where a calibration for an individual system and driver is available, an approximate correction is noted in the driver documentation pages.</dd> 442b15cb3dSCy Schubert <dd>Note: in order to facilitate calibration when more than one radio clock or PPS signal is supported, a special calibration feature is available. It takes the form of an argument to the <tt>enable</tt> command described in the <a href="miscopt.html">Miscellaneous Options</a> page and operates as described in the <a href="refclock.html">Reference Clock Support</a> page.</dd> 452b15cb3dSCy Schubert <dt><tt>time2 <i>secs</i></tt></dt> 462b15cb3dSCy Schubert <dd>Specifies a fixed-point decimal number in seconds, which is interpreted in a driver-dependent way. See the descriptions of specific drivers in the <a href="refclock.html">Reference Clock Support</a> page.</dd> 472b15cb3dSCy Schubert <dt><tt>stratum <i>int</i></tt></dt> 482b15cb3dSCy Schubert <dd>Specifies the stratum number assigned to the driver in the range 0 to 15, inclusive. This number overrides the default stratum number ordinarily assigned by the driver itself, usually zero.</dd> 492b15cb3dSCy Schubert <dt><tt>refid <i>string</i></tt></dt> 502b15cb3dSCy Schubert <dd>Specifies an ASCII string of from one to four characters which defines the reference identifier used by the driver. This string overrides the default identifier ordinarily assigned by the driver itself.</dd> 512b15cb3dSCy Schubert <dt><tt>flag1 flag2 flag3 flag4</tt></dt> 522b15cb3dSCy Schubert <dd>These four flags are used for customizing the clock driver. The interpretation of these values, and whether they are used at all, is a function of the particular driver. However, by convention <tt>flag4</tt> is used to enable recording monitoring data to the <tt>clockstats</tt> file configured with the <tt>filegen</tt> command. Additional information on the <tt>filegen</tt> command is on the <a href="monopt.html">Monitoring Options</a> page.</dd> 532d4e511cSCy Schubert <dt><tt>minjitter <i>secs</i></tt></dt> 542d4e511cSCy Schubert <dd>If the source has a jitter that cannot be sensibly estimated, because 552d4e511cSCy Schubert it is not statistic jitter, the source will be detected as falseticker 562d4e511cSCy Schubert sooner or later. This has been observed e.g. with the serial data of 572d4e511cSCy Schubert certain GPS receivers. Enforcing a minimal jitter value avoids a too 582d4e511cSCy Schubert low estimation, keeping the clock in the zoo while still detecting 592d4e511cSCy Schubert higher jitter. 602d4e511cSCy Schubert </dd><dd> Note: this changes the refclock samples and ends up in the 612d4e511cSCy Schubert clock dispersion, not the clock jitter, despite being called jitter. To 622d4e511cSCy Schubert see the modified values, check the NTP clock variable "filtdisp", not 632d4e511cSCy Schubert "jitter". 642d4e511cSCy Schubert </dd><dd>The falseticker problem can also be avoided by increasing <tt>tos 652d4e511cSCy Schubert mindist</tt>, which extends the intersection interval, but that affects 662d4e511cSCy Schubert the root dispersion and is intended for the case of multiple reference 672d4e511cSCy Schubert clocks with reliable jitter that do not intersect otherwise. 682d4e511cSCy Schubert </dd> 699c2daa00SOllivier Robert </dl> 702b15cb3dSCy Schubert </dd> 71*a466cc55SCy Schubert <dt id="device"><tt>device 127.127.<i>t.u</i> [timedata <i>devpath</i>] [ppsdata <i>devpath</i>]</tt></dt> 72*a466cc55SCy Schubert <dd> 73*a466cc55SCy Schubert This command can be used to specify the devices a reference 74*a466cc55SCy Schubert clocks should use. Every clock has a special hard-coded builtin 75*a466cc55SCy Schubert name to use, and while it is possible to make a symlink from the 76*a466cc55SCy Schubert expected name to the real device, doing so is not always 77*a466cc55SCy Schubert convenient. On some platforms or setups it is much easier to 78*a466cc55SCy Schubert specify the real device name in <i>ntpd</i>'s configuration file. 79*a466cc55SCy Schubert </dd><dd> 80*a466cc55SCy Schubert Note: It is <i>not</i> necessary to specify device names 81*a466cc55SCy Schubert in the configuration file; in such a case the builtin name will be 82*a466cc55SCy Schubert used. But once a device name is given, it will be used as 83*a466cc55SCy Schubert specified. There's no fallback in case of errors. 84*a466cc55SCy Schubert </dd><dd> 85*a466cc55SCy Schubert The arguments are: 86*a466cc55SCy Schubert <dl> 87*a466cc55SCy Schubert <dt><tt>timedata <i>devpath</i></tt></dt> 88*a466cc55SCy Schubert <dd> 89*a466cc55SCy Schubert Defines the device that provides the time code data stream; 90*a466cc55SCy Schubert for e.g. NMEA, <i>devpath</i> could be "<tt>/dev/ttyS7</tt>" on a 91*a466cc55SCy Schubert POSIX-like system or "<tt>\\.\COM4</tt>" for another widely used OS. 92*a466cc55SCy Schubert </dd> 93*a466cc55SCy Schubert <dt><tt>ppsdata <i>devpath</i></tt></dt> 94*a466cc55SCy Schubert <dd> 95*a466cc55SCy Schubert Defines the device that provides the PPS timing stream. By 96*a466cc55SCy Schubert default, the time data stream is expected to be able to 97*a466cc55SCy Schubert provide the PPS data, too. (Proper wiring and hardware 98*a466cc55SCy Schubert assumed, of course.) This is true for all OSes that implement 99*a466cc55SCy Schubert the PPS API as originally designed for BSD variants. 100*a466cc55SCy Schubert <p/> 101*a466cc55SCy Schubert But on some hardware the PPS signal cannot not delivered to 102*a466cc55SCy Schubert the UART that handles the serial data; instead it might 103*a466cc55SCy Schubert be routed to a GPIO pin, and that means that we need a 104*a466cc55SCy Schubert way to define the device where the PPS data can be acquired 105*a466cc55SCy Schubert from. The <tt>ppsdata</tt> definition provides support for such 106*a466cc55SCy Schubert use cases. 107*a466cc55SCy Schubert </dd> 108*a466cc55SCy Schubert </dl> 109*a466cc55SCy Schubert </dd> 1109c2daa00SOllivier Robert</dl> 1119c2daa00SOllivier Robert<hr> 1129c2daa00SOllivier Robert<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script> 1139c2daa00SOllivier Robert</body> 1149c2daa00SOllivier Robert</html> 115