<BODY BGCOLOR="#FFFFFF" LINK="#666699" ALINK="#FFFFFF">
-<TABLE WIDTH="623" BORDER="0" CELLSPACING="0" CELLPADDING="0">
+<TABLE WIDTH="623" BORDER="0">
<TR>
<TD COLSPAN="2" VALIGN="TOP" WIDTH="623">
<IMG BORDER="0" SRC="/images/homebuy.gif" WIDTH="149" HEIGHT="32" ALT="Home * Buy * My Sun(sm)" USEMAP="#lefttop"><IMG BORDER="0" SRC="/images/globalnavbar.gif" WIDTH="474" HEIGHT="32" ALT="sun.com Global Sections" USEMAP="#topnav"></TD>
<!-- TITLEBAR IMAGE: INSERT CUSTOMIZED TITLEBAR IMAGE BELOW -->
- <A HREF="http://www.sun.com/"><IMG BORDER="0" SRC="/images/sunlogo.gif" WIDTH="149" HEIGHT="72" ALT="Sun Microsystems"></A><IMG BORDER="0" SRC="/images/titlebar/doc.title.gif" WIDTH="474" HEIGHT="72"></TD>
+ <A HREF="http://www.sun.com/"><IMG BORDER="0" SRC="/images/sunlogo.gif" WIDTH="149" HEIGHT="72" ALT="Sun Microsystems"></A><IMG BORDER="0" SRC="/images/titlebar/doc.title.gif" alt="gif" WIDTH="474" HEIGHT="72"></TD>
</TR>
<!-- Begin Search Elements -->
<TR VALIGN="top">
<TD BGCOLOR="#666699">
- <TABLE BORDER="0" WIDTH="157" CELLSPACING="0" CELLPADDING="0">
+ <TABLE>
<TR>
<TD BGCOLOR="#666699" COLSPAN="2" WIDTH="157" VALIGN="TOP"><IMG BORDER="0" SRC="/images/search/contract/search1.gif" WIDTH="157" HEIGHT="16" ALT="Search SunSolve"></TD>
</TR>
<!-- End Search Elements -->
<!-- Begin User Personalization (Must limit to 10 Characters)-->
<TR>
- <TD COLSPAN="2"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="157"><TR><TD COLSPAN="3" ALIGN="right"><IMG SRC="/images/home_con/welcom_1.gif" ALT="" WIDTH="156" HEIGHT="4" BORDER="0"></TD></TR>
+ <TD COLSPAN="2"><TABLE><TR><TD COLSPAN="3" ALIGN="right"><IMG SRC="/images/home_con/welcom_1.gif" ALT="" WIDTH="156" HEIGHT="4" BORDER="0"></TD></TR>
<TR><TD BGCOLOR="#333366"><IMG SRC="/images/home_con/welcom_2.gif" ALT="" WIDTH="17" HEIGHT="19" BORDER="0"></TD><TD BGCOLOR="#333366" VALIGN="middle"><NOBR><FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" COLOR="#99CC33" SIZE="-2">sopko</FONT></NOBR></TD><TD BGCOLOR="#333366" ALIGN="right"><A HREF="edit-user-form.pl?viewmode=contractuser"><IMG SRC="/images/home_con/welcom_3.gif" ALT="Edit" WIDTH="45" HEIGHT="19" BORDER="0"></A></TD></TR>
</TABLE>
</TD>
<IMG BORDER="0" SRC="/images/nav/p3.gif" WIDTH="157" HEIGHT="19" ALT="Y2K Central"></A><BR>
<A HREF="show.pl?target=security/sec" onmouseover="window.status='Security Information'; return true" onmouseout="window.status=''; return true">
<IMG BORDER="0" SRC="/images/nav/p2.gif" WIDTH="157" HEIGHT="19" ALT="Security Information"></A><BR>
-<br><table cellpadding="0" cellspacing="0" border="0" width="157">
+<br><table width="157">
<tr><td width="8"> </td><td width="149">
-<table cellpadding="0" cellspacing="0" border="0">
+<table>
<BR><tr><td><BR><img src="/images/line.gif" alt="------" width="140" height="11" border="0"><br>
<A HREF="mark.pl"
onmouseover="window.status='Marked Docs.';return true"
-<table width=100% cellpadding=16 cellspacing=0 border=0>
+<table width=100%>
<tr>
<td width=100% valign=top>
<CENTER><FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" SIZE="2">
<option value="#SRDB-ID">SRDB ID</option>
<option value="#OS">OS</option>
</select></div></form>
-<table width=100% cellpadding=2 cellspacing=0 border=0>
+<table width=100%>
<tr bgcolor=#666699><td><font size=2 color=#ffffff><b>SRDB ID</b></font></td>
<td bgcolor=#ffffff><font size=2> </font></td>
<td><font size=2 color=#ffffff><b>Synopsis</b></font></td>
<td><font size=2><b>4 Sep 1999</b></font></td>
</tr>
</table><br clear>
-<table width=100% cellpadding=2 cellspacing=0 border=0><tr bgcolor=#999999>
+<table width=100%><tr bgcolor=#999999>
<td><font size=2 color=#ffffff><b><a name=Problem-Description>Problem Description</a></b></font></td>
<td align=right><b><a href="#top"><font size=2 color=#ffffff>Top</font></a></b></td></tr></table>
<pre>Ever since upgrading to Solaris 2.6, the system clock has been drifting and
file. The system either was previously working fine with the freeware
xntpd or the configuration was copied from another system that was
using the freeware version.
--- 23-Apr-99 08:22 US/Eastern --</pre><table width=100% cellpadding=2 cellspacing=0 border=0><tr bgcolor=#999999>
+-- 23-Apr-99 08:22 US/Eastern --</pre><table width=100%><tr bgcolor=#999999>
<td><font size=2 color=#ffffff><b><a name=Problem-Solution>Problem Solution</a></b></font></td>
<td align=right><b><a href="#top"><font size=2 color=#ffffff>Top</font></a></b></td></tr></table>
<pre>The common lore for setting up xntpd on Solaris using
defaulkt behavior, having exactly the opposite effect
as that intended.
-Do not set <font color=red>dosynctodr</font> to 0.</pre><table width=100% cellpadding=2 cellspacing=0 border=0>
+Do not set <font color=red>dosynctodr</font> to 0.</pre><table width=100%>
<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Product-Area>Product Area</a></b></font></td>
<td bgcolor=#cccccc valign=top width=75%><font size=2>Bundled Network</font></td></tr>
<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Product>Product</a></b></font></td>
</head>
<body>
- <h3>NIST Modem Time Service</h3>
+ <h3>Automated Computer Time Service (ACTS)</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.18.<i>u</i><br>
- Reference ID: <tt>NIST</tt><br>
- Driver ID: <tt>ACTS_NIST</tt><br>
- Serial Port: <tt>/dev/acts<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
- Features: <tt>tty_clk</tt><br>
+ Reference ID: <tt>NIST | USNO | PTB | WWVB</tt><br>
+ Driver ID: <tt>ACTS_MODEM</tt><br>Serial Port: <tt>/dev/acts<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt><br>
Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
<h4>Description</h4>
- <p>This driver supports the NIST Automated Computer Time Service (ACTS). It periodically dials a prespecified telephone number, receives the NIST timecode data and calculates the local clock correction. It designed primarily for use when neither a radio clock nor connectivity to Internet time servers is available. For the best accuracy, the individual telephone line/modem delay needs to be calibrated using outside sources.</p>
- <p>The ACTS is located at NIST Boulder, CO, telephone 303 494 4774. A toll call from Newark, DE, costs between three and four cents, although it is not clear what carrier and time of day discounts apply. The modem dial string will differ depending on local telephone configuration, etc., and is specified by the phone command in the configuration file. The argument to this command is an AT command for a Hayes compatible modem.</p>
- <p>The driver can operate in either of two modes, as determined by the mode parameter in the server configuration command. In mode 0 the driver operates continuously at intervals determined by the fudge time1 parameter, as described above. In mode 1 the driver is enabled only when no other sources of synchronization are available and when we have gone more than MAXOUTAGE (3600 s) since last synchronized by other sources of synchronization.</p>
- <p>The accuracy produced by this driver should be in the range of a millisecond or two, but may need correction due to the delay characteristics of the individual modem involved. For undetermined reasons, some modems work with the ACTS echo-delay measurement scheme and some don't. This driver tries to do the best it can with what it gets. Initial experiments with a Practical Peripherals 9600SA modem here in Delaware suggest an accuracy of a millisecond or two can be achieved without the scheme by using a fudge time1 value of 65.0 ms. In either case, the dispersion for a single call involving ten samples is about 1.3 ms.</p>
- <p>For reliable call management, this driver requires a 1200-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. Present restrictions require the use of a POSIX-compatible programming interface, although other interfaces may work as well. The ACTS telephone number and modem setup string are hard-coded in the driver and may require changes for nonstandard modems or special circumstances.</p>
- <p>The fudge time1 parameter represents a propagation-delay correction factor which is added to the value computed by ACTS when the echo-delay scheme is used. This scheme does not work with all modems; for those that don't, fudge flag2 should be set to disable the feature. In this case the fudge time1 parameter represents the total propagation delay due to all causes and must be determined by external calibration.</p>
- <p>The ACTS call interval is determined by a counter initially set to the fudge time2 parameter. At each poll interval, minpoll (usually 64 s) is subtracted from the counter. When the counter is equal to or less than zero, the fudge flag1 is set, which causes up to three call attempts to be made to ACTS. The fudge flag1 is reset after a valid clock update has been determined or by a device fault, timeout or manually using <tt>ntpdc</tt>. After a valid clock update, the counter is reset for the next interval. Setting the <tt>fudge time2</tt> parameter to zero disables automatic call attempts. Manual call attempts can be made at any time by setting <tt>fudgeflag1</tt> using ntpdc.</p>
- <p>The NIST timecode message is transmitted at 1200 bps in the following format:</p>
- <pre>
-jjjjj yy-mm-dd hh:mm:ss tt l uuu mmmmm UTC(NIST) *
-
-jjjjj = modified Julian day
-yy-mm-dd = year, month, day
-hh:mm:ss = hours, minutes, seconds
-tt = DST indicator (see driver listing)
-l = leap-second warning (see driver listing)
-uuu = DUT1 correction (see driver listing)
-mmmmm = modem calibration (see driver listing)
-on-time = '*'</pre>
- <p>The timecode message is transmitted continuously after a signon banner, which this driver ignores. The driver also ignores all but the yy-mm-dd, hh:mm:ss and on-time character '*' fields, although it checks the format of all fields of the message. A timestamp is captured at the '*' character, as required by the ACTS specification, and used as the reference time of the timecode. If a message with an on-time character of '#' is received, the driver updates the propagation delay. The driver disconnects when (a) ten valid messages have been received, (b) no message has been received for 15 s, (c) an on-time character of '#' is received. These messages are processed by a trimmed-mean filter to reduce timing noise and then by the usual NTP algorithms to develop the clock correction.</p>
- <p>Since the accumulated error grows with the interval between calls, it is important that the intrinsic frequency error be minimized. This can be done by observing difference in offsets between two calls placed some hours apart and calculating the uncorrected frequency error. This error, as a fixed-point value in parts-per-million, should be installed in the ntp.drift file before the daemon is started. Some experimentation may be necessary in order to reduce the intrinsic frequency error to the order of 1 ppm.</p>
- <p>The behavior of the clock selection algorithm is modified when this driver is in use. The algorithm is designed so that this driver will never be selected unless no other discipline source is available. This can be overridden with the prefer keyword of the server configuration command, in which case only this driver will be selected for synchronization and all other discipline sources will be ignored.</p>
- <p>Unlike other drivers, each ACTS call generates one clock correction and that correction is processed immediately. There is no wait to allow the clock filter to accumulate samples. In addition, the watchdog timeout of the local clock algorithm is disabled, so that a correction received from this driver that exceeds CLOCK_MAX (128 ms) causes an immediate step/slew.</p>
- <p>Since the interval between updates can be much longer than used with ordinary NTP peers, the local clock procedure has been modified to operate in either of two modes, depending on whether the interval between updates is less than or greater than CLOCK_MAXSEC (1200 s). If less than this value, the local clock procedure operates using the standard NTP phase-lock loop as with other NTP peers. If greater than this value, the procedure operates using a modified frequency-lock loop suggested by Judah Levine in his lockclock algorithm designed specifically for ACTS.</p>
- <h4>Call Management</h4>
- <p>Since ACTS will be a toll call in most areas of the country, it is necessary to carefully manage the call frequency. This can be done in two ways, by specifying the interval between calls, or by setting a flag bit manually or via a cron job. The call interval is determined by a counter initially set to the fudge time2 parameter. At each poll interval, minpoll (usually 64 s) is subtracted from the counter. When the counter is equal to or less than zero, the fudge flag1 is set, which causes up to three call attempts to be made. The fudge flag1 is reset after ten offset samples have been determined in a single call or by a device fault, timeout or manually using ntpdc. Upon successful completion of a call, the eight samples have been shifted into the clock filter, the local clock updated and the counter reset for the next interval. Setting the fudge time2 parameter to zero disables automatic call attempts.</p>
- <p>Manual call attempts can be made at any time by setting fudge flag1 using ntpdc. For example, the ntpdc command</p>
- <pre>
-fudge 127.127.18.1 flags 1</pre>
- <p>will ask for a key identifier and password and, if authenticated by the server, will set flag1. There may be a short delay until the expiration of the current poll timeout.</p>
- <p>The flag1 can be set from a cron job in the following way. Construct a file with contents</p>
- <pre>keyid 11
-passwd dialup
-fudge 127.127.18.1 flags 1
-quit</pre>
- <p>Then, run the following program at specified times as required.</p>
- <pre>/usr/local/bin/ntpdc <file</pre>
- <h4>Monitor Data</h4>
- <p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+ <p>This driver supports the US (NIST and USNO) and European (PTB (Germany), NPL (UK), etc.) modem time services, as well as Spectracom GPS and WWVB receivers connected via a modem. The driver periodically dials a number from a telephone list, receives the timecode data and calculates the local clock correction. It is designed primarily for backup when neither a radio clock nor connectivity to Internet time servers are available.</p>
+ <p>For best results the indicated time must be corrected for the modem and telephone circuit propagation delay, which can be 200 ms or more. For the NIST service, corrections are determined automatically by measuring the roundtrip delay of echoed characters. With this service the absolute accuracy is typically a millisecond or two. Corrections for the other services must be determined by other means. With these services variations from call to call and between messages during a call are typically a rew milliseconds, occasionally higher.</p>
+ <p>This driver requires a 9600-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. The actual line speed ranges from 1200 bps with USNO to 14,400 bps with NIST. The modem setup string is hard-coded in the driver and may require changes for nonstandard modems or special circumstances.</p>
+ <p>There are three modes of operation selected by the <tt>mode</tt> keyword in the <tt>server</tt> configuration command. In manual mode (2) the calling program is initiated by setting fudge <tt>flag1</tt>. This can be done using <tt>ntpdc</tt>, either manually or via a cron job. In auto mode (0) <tt>flag1</tt> is set automatically at each poll event. In backup mode (1) <tt>flag1</tt> is set automatically at each poll event, but only if the prefer peer is unreachable. </p>
+ <p>When <tt>flag1</tt> is set, the calling program dials each number listed in the <tt>phones</tt> command of the configuration file in turn. The number is specified by the Hayes ATDT prefix followed by the number itself, including the prefix and long-distance digits and delay code, if necessary. The <tt>flag1</tt> is reset and the calling program terminated if (a) valid clock update has been determined, (b) no more numbers remain in the list, (c) a device fault or timeout occurs or (d) fudge <tt>flag1</tt> is reset manually using <tt>ntpdc</tt>.</p>
+ <p>The driver is transparent to the message format of each modem time service and Spectracom radio. It selects the parsing algorithm depending on the message length. There is some hazard should the message be corrupted. However, the data format is checked carefully and only if all checks succeed is the message accepted. Corrupted lines are discarded without complaint. Once the service is known, the reference identifier for the driver is set to NIST, USNO, PTB or WWVB as appropriate.</p>
+ <p>Ordinarily, the serial port is connected to a modem; however, if fudge <tt>flag3</tt> is set, it can be connected directly to a device or another computer for testing or calibration. In principle, fudge <tt>flag2</tt> enables port locking, allowing the modem to be shared when not in use by this driver. At least on Solaris with the current NTP I/O routines, this results in lots of ugly error messages.</p>
+ <p>The <tt>minpoll</tt> and <tt>maxpoll</tt> keywords of the server configuration command can be used to limit the intervals between calls. Ordinarily, the poll interval follows the system poll interval, but not less than the minpoll specification. should ramp up over time to over a day.</p>
+ <p>The behavior of the clock selection algorithm is modified when this driver is in use. The algorithm is designed so that this driver will be selected only when the prefer peer is unreachable or unspecified. This can be overridden by assigning this driver as the prefer peer, in which case only this driver will be selected for synchronization and all other discipline sources will be ignored.</p>
+ <h4>US Phone Numbers and Formats</h4>
+ <p>Note: Phone numbers include the entire Hayes modem command, including the <tt>ATDT</tt> and other control codes as may be necessary. For most cases only the <tt>ATDT</tt> may be necessary.</p>
+ <p><a href=http://www.boulder.nist.gov/timefreq>National Institute of Science and Technology (NIST)</a></p>
+ <p>Phone: (303) 494-4774 (Boulder, CO); (808) 335-4721 (Hawaii)
+ </p>
+ <p><a href=http://www.boulder.nist.gov/timefreq/service/acts.htm>Data Format</a></p>
+ <p><tt>National Institute of Standards and Technology<br>
+ Telephone Time Service, Generator 3B<br>
+ Enter question mark "?" for HELP<br>MJD YR MO DA H M S ST S UT1 msADV <OTM><br>47999 90-04-18 21:39:15 50 0 +.1 045.0 UTC(NIST) *<br>
+ 47999 90-04-18 21:39:16 50 0 +.1 045.0 UTC(NIST) #<br>
+ ...</tt></p>
+ <p><tt>MJD</tt>, <tt>YR</tt>, <tt>ST</tt>, <tt>UT1</tt> and <tt>UTC(NIST)</tt> are not used by this driver. The <tt><OTM></tt> on-time character "<tt>*</tt>" changes to "<tt>#</tt>" when the delay correction is valid.</p>
+ <p><a href=http://tycho.usno.navy.mil>US Naval Observatory (USNO)</a></p>
+ <p>Phone: (202) 762-1594 (Washington, DC); (719) 567-6742 (Boulder, CO)
+ </p>
+ <p><a href=http://tycho.usno.navy.mil/modem_time.html>Data Format</a> (two lines, repeating at one-second intervals)</p>
+ <p><tt>jjjjj nnn hhmmss UTC</tt></p>
+ <p>* on-time character<br>
+ jjjjj modified Julian day number (not used)<br>
+ nnn day of year<br>
+ hhmmss second of day
+ </p>
+ <p><a href=tf582_4.html>European Phone Numbers and Formats</a></p>
+ <p><a href=http://www.spectracomcorp.com>Spectracom GPS and WWVB Receivers</a></p>
+ <p>If a modem is connected to a Spectracom receiver, this driver will call it and retrieve the time in one of two formats, 0 and 2. Ordinarily, the receiver requires a <tt>T</tt> in order to return the timecode. As this driver does not send data via the modem, it must either be configured in continuous mode or be polled by another local driver.</p>
+ <h4>Monitor Data</h4>
+ <p>Every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
- <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>NIST</tt>.
+ <dd>Set by the driver to (one of) <tt>NIST</tt>, <tt>USNO</tt>, <tt>PTB</tt> or <tt>WWVB</tt>.
<dt><tt>flag1 0 | 1</tt>
- <dd>Not used by this driver.
+ <dd>Initiate a call if 1. Automatically reset by program.
<dt><tt>flag2 0 | 1</tt>
- <dd>Not used by this driver.
+ <dd>Enables port locking if 1, disables if 0 (default).
<dt><tt>flag3 0 | 1</tt>
- <dd>Not used by this driver.
- <dt><tt>flag4 0 | 1</tt>
+ <dd>Enables direct connection if 1, or modem if 0 (default). If set, the driver will send a single character 'T' at every poll event.<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</dl>
<h4>Additional Information</h4>