19c2daa00SOllivier Robert<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 29c2daa00SOllivier Robert 39c2daa00SOllivier Robert<html> 49c2daa00SOllivier Robert 59c2daa00SOllivier Robert <head> 69c2daa00SOllivier Robert <meta name="generator" content="HTML Tidy, see www.w3.org"> 79c2daa00SOllivier Robert <title>PPS Clock Discipline</title> 89c2daa00SOllivier Robert <link href="../scripts/style.css" type="text/css" rel="stylesheet"> 99c2daa00SOllivier Robert </head> 109c2daa00SOllivier Robert 119c2daa00SOllivier Robert <body> 129c2daa00SOllivier Robert <h3>PPS Clock Discipline</h3> 139c2daa00SOllivier Robert <hr> 149c2daa00SOllivier Robert <h4>Synopsis</h4> 159c2daa00SOllivier Robert <p>Address: 127.127.22.<i>u</i><br> 169c2daa00SOllivier Robert Reference ID: <tt>PPS</tt><br> 179c2daa00SOllivier Robert Driver ID: <tt>PPS</tt><br> 189c2daa00SOllivier Robert Serial or Parallel Port: <tt>/dev/pps<i>u</i></tt><br> 199c2daa00SOllivier Robert Requires: PPSAPI interface</p> 209c2daa00SOllivier Robert <p>Note: This driver supersedes an older one of the same name. The older driver operated with several somewhat archaic signal interface devices, required intricate configuration and was poorly documented. This driver operates only with the PPSAPI interface proposed as an IETF standard. Note also that the <tt>pps</tt> configuration command has been obsoleted by this driver.</p> 219c2daa00SOllivier Robert <h4>Description</h4> 229c2daa00SOllivier Robert <p>This driver furnishes an interface for the pulse-per-second (PPS) signal produced by a cesium clock, radio clock or related equipment. It can be used to augment the serial timecode generated by a GPS receiver, for example. It can be used to remove accumulated jitter and re-time a secondary server when synchronized to a primary server over a congested, wide-area network and before redistributing the time to local clients. The driver includes extensive signal sanity checks and grooming algorithms. A range gate and frequency discriminator reject noise and signals with incorrect frequency. A multiple-stage median filter rejects jitter due to hardware interrupt and operating system latencies. A trimmed-mean algorithm determines the best time samples. With typical workstations and processing loads, the incidental jitter can be reduced to less than a microsecond.</p> 239c2daa00SOllivier Robert <p>While this driver can discipline the time and frequency relative to the PPS source, it cannot number the seconds. For this purpose a auxiliary source is required, ordinarily a radio clock operated as a primary reference (stratum 1) source; however, another NTP time server can be used as well. For this purpose, the auxiliary source should be specified as the prefer peer, as described in the <a href="../prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page.</p> 249c2daa00SOllivier Robert <p>The driver requires the PPSAPI interface<sup>1</sup>, which is a proposed IETF standard. The interface consists of the <tt>timepps.h</tt> header file and associated kernel support. Support for this interface is included in current versions of Solaris, FreeBSD and Linux and proprietary versions of Tru64 (Alpha) and SunOS. See the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page for further information.</p> 259c2daa00SOllivier Robert <p>The PPS source can be connected via a serial or parallel port, depending on the hardware and operating system. The port can be dedicated to the PPS source or shared with another device. A radio clock is usually connected via a serial port and the PPS source connected via a level converter to the data carrier detect (DCD) pin (DB-9 pin 1, DB-25 pin 8) of the same connector. In some systems where a parallel port and driver are available, the PPS signal can be connected directly to the ACK pin (pin 10) of the connector. Whether the PPS signal is connected via a dedicated port or shared with another device, the driver opens the device <tt>/dev/pps%d</tt>, where <tt>%d</tt> is the unit number. As with other drivers, links can be used to redirect the logical name to the actual physical device.</p> 269c2daa00SOllivier Robert <p>The driver normally operates like any other driver and uses the same mitigation algorithms and PLL/FLL clock discipline incorporated in the daemon. If kernel PLL/FLL support is available, the kernel PLL/FLL clock discipline can be used instead. The default behavior is not to use the kernel PPS clock discipline, even if present. This driver incorporates a good deal of signal processing to reduce jitter using the median filter and trimmed average algorithms in the driver interface. As the result, performance with minpoll and maxpoll configured at the minimum 4 (16s) is generally better than the kernel PPS clock discipline. However, fudge flag 3 can be used to enable this discipline if necessary.</p> 279c2daa00SOllivier Robert <p>Note that the PPS source is considered valid only if the auxiliary source is the prefer peer, is reachable and is selectable to discipline the system clock. By default the stratum assigned to the PPS source is automatically determined. If the auxiliary source is unreachable or inoperative, the stratum is set to 16. Otherwise it is set to the stratum specified by the <tt>fudge stratum</tt> command, if present, or the auxiliary source stratum if not present. Please note the temptation to masquerade as a primary server by forcing the stratum to zero is decidedly dangerous, as it invites timing loops.</p> 289c2daa00SOllivier Robert <h4>Fudge Factors</h4> 299c2daa00SOllivier Robert <dl> 309c2daa00SOllivier Robert <dt><tt>time1 <i>time</i></tt> 319c2daa00SOllivier Robert <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. <dt><tt>time2 <i>time</i></tt> 329c2daa00SOllivier Robert <dd>Not used by this driver. 339c2daa00SOllivier Robert <dt><tt>stratum <i>number</i></tt> 349c2daa00SOllivier Robert <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0. 359c2daa00SOllivier Robert <dt><tt>refid <i>string</i></tt> 369c2daa00SOllivier Robert <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>PPS</tt>. 379c2daa00SOllivier Robert <dt><tt>flag1 0 | 1</tt> 389c2daa00SOllivier Robert <dd>Not used by this driver. 399c2daa00SOllivier Robert <dt><tt>flag2 0 | 1</tt> 409c2daa00SOllivier Robert <dd>Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear. 419c2daa00SOllivier Robert <dt><tt>flag3 0 | 1</tt> 429c2daa00SOllivier Robert <dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable. 439c2daa00SOllivier Robert <dt><tt>flag4 0 | 1</tt> 449c2daa00SOllivier Robert <dd>Not used by this driver. 459c2daa00SOllivier Robert </dl> 469c2daa00SOllivier Robert <h4>Additional Information</h4> 479c2daa00SOllivier Robert <p><a href="../refclock.html">Reference Clock Drivers</a></p> 489c2daa00SOllivier Robert <p>Reference</p> 499c2daa00SOllivier Robert <ol> 509c2daa00SOllivier Robert <li>Mogul, J., D. Mills, J. Brittenson, J. Stone and U. Windl. Pulse-per-second API for Unix-like operating systems, version 1. Request for Comments RFC-2783, Internet Engineering Task Force, March 2000, 31 pp. 519c2daa00SOllivier Robert </ol> 529c2daa00SOllivier Robert <hr> 539c2daa00SOllivier Robert <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script> 549c2daa00SOllivier Robert </body> 559c2daa00SOllivier Robert 569c2daa00SOllivier Robert</html>