README for UNIX NTP release $Date: 89/05/18 12:43:58 $ $Revision: 3.4.1.6 $ NTP (Network Time Protocol) Daemons There are three programs in the NTP distribution: ntp - simple query program used for single sample queries ntpd - A daemon that sets up peers and responds to queries. Ntpd does the clock trimming. ntpdc - program to query an ntpd. It was useful in checking the filters and cleaning the windows Installation: 1) Add an entry to /etc/services to define the ntp port. ntp 123/udp # network time protocol (exp) 2) Make a /etc/ntp.conf with the clocks you want to track. Please refer to the RFC's in the man directory, the man pages, and the clock.txt file to assist you in selecting clocks to peer with. The supplied ntp.conf is only a sample, and is not suitable for use. 3) Change the Makefile definitions to suit your environment. 4) make 5) make install 6) adb or remake kernel and change "tickadj" Recommended values for tickadj on various machines: VAX: 5 Sun3: 10 Sun4: 5 NeXT: 7 This step is optional; new algorithms will allow you to get by (with reduced accuracy) with the system supplied value of tickadj. For better preformence, you should change the value of tickadj. This can be done by making a new kernel or by compiling ntpd with SETTICKADJ defined, and having ntpd set it to the value you specify. This is clearly ugly. 7) Fire up ntpd in /etc/rc.local History: 5/17/89 Yet another preprocessor define for broken unsigned long to double conversions. Define GENERIC_UNS_BUG, and the unsigned long is shifted right one bit and cast to an int before conversion to a double. This seems to work much better. Preliminary support for NeXT systems. Be sure to define both GENERIC_UNS_BUG and SUN_FLT_BUG. The default value of tickadj in the kernel is too large so you'll have to adjust it by using the -t option and compiling with SETTICKADJ. I don't think you can use gdb on the running /dev/mem image. NOTE: don't even think of trying to run this on the 0.8 release of the system software. You will utterly and absolutely hang you system. Current testing is being done on the 0.9 release. So far, there seems to be some weirdness in the kernel which is attempting to sync to the clock to the internal clock chip every so ofter. So while it compiles and runs, it really doesn't work very well on the NeXT machine. Integration of the reference clock code from Doug Kingston and Jeff Schiller has been done. To configure a reference clock, check the ntpd manual page. 5/3/89 The changes to the ntp_proto.c module for clockhopper suppression have been tweaked once more, ever so slightly to conform with the 21 April 1989 draft of the NTP spec. We won't switch peers if the current peer makes it into the final selection list, unless the first peer on the selection list is of a higher stratum than the current peer. The ntpd.c/hourly() function now saves the value of the drift compensation register to a file (/etc/ntp.drift by default). In fact, the last 5 hourly samples are written to the file, as well as how many hours the ntpd process has been running. Ntpd will also attempt to intialize the value of the drift compensation register from this file when it is started up. The hourly stats: log message has been augmented to log additional information. 4/8/89 Changes to the ntp_proto.c module to supress peer switching when the dispersion between the newly selected peer and the currently selected peer is "small." A new configuration option, NOSWAP, has been added for use on Ultrix systems which can lock the ntpd process in memory; very desirable for diskless workstations. peer.reach is now not cleared in the clear() procedure. The stat.pl perl script can now handle syslog records which span a month boundary correctly. We're getting real close to a "blessed" version now. 3/29/89 A few fixes, clean up of unused #defines in ntp.h. The receive() procedure is now table driven per the 26 March 1989 draft of the spec. If no terrible errors or bugs are found, this version will probably be packaged as a "blessed" working version before the next stage of major hacking. 3/22/89 A bunch of minor fixes here an there. The RCS header is being updated so that patches that are generated will apply; apparently the new version of RCS puts the Locked: status in the Header Minor fiddles to ntpd/ntpdc to eliminate some byte-sex dependencies. Changs to ntp_proto.c to fix an mis-interpretation in the packet procedure. The ntp program now uses connected UDP sockets to pick up ICMP generated errors. ntpdc will now select a value of tickadj if you don't specify one. 3/17/89 Another sort-of-working ntpd. There might still be something weird with the logical clock code; seems to be a little weird. Would really like your comments on this version. Note that the a version that supports the Precision Time WWV clock can be had via anonymous FTP from BITSY.MIT.EDU. The version there might lag the University of Maryland version. 3/12/89 A snapshot of a more-or-less working ntpd. There's been a few more bug fixes and changes due to the NTP spec being revised. A few more changes have been made to the latest NTP spec (11 March 1989 version) which have not yet been applied. A few problems areas: I currently observe some peer flapping between two clock which are both of very good quality (UMD1.UMD.EDU and TRUECHIMER.CSO.UIUC.EDU). Not quite sure why this is happening yet or if it is really a problem. There are quite a few "Dropping peer " messages in the syslog. Most of these are due to lower statum "transient" clocks peering with the local daemon. Need to find a way to supress the messages in the transmit procedure when we've got no intention of keeping a peer structure around for them. There are changes in the works to improve the reliability of the ntpdc program. The ntpd hooks are there now, and some work remains in the ntpdc program. 3/7/89 *** THIS IS A TEST RELEASE *** This version contain most of the new algorithms from the 6 March 1989 draft of the NTP specification. It still operates, however, as Version 1, and does not support the authentication feature. The stratum 1 WWV clock code from Doug Kingston has not been tested or changed for this release. I would really like someone to change the interface to have the clock appear as just another peer. Quite a bit if clean-up and cosmetic changes were made in almost all of the modules. Note that the ntest program which tests certain arithmetic operations on you machine is automatically run by the Makefile. If it fail *for any reason*, stop right there and find out why. Until ntest works correctly, don't even bother with the rest of the code. Note that at least Ultrix has problems, and there is a define option in the makefile to accomodate the broken Ultrix pcc compiler. Recent version of GNU CC are known to work correctly on a VAX platform, and is in fact used for development. It is not necessary to use the GNU C compiler on you machine, however. The logical clock code in ntp_adjust.c has been changed to be more self-contained and independent from NTP proper. It has the tickadj round-off residual accumulating code, and attempts to implemenet the newest version of the NTP logical clock code. A large change here is that once an clock update has been passed to the logical clock, it will ignore further updated for 1<