diff options
Diffstat (limited to 'contrib/ntp/html/hints')
25 files changed, 1673 insertions, 0 deletions
diff --git a/contrib/ntp/html/hints/a-ux b/contrib/ntp/html/hints/a-ux new file mode 100644 index 000000000000..f8c26d2188b6 --- /dev/null +++ b/contrib/ntp/html/hints/a-ux @@ -0,0 +1,195 @@ +------------- +INTRODUCTION: +------------- +Last revision: 06-Jul-1994 + +Included in this distribution of XNTP V3 is a configuration file suitable +for use under Apple's A/UX Version 3.x.x There is also one for A/UX 2.0.1 +but it has not been fully tested. To make the executables follow the steps +outlined below. + +*** NOTE: You must have gcc installed to successfully compile the current +distribution; the native cc supplied with A/UX will NOT correctly compile +this source. See the FAQ in comp.unix.aux for places to obtain gcc from +and how to install it. + +---------------------- +MAKING XNTPD FOR A/UX: +---------------------- + +First, you need to create the makefiles (after you've downloaded the +source, of course): + + % make clean + % make refconf + +After that, you should edit Config.local to make sure that BINDIR is +correct for where you wish the programs to be "installed". The default +(and what I use) is /usr/local/etc. Make sure that DEFS_LOCAL and +CLOCKDEFS are commented out! Presently, only the LOCAL_CLOCK/REFCLOCK +clock is used and supported. + + +After this is done (you should be told that your system is A/UX 3), make +'xntpd' (the options to 'gcc' are held in compilers/aux3.gcc): + + % make + +I do not normally use the `make install' option and so have not verified its +compatibility with A/UX. Rather, I pull out each of the executables and +place them in the locally appropriate locations. + +--------------- +STARTING XNTPD: +--------------- + +At this point you need to set things up so that 'xntpd' is started upon +boot-up. You can do this in 1 of 2 ways: either add entries in /etc/inittab +or, more ideally, create and use an /etc/rc.local file. Since rc.local is +what I recommend, here's how you do it: + +By default, A/UX doesn't have rc.local, so you'll need to add the following to +/etc/inittab: + + net6:2:wait:/etc/syslogd # set to "wait" to run a syslog daemon ++ jmj0:2:wait:/etc/rc.local 1>/dev/syscon 2>&1 # Local stuff + dbg2::wait:/etc/telinit v # turn off init's verbose mode + +Now, the look of a sample /etc/rc.local is as follows: + + #!/bin/sh + : + : rc.local + : + # @(#)Copyright Apple Computer 1987 Version 1.17 of rc.sh on 91/11/08 15:56:21 (ATT 1.12) + + + # Push line discipline/set the device so it will print + /etc/line_sane 1 + echo " " + echo "Entering rc.local..." + + set `/bin/who -r` + if [ "$7" = 2 ] + then + /bin/echo " now setting the time..." + /usr/local/etc/ntpdate -s -b <host.domain> + sleep 5 + # + # start up 'xntpd' if we want + # + if [ -f /etc/ntp.conf ] + then + /bin/echo " setting tick and tickadj..." + /usr/local/etc/tickadj -t 16672 -a 54 + sleep 5 + /bin/echo " starting xntpd..." + /usr/local/etc/xntpd <&- > /dev/null 2>&1 + sleep 5 + fi + # + fi + + echo "Leaving rc.local..." + +There are a few things to notice about the above: + + o When run, 'ntpdate' forces your clock to the time returned by the + host(s) specified by <host.domain> (you'll need to replace this + be the IP address(es) of your timehosts. This is good since it gets + things close to start off with. You can use more than one time + server. + + o 'tickadj' is also called. This does two things: changes the + default value of 'tick' (which the the amount of time, in ms, that + is added to the clock every 1/60 seconds) and changes the value + of 'tickadj' which the the amount that is added or subtracted + from 'tickadj' when adjtime() is called. + + Now Mac clocks are pretty bad and tend to be slow. Sooo, instead of + having A/UX add the default of 16666ms every 1/60th of a second, you + may want it to add more (or less) so that it keeps better time. The + above value works for me but your "best" value may be different and + will likely require some fooling around to find the best value. As a + general rule of thumb, if you see 'xntpd' make a lot of negative clock + adjustments, then your clock is fast and you'll need to _decrease_ + the value of 'tick'. If your adjustments are positive, then you need + to increase 'tick'. To make a guess on how fast/slow your clock is, + use 'ntpdate' to sync your clock. Now watch 'xntpd' and see how it + operates. If, for example, it resets your clock by 1 second every 30 + minutes, then your clock is (1/(30*60)) is about 0.056% off and you'll + need to adjust 'tick' by 16666*0.00056 or about 9 (i.e. 'tick' should + be ~16675 if slow or ~16657 if fast) + + A/UX's default value of 'tickadj' is 1666 which is too big for + 'xntpd'... so it also needs to be adjusted. I like using larger + values then the recommended value of 9 for 'tickadj' (although not + anything near as big as 1666) since this allows for quick slews + when adjusting the clock. Even with semi-large values of 'tickadj' + (~200), getting 5ms (1/200 s) accuracy is easy. + + +Finally, before A/UX and 'xntpd' will work happily together, you need to +patch the kernel. This is due to the fact that A/UX attempts to keep the +UNIX-software clock and the Mac-hardware clock in sync. Neither the h/w or +the s/w clock are too accurate. Also, 'xntpd' will be attempting to adjust +the software clock as well, so having A/UX muck around with it is asking +for headaches. What you therefore need to do is tell the kernel _not_ to +sync the s/w clock with the h/w one. This is done using 'adb'. The +following is a shell script that will do the patch for you: + + #! /bin/sh + adb -w /unix <<! + init_time_fix_timeout?4i + init_time_fix_timeout?w 0x4e75 + init_time_fix_timeout?4i + $q + ! + +This must be done _every_ time you create a new kernel (via newconfig or +newunix) or else 'xntpd' will go crazy. + +-------- +HISTORY: +-------- + +John Dundas was the original porter of 'xntpd' and a lot of the additions +and A/UX-ports are from him. I got involved when I wanted to run 'xntpd' +on jagubox. It was also around this time that the base-patchlevel of +'xntpd' changed relatively (the so-called "jones" version). Since then, +I've been maintaining 'xntpd' for A/UX for the xntp development team + +The original kernel patch (which patched 'time_fix_timeout') was from +Richard Todd. I suggest patching 'init_time_fix_timeout' which prevents +'time_fix_timeout' from even being called. + +---------------- +TECHNICAL NOTES: +---------------- + + o As configured (see machines/aux3), 'xntpd' will log messages via syslogd + using the LOC_LOCAL1 facility. I would suggest the following in + /etc/syslog.conf: + + local1.notice /usr/adm/ntpd-syslog + + o As mentioned above, the clocks on A/UX and Macs are kinda bad. Not + only that, but logging in and out of the MacOS mode as well as + extensive floppy use causes A/UX to drop and lose clock interupts + (these are sent every 1/60th of a second). So, if you do these + activities a lot, you find out that you lose about 300ms of time + (i.e., you become 300ms slow). 'xntpd' default way of handling this + is to called 'settimeofday()' and step the clock to the correct + time. I prefer having 'xntpd' slew the clock back into line by + making gradual adjustments to the clock over a coupla minutes + or so. It's for this reason that SLEWALWAYS is defined in + include/ntp_machine.h for SYS_AUX3. It's also for this reason than + I like larger values of 'tickadj'. + +Good luck! If you have problems under A/UX feel free to contact me (e-mail +is preferred). +-- + Jim Jagielski | "That is no ordinary rabbit... 'tis the + jim@jagubox.gsfc.nasa.gov | most foul, cruel and bad-tempered + NASA/GSFC, Code 734.4 | rodent you ever set eyes on" + Greenbelt, MD 20771 | Tim the Enchanter diff --git a/contrib/ntp/html/hints/aix b/contrib/ntp/html/hints/aix new file mode 100644 index 000000000000..e53befff21bb --- /dev/null +++ b/contrib/ntp/html/hints/aix @@ -0,0 +1,76 @@ +Problem with recent ANSI compilers + +On some systems, including AIX, the compiler quits on the ntp_refclock.c +file when processing the refclock_report() routine. The problem, which +is eithre a feature or a bug, has to do with an unwanted promotion of +the u_char argument to an int and a failure of the compiler to recognize +the preceding prototype. A workaround is to use ANSI syntax to delare +the arguments. Since ANSI compilers are not universally available, this +syntax can't be used in the stock distribution. + +(Message # 60: 2884 bytes, New) +Date: Sat, 19 Aug 1995 13:20:50 -0400 +From: "R. Bernstein" <rocky@panix.com> +Newsgroups: comp.protocols.time.ntp +to: mills@udel.edu +return-receipt-to: rocky@panix.com +Subject: time and AIX 3.2.5 raw tty bug + +This posting isn't strictly about NTP, any program that may stop the +clock or set the clock backwards is subject to the AIX 3.2.5 bug. + +On AIX 3.2.5, there is a bug in the tty driver for a raw device which +may crash the box under certain conditions: basically a read() on a +raw tty in effect, a character was read but not as many as specified +by VMIN when a read timeout occurred. VTIME specifies the timeout. See +the AIX manual page on termios.h or that include file. for Information +on VMIN (or MIN) VTIME (or TIME). + +A remedy other than to not use raw tty's is to apply patch U435110. + +Details of the problem report follow. + +> ABSTRACT: +> IX43779: TRAP IN PSX_TIMEO +> +> ORIGINATING DETAILS: +> Stacktrace shows: +> IAR: 01460214 posixdd:psx_timeo + 8bf4: ti 4,r12,0x0 +> *LR: 014601a0 posixdd:psx_timeo + 8b80 +> 00212c60: 014604f4 posixdd:psx_timer + 8ed4 +> 00212cc0: 0144b74c ttydd:tty_do_offlevel + 4284 +> 00212d20: 000216fc .i_offlevel + 8c +> 00212d70: 00021d78 .i_softint + c8 +> 00001004: 00008714 .finish_interrupt + 80 +> +> RESPONDER SUMMARY: +> AIX asserted in psx_timeo(). Reason for the assert was that +> the current time was behind psx_ctime. Since this state +> can occur when the current time is changed after a character +> is received but before the VTIME interbyte timer pops, we +> should not assert on this. +> +> RESPONDER CONCLUSION: +> Removed the requirement that current time > psx_ctime by +> adding a new L_ntimersub macro that is used instead of the +> ntimersub macro in time.h. Also added a test for (current +> time - psx_ctime) being negative, in that case we do not +> adjust the new timeout. +> +> Reported to Correct a PTF in Error: NO +> Reported as a Highly pervasive problem: NO +> +> PE Apar?: NoPE +> Hiper Apar?: NoHiper +> Status: CLOSED PER +> Component Name: AIX V3 FOR RS/6 +> Version: 320 +> Component ID: 575603001 +> Submitted: 94/05/03 +> Closed: 94/05/05 +> ChangeTeam: TX2527 +> +> APAR FIXED BY: U431696 U432151 U432844 U432870 U432979 +> U433049 U433081 U433459 U433876 U433906 U434598 U434453 +> U434672 U434737 U435110 + diff --git a/contrib/ntp/html/hints/bsdi b/contrib/ntp/html/hints/bsdi new file mode 100644 index 000000000000..3b8bc386efea --- /dev/null +++ b/contrib/ntp/html/hints/bsdi @@ -0,0 +1,65 @@ +hints/bsdi + +Author: Bdale Garbee, bdale@gag.com +Last revision: 27Oct94 (Paul Vixie) + +Included in this distribution of XNTP is a configuration file suitable +for use with BSDI's BSD/OS 1.1 (formerly BSD/386 1.1). On this system, +the "cc" command is GCC 1.4x rather than PCC or GCC 2.x. It is imperative +that "cc" be used since it predefines the symbol __bsdi__; if you want to +use another compiler you will need to add -D__bsdi__ to catch the various +#ifdef's required for this system. + +The Kinemetrics/Truetime GPS-TM/TMD driver is known to work on this system. +The GPS-805 and GOES should also work fine. Hell, they should all work fine +but it's hard to test very many locally. + +Due to BNR2's strict interpretation of POSIX and XNTP's use of SIGIO, BSD/OS +can only handle one refclock per daemon. We're working this out with the +system architects. + +The config file is machine/bsdi, and the following steps should be all that +are required to install and use the bits. + +Note that you will need GNU sed; the version supplied with BSD/OS 1.1 loops +endlessly during "make refconf". Likewise you should get GNU make, which +the instructions below assume that you have put in /usr/local/bin/gnumake. + +To build the software: + + rm -f Config.local + gnumake refconf + gnumake MAKE=gnumake + +To install the software: + + gnumake install + + This will place all of the executables in /usr/local/etc. The config + file is expected to be /usr/local/etc/xntp.conf and the key file for + the optional authentication is /etc/ntp.keys. + + Craft a config file and a key file, and put them in the right places. + There is information on how to do this elsewhere in the documentation, + the only thing I'll mention is that I put the drift file in + /var/log/ntp.drift, and the authdelay on my 486DX/50 system is + 0.000064. Your mileage will vary, learn to use the authspeed tools + if you're going to authenticate. + + In the file /etc/rc.local, make sure that the invocation of ntpd is + commented out, and add an invocation of xntpd. Here's what I'm using: + + echo -n 'starting local daemons:' + + if [ -f /etc/ntp.keys -a -f /usr/local/etc/xntp.conf ]; then + echo -n ' xntpd'; /usr/local/etc/xntpd + fi + + #XXX# echo -n ' ntpd'; /usr/libexec/ntpd -t + +At this point, you should be good to go. Try running /usr/local/etc/xntpd and +using ntpq or xntpdc to see if things are working, then pay attention the next +time you reboot to make sure that xntpd is being invoked, and use ntpq or +xntpdc again to make sure all is well. + +Enjoy! diff --git a/contrib/ntp/html/hints/changes b/contrib/ntp/html/hints/changes new file mode 100644 index 000000000000..177e562b6dc6 --- /dev/null +++ b/contrib/ntp/html/hints/changes @@ -0,0 +1,13 @@ +Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (xntpd/refclock_parse.c): + - Added support to supply power from RS232 with CLOCK_RAWDCF. + Known to work with Linux 1.2. + - Made Linux ignore parity errors with CLOCK_RAWDCF. + +Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (parse/util/dcfd.c): + - Removed conflicting prototype for Linux (sscanf) + - Corrected spelling error + - Made Linux ignore parity errors. + - Added support to supply power from RS232 with CLOCK_RAWDCF. + +Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (parse/util/testdcf.c): + - Made Linux ignore parity errors. diff --git a/contrib/ntp/html/hints/decosf1 b/contrib/ntp/html/hints/decosf1 new file mode 100644 index 000000000000..bc4ce0bb294d --- /dev/null +++ b/contrib/ntp/html/hints/decosf1 @@ -0,0 +1,40 @@ +Some major changes were necessary to make xntp v3 run on the DEC Alpha +hardware running DEC OSF/1. All "long" and "u_long" declarations and +casts in the code were changed to "LONG" and "U_LONG" and a new header +file (include/ntp_types.h) was added. The new header file defines +LONG as int and U_LONG as u_int for the Alpha hardware and as long +and u_long for anything else. A couple of #ifs where changed in +ntpq and xntpdc to get the result of a signal defined correctly. The +Config.decosf1 file built the programs here with no problems. + +I don't have a radio clock here, so none of that code has been tested. +I have run xntpd, xntpdc, xntpres, ntpq, ntpdate, and tickadj under +DEC OSF/1 v1.2-2 (BL10). + +Mike Iglesias Internet: iglesias@draco.acs.uci.edu +University of California, Irvine BITNET: iglesias@uci +Office of Academic Computing uucp: ...!ucbvax!ucivax!iglesias +Distributed Computing Support phone: (714) 856-6926 + +Support for NTP Version 2 is included with the current OSF/1 release. If +you are upgrading to NTP Version 3 with this distribution, you should not +use the xntpd or ntpq programs that come with the OSF/1 release. The +older programs should be replaced by the newer programs of the same name, +either in situ or via a link to a tranquil spot like /usr/local/bin. The +make install script in the this distribution don't work due to a silly +install program incompatibility, so you will need to copy the programs by +hand. + +Don't use the setup utility to install or configure the xntpd installation, +as it will cheerfully clobber your painstakingly crafted ntp.conf program. +However, assuming you put this file in /etc/ntp.conf, you can use the +/sbin/init.d/xntpd script to start and stop the daemon. + +This distribution compiles with nominal mumur with the stock cc compiler +that comes with OSF/1. + +Dave Mills +Electrical Engineering Department +Unibergisty of Delabunch +mills@udel.edu + diff --git a/contrib/ntp/html/hints/decosf2 b/contrib/ntp/html/hints/decosf2 new file mode 100644 index 000000000000..e4a8828cc508 --- /dev/null +++ b/contrib/ntp/html/hints/decosf2 @@ -0,0 +1,54 @@ +Problems with DEC OSF/1 V2.0 + +Compilation using gcc fails with ntp_config.c. The problem is an apparent +error in the /usr/include/sys/procset.h and /usr/include/sys/wait.h +include files. + +cowbird:/usr/include/sys# diff -c wait.h.orig wait.h +*** wait.h.orig Tue Feb 22 02:41:38 1994 +--- wait.h Thu Aug 25 14:52:57 1994 +*************** +*** 298,304 **** + #else + + _BEGIN_CPLUSPLUS +! extern int waitid(idtype_t, id_t, siginfo_t *, int); + _END_CPLUSPLUS + #endif /* _NO_PROTO */ + +--- 298,304 ---- + #else + + _BEGIN_CPLUSPLUS +! extern int waitid(idtype_t, pid_t, siginfo_t *, int); + _END_CPLUSPLUS + #endif /* _NO_PROTO */ + +cowbird:/usr/include/sys# diff -c procset.h.orig procset.h +*** procset.h.orig Tue Feb 22 02:41:44 1994 +--- procset.h Thu Aug 25 14:43:52 1994 +*************** +*** 86,95 **** + */ + + idtype_t p_lidtype; /* The id type for the left set. */ +! id_t p_lid; /* The id for the left set. */ + + idtype_t p_ridtype; /* The id type of for right set. */ +! id_t p_rid; /* The id of the right set. */ + } procset_t; + + +--- 86,95 ---- + */ + + idtype_t p_lidtype; /* The id type for the left set. */ +! pid_t p_lid; /* The id for the left set. */ + + idtype_t p_ridtype; /* The id type of for right set. */ +! pid_t p_rid; /* The id of the right set. */ + } procset_t; + +Also, if using gcc from the freeware disk, either replace syscall.h +in the directory /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.3/include +or replace with a link to /usr/include/sys/syscall.h. diff --git a/contrib/ntp/html/hints/hpux b/contrib/ntp/html/hints/hpux new file mode 100644 index 000000000000..1640d057a350 --- /dev/null +++ b/contrib/ntp/html/hints/hpux @@ -0,0 +1,158 @@ +Last update: Sun Mar 13 15:05:31 PST 1994 + +This file hopefully describes the whatever and however of how to get xntp +running on hpux 7.0 and later s300. s400, s700, and s800. + +First off, all the standard disclaimers hold here ... HP doesn't have anthing +to do with this stuff. I fool with it in my spare time because we use it and +because I like to. We just happen to have a lot of HP machines around here :-) +Xntpd has been in use here for several years and has a fair amount of mileage +on various HP platforms within the company. I can't really guarantee bug fixes +but I'd certainly like to hear about bugs and I won't hestitate to look at +any fixes sent to me. + +Now lets talk OS. If you don't have 7.0 or later, pretty much hang it up now. +This stuff has run here on pretty much everything from 8.0 upward on s300, +s700, and s800. It is known to run on 7.0 s300/s400 but all reports are +from the field and not my personal experience. + +If you are lucky enough to have a s300 or s400 with 9.03, then you no longer +have to worry about adjtimed as HP-UX now has adjtime(2). The rest of you +will have to wait on 10.0 which will have adjtime(2) and a supported though +a bit older version of xntpd. + +Next, let me explain a bit about how this stuff works on HP-UX's that do not +have adjtime(2). The directory adjtime contains libadjtime.a and the adjtimed +daemon. Instead of the adjtime(2) system call, we use a library routine to +talk to adjtimed thru message queues. Adjtimed munges into /dev/kmem and +causes the clock to skew properly as needed. PLEASE NOTE that the adjtime +code provided here is NOT a general replacement for adjtime(2) ... use of +this adjtime(3)/adjtimed(8) other than with xntpd may yield very odd results. + +What to do to get this stuff running ? + + * If you are running an OS less than 10.0 or do not have a s300/s400 + with 9.03 or better + -> cd machines + -> vi hpux + -> (change -DSYS_HPUX=? to match whatever you are running [7,8,9]) + -> cd .. + + * Say "make makeconfig" + + * Say "make", sit back for a few minutes. + + * cd authstuff + * Say "./authcert < certdata" and check the output. Every line should + end with "OK" ... if not, we got trouble. + * Now try "./authspeed auth.samplekeys". What we want to + remember here is the "authentication delay in CPU time" + * cd .. + + * Say "make install" + + * I'd suggest reading the xntp docs about now :-) ... seriously !! + + * One thing I have added to this version of xntpd is a way to select + config files if you are sharing /usr/local thru NFS or whatever. + If the file /usr/local/etc/xntp.conf happens to be a directory, the + files in that directory are searched until a match is found. The + rules for a match are: + + 1. Our hostname + 2. default.<machine id> (as in default.375 or default.850) + 3. default + + * Ok, make sure adjtimed is running (just start it up for now with + "/usr/local/etc/adjtimed"). Using -z as an option will get you + a usage message. + + * Now start up xntpd and watch it work. + + * Make sure that adjtimed gets started at boot right before xntpd. + We do this in /etc/netbsdsrc. They must both run as root !! + +Possible problems ? + + * On some 320's and 835's we have had to run adjtimed with "-p 45" or + so to get rid of syslog messages about "last adjust did not finish". + + * At 9.0, there is a problem with DIAGMON (patch available from the + response center) which causes it to delete the message queue that + adjtimed/xntpd use to communicate. (see next note for result) + + * Xntpd has been known to get really ticked off when adjtime() fails + which is usually only while running the emulation code on HP-UX. + When it gets mad, it usually jumps the clock into never never land. + Possible reasons for this are adjtimed being killed or just never + started or adjtimed being completely swapped out on a really busy + machine (newer adjtimed try to lock themselves in memory to prevent + this one). + +Anything else ... just drop me a line at ken@sdd.hp.com + +Received: from louie.udel.edu by huey.udel.edu id aa14418; 15 Jun 95 9:19 EDT +Received: from host5.colby.edu (host-05.colby.edu) by host-04.colby.edu with ESMTP (1.37.109.15/Colby 1.1) + id AA165442355; Thu, 15 Jun 1995 09:19:16 -0400 +Received: by host5.colby.edu (1.37.109.15/Colby 1.1) + id AA056252339; Thu, 15 Jun 1995 09:18:59 -0400 +Date: Thu, 15 Jun 1995 09:18:59 -0400 (EDT) +From: "Jeff A. Earickson" <jaearick@colby.edu> +To: Mills@huey.udel.edu +Subject: More minor bugs in xntp3.4s +In-Reply-To: <9506150022.aa12727@huey.udel.edu> +Message-Id: <Pine.HPP.3.91.950615083549.4557A-100000@host5.colby.edu> +Mime-Version: 1.0 +Content-Type: TEXT/PLAIN; charset=US-ASCII + +Dave, + After reading the hpux hints file, I realized I didn't install or +start adjtimed. In the course of doing this, I discovered that: + +--> $(TOP) is not defined in adjtime/Makefile, so "make install" can't + find the install.sh script. + +--> "make install" from the main Makefile never goes into the adjtime + directory, so I added the following two lines into the install + target of the main Makefile: + + @echo installing from adjtime + @cd adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" install + +This twiddle may not be right for all systems, but it got adjtimed +installed for me. + + You might also want to add to the hpux hints file that one way to +fire things up at boot time is to add the following lines to the localrc +function of /etc/rc: + + #---daemons for Network Time Protocol (version 3.4s) + #---note that adjtimed is only needed for HP-UX 9.X, not 10.0 + #---adjtimed must be running or xntpd won't work right... + if [ -x /usr/local/bin/adjtimed ]; then + /usr/local/bin/adjtimed -r & echo -n ' adjtimed' + if [ -x /usr/local/bin/xntpd ]; then + /usr/local/bin/xntpd & echo -n ' xntpd' + fi + fi + +I discovered that the "-r" option of adjtimed is needed to clear out any +trash from a previous execution of it. Otherwise adjtimed quietly dies +and leaves xntpd in the lurch... + +Thanks for the help. + +** Jeff A. Earickson, Ph.D PHONE: 207-872-3659 +** Senior UNIX Sysadmin, Information Technology EMAIL: jaearick@colby.edu +** Colby College, 4214 Mayflower Hill, FAX: 207-872-3555 +** Waterville ME, 04901-8842 + +On Thu, 15 Jun 1995 Mills@huey.udel.edu wrote: + +> Jeff, +> +> Read the hpux file in the hints directory. +> +> Dave +> + diff --git a/contrib/ntp/html/hints/linux b/contrib/ntp/html/hints/linux new file mode 100644 index 000000000000..b06a36a63465 --- /dev/null +++ b/contrib/ntp/html/hints/linux @@ -0,0 +1,5 @@ +The kernel PLL interface is broken, I know. +Update RSN. + + Torsten + (duwe@informatik.uni-erlangen.de) diff --git a/contrib/ntp/html/hints/notes-xntp-v3 b/contrib/ntp/html/hints/notes-xntp-v3 new file mode 100644 index 000000000000..ba027f2105fe --- /dev/null +++ b/contrib/ntp/html/hints/notes-xntp-v3 @@ -0,0 +1,119 @@ +Notes for NTP Version 3 + +This version operates in much the same manner as Version 2 with the +following changes and additions: + +1. The protocol machinery operates in conformance with the RFC1305 NTP + Version 3 specification. The most visible characteristic of this + version is that the poll intervals for all polls, even selected + ones, is significantly increased. This is especially desirable when + serving a large client population. This implementation supports + previous versions as non-configured peers; for version-2 configured + peers a "version 2" keyword should be included on the "peer" line. + +2. The configuration file has a new keyword: statfile <file>, where + <file> is the name of a statistics file." When present, each clock + update generates an entry of the form: + + <day> <sec>.<frac> <addr> <status> <offset> <delay> <disp> + + where <day> is the modified Julian day, <sec>.<frac> is the time of + day, <addr> is the peer address and <status> is the peer status. + The <offset>, <delay> and <disp> are the measured offset, delay and + dispersion, respectively, of the peer clock relative to the local + clock. About once per day the current file is closed and a new one + created with names <file>.<gen>, where <gen> starts at one and + increments for each new generation. + +3. A number of additional platforms are supported. See ./Config file + for details. + +4. A driver for the TrueTime 468DC GOES Synchronized Clock is + included. This driver (refclock_goes.c) should also work for other + TrueTime radio clocks, since all use the same format. + +5. A replacement driver for the Spectracom 8170 WWVB Synchronized + Clock is included. This driver (refclock_wwvb.c) (a) does not + require a 1-pulse-per-second signal, (b) supports both format 0 + (original 8170) and format 2 (Netclock/2 and upgraded 8170), (c) + can be connected to more than one computer and (d) automatically + compensates for all serial baud rates. + +6. A driver for the German time/frequency station DCF77 is included. + This requires a special STREAMS module. + +7. In Version 2 special line-discipline modules were required for the + CHU and WWVB drivers. This code continues to work in Version 3, + although it is no longer needed for the WWVB driver. However, this + code does not work under STREAMS, as used in SunOS 4.1.1. + Equivalent STREAMS modules are supplied with Version 3. + +8. Support for an external 1-pulse-per-second (pps) signal is + provided. The signal is connected to a serial port (see + xntpd/ntp_loopfilter.c for details). When present the leading edge + of the pulse establishes the on-time epoch within an interval + established by the selected radio clock or other NTP time server. + Use of the pps is indicated when the tattletale displayed by ntpq + changes from "*" to "o". + +9. The clock-selection and poll-update procedures have been modified + slightly in order to achieve better performance on high speed LANs + with compromise in performance on typical WANs. + +10. In order to comply with U.S. Commerce Department regulations, the DES + encryption routine lib/authdes.c cannot be exported. For exportable + versions of this distribution a DES-encrypted version of this routine + lib/authdes.c.des is included along with an unencrypted version + lib/authdes.c.export, which allows normal operation, but without the + NTP authentication feature. Further information is available in the + lib/authdes.c.export file. + +11. As an alternative to the DES-based authentication mechanism, an + implementation of the RSA Message Digest 5 algorithm is provided. + (see applicable copyright information in the library files). + +12. A driver for the Magnavox MX4200 GPS clock. + +13. A STREAMS module which captures carrier-detect data-lead transitions to + connect a precision source of 1-pps, yet avoid the ugly overhead in the + usual STREAMS processing. See the ppsclock subdirectory. + +14. Support for the Apple A/UX operating system and enhanced support for the + Hewlet-Packard HP/UX operating system. See the various README and Config + files for further information. + +See the COPYRIGHT file for authors and copyright information. Note that some +modules in this distribution contain copyright information that supersedes +the copyright information in that file. + +If I missed something or neglected to give due credit, please advise. + +David L. Mills +University of Delaware +31 May 1992, amended 23 July 1992, 25 October 1992 + +Bugs and notes + +A bug in the original tty_clk_STREAMS.c module has been fixed. + +The poll-interval randomization feature of poll_update (in +xntpd/ntp_proto.c) has been extended to apply when the poll interval is +increased, as well as reduced. This spreads the update messages in time +and helps avoid unpleasant bursts of messages. + +In the clock_select algorithm the peers selected for combining are +limited to those survivors at the lowest stratum, not the entire list. +This helps avoid whiplash when large numbers of peers are at the same +stratum. + +The number formerly displayed by ntpq as "compliance" is now the time +constant of integration. + +The DNS resolver xntpd/ntp_intres.c is now integrated into xntpd, making +configuration of multiple hosts easier. + +System and peer event are now written to the system log at priority +LOG_INFO. + +The leap-second code was fixed to avoid broadcasting leap warnings on +all except the last day of June and December. diff --git a/contrib/ntp/html/hints/parse b/contrib/ntp/html/hints/parse new file mode 100644 index 000000000000..d2523515e839 --- /dev/null +++ b/contrib/ntp/html/hints/parse @@ -0,0 +1,105 @@ +Compilation: + Usual thing: rm -f Config.local ; make for vanilla + make refconf for reference clock (e. g. DCF77) + +Directory contents: + + hints/PARSE - this file + + xntpd/refclock_parse.c + - reference clock support for DCF77/GPS in xntp + parse/parse.c + - Reference clock data parser framework + parse/parse_conf.c + - parser configuration (clock types) + parse/clk_meinberg.c + - Meinberg clock formats (DCF U/A 31, PZF 535, GPS166) + parse/clk_schmid.c + - Schmid receiver (DCF77) + parse/clk_rawdcf.c + - 100/200ms pulses via 50 Baud line (DCF77) + parse/clk_dcf7000.c + - ELV DCF7000 (DCF77) + parse/clk_trimble.c + - Trimble SV6 GPS receiver + + If you want to add new clock types please check + with kardel@informatik.uni-erlangen.de. These files + implement the conversion of RS232 data streams into + timing information used by refclock_parse.c which is + mostly generic except for NTP configuration constants. + + parse/Makefile.kernel + - *SIMPLE* makefile to build a loadable STREAMS + module for SunOS 4.x / SunOS 5.x systems + + parse/parsestreams.c + - SUN Streams module (loadable) for radio clocks + This streams module is designed for SunOS 4.1.X. + + parse/parsesolaris.c + - SUN Streams module (loadable) for radio clocks. + This streams module is designed for SunOS 5.x + Beware this is still new - so it might crash + your machine (we have seen it working, though). + + parse/parsetest.c + - simple test program for STREAMS module. Its so simple, + that it doesn't even set TTY-modes, thus they got to + be correct on startup - works for Meinberg receivers + + parse/testdcf.c + - test program for raw DCF77 (100/200ms pulses) + receivers + + include/parse.h - interface to "parse" module and more + include/parse_conf.h + - interface to "parse" configuration + + include/sys/parsestreams.h + - STREAMS specific definitions + + scripts/support + - scripts (perl & sh) for statistics and rc startup + the startup scripts are used in Erlangen for + starting the daemon on a variety of Suns and HPs + and for Reference Clock startup on Suns + These scripts may or may not be helpful to you. + +Supported clocks: + Meinberg DCF U/A 31 + Meinberg PZF535/TCXO (Software revision PZFUERL 4.6) + Meinberg PZF535/OCXO (Software revision PZFUERL 4.6) + Meinberg GPS166 (Software version for Uni-Erlangen) + ELV DCF7000 (not recommended - casual/emergency use only) + Conrad DCF77 receiver (email: time@informatik.uni-erlangen.de) + + level converter + TimeBrick (email: time@informatik.uni-erlangen.de) + Schmid Receiver Kit + Trimble SV6 GPS receiver + +Addresses: + Meinberg Funkuhren + Auf der Landwehr 22 + 31812 Bad Pyrmont + Germany + Tel.: 05281/20 18 + FAX: 05281/60 81 80 + + ELV Kundenservice + Postfach 1000 + 26787 Leer + Germany + Tel.: 0491/60 08 88 + + Walter Schmidt + Eichwisrain 14 + 8634 Hombrechtikon + Switzerland + +If you have problems mail to: + + time@informatik.uni-erlangen.de + +We'll help (conditions permitting) + diff --git a/contrib/ntp/html/hints/refclocks b/contrib/ntp/html/hints/refclocks new file mode 100644 index 000000000000..17e76434a307 --- /dev/null +++ b/contrib/ntp/html/hints/refclocks @@ -0,0 +1,35 @@ +This is a short overview for the reference clocks currently supported +by xntp V3. (Ultimate wisdom can be obtained from xntpd/refclock_*.c +this file was derived from that information - unfortunately some comments +in the files tend to get stale - so use with caution) + +Refclock address Type +127.127.0.x no clock (fails to configure) +127.127.1.x local clock - use local clock as reference +127.127.2.x no clock (fails to configure) +127.127.3.x PSTI 1010/1020 WWV Clock +127.127.4.x SPECTRACOM WWVB receiver 8170 and Netclock/2 +127.127.5.x Kinimetric Truetime 468-DC GOES receiver +127.127.6.x IRIG audio decode (Sun & modified BSD audio driver) +127.127.7.x CHU Timecode (via normal receiver & Bell 103 modem) +127.127.8.x PARSE (generic driver for a bunch of DCF/GPS clocks + can be extended for other clocks too) + 8.0-3 Meinberg PZF535/TCXO + 8.4-7 Meinberg PZF535/OCXO + 8.8-11 Meinberg DCF U/A 31 + 8.12-15 ELV DCF7000 + 8.16-19 Walter Schmid DCF receiver (Kit) + 8.20-23 Conrad DCF77 receiver module + level converter (Kit) + 8.24-27 TimeBrick (limited availability ask + time@informatik.uni-erlangen.de) + 8.28-31 Meinberg GPS166 + 8.32-35 Trimble SV6 GPS receiver +127.127.9.x MX4200 GPS receiver +127.127.10.x Austron 2201A GPS Timing Receiver +127.127.11.x Kinemetrics Truetime OM-DC OMEGA Receiver +127.127.12.x KSI/Odetecs TPRO-S IRIG-B / TPRO-SAT GPS +127.127.13.x Leitch: CSD 5300 Master Clock System Driver +127.127.14.x MSFEES +127/127.15.x TrueTime GPS/TM-TMD +127.127.16.x Bancomm GPS/IRIG Ticktock +127.127.17.x Datum Programmable Time System diff --git a/contrib/ntp/html/hints/rs6000 b/contrib/ntp/html/hints/rs6000 new file mode 100644 index 000000000000..8561ac29b1b0 --- /dev/null +++ b/contrib/ntp/html/hints/rs6000 @@ -0,0 +1,56 @@ +15.7.1993 +xntp3 compiles now again on AIX. I have disabled prototyping and added +the switch -D_NO_PROTO which disables prototyping in the system include +files. + +Matthias Ernst maer@nmr.lpc.ethz.ch +-------------------------------------------------------------------------------- +Xntp version 3 now support the cc compiler for AIX. +The Config.aix will now use cc by default. You can still compile xntp +with the bsd compiler by changing "COMP= cc" to "COMP= bsdcc" and +and removing the "-DSTUPID_SIGNAL" option from the "DEFS" option. + +xntp and tickadj was also modified so that the value of tickadj is read +form the kernel and can be set by tickadj. For now I would not set +tickadj below 40 us. + +Bill Jones +jones@chpc.utexas.edu +------------------------------------------------------------------------------- + +This is a modified version of xntp version 3 for the RS6000. It works for +AIX 3.2 and these are the same changes as have been applied tothe version 2 +implementation of xntp. It works fine for us but I have not tested all of +the features, especially the local clock support for the RS6000 is not tested +at all. + +Matthias Ernst, ETH-Zuerich, Switzerland - maer@nmr.lpc.ethz.ch + +-------------------------------------------------------------------------------- + +Here the original README.rs6000 for the version 2 implementation: + +A hacked version of xntp for the IBM RS/6000 under AIX 3.1 can be found +in xntp.rs6000.tar.Z. [ if still available at all - Frank Kardel 93/12/3 ] + +This will not work on older versions of AIX due to a kernel bug; to find +out whether you have the kernel bug, compile and run testrs6000.c (see +comments in the code for instructions). + +xntp and testrs6000 require "bsdcc" to compile. This is simply another +entry point into the xlc compiler with various options set for BSD +compatibility. If your system does not have bsdcc, do the following: + +link /bin/bsdcc to /bin/xlc + +put the following into /etc/xlc.cfg: + +* BSD compatibility +bsdcc: use = DEFLT + crt = /lib/crt0.o + mcrt = /lib/mcrt0.o + gcrt = /lib/gcrt0.o + libraries = -lbsd, -lc + proflibs = -L/lib/profiled,-L/usr/lib/profiled + options = -H512,-T512, -qlanglvl=extended, -qnoro, -D_BSD, -D_NONSTD_TYPES, -D_NO_PROTO, -tp,-B/lib/ + diff --git a/contrib/ntp/html/hints/sco.htm b/contrib/ntp/html/hints/sco.htm new file mode 100644 index 000000000000..2273faa7a436 --- /dev/null +++ b/contrib/ntp/html/hints/sco.htm @@ -0,0 +1,39 @@ +<HTML> +<HEAD> + <TITLE>SCO Unix hints</TITLE> +</HEAD> +<BODY> + <H1>SCO Unix hints</H1> + + <H2>Older SCO Unix versions</H2> + <P> + NTP 4.0.x does not run on SCO Unix prior to version 3.2.5.0.0. If you + need NTP on an older SCO Unix system and don't mind to modify your + kernel, use 3.5.91 which has patches for SCO Unix 3.2.4.x. Apply the + kernel modifications as described in + <A HREF="http://www.echelon.nl/en/ntp/sco3-recipe.html">XNTP on SCO + 3.2.4.2</A>. + + <H2>Compiling NTP</H2> + <P> + Delete the old SCO supplied NTP programs using the "custom" + utility. Run the NTP configure program with CFLAGS="-b elf -K + <I>processor-type</I>" for best results. + + <H2>Running NTP</H2> + <P> + Run "tickadj -As" after every reboot to set the variables + "clock_drift" and "track_rtc" to the right values. + <P> + Run "ntpd" with a high negative nice-value, i.e. + "nice --19 ntpd" for best results. + + <H2>More information</H2> + <P> + More information on the way SCO Unix and NTP interact can be found in + <A HREF="http://www.echelon.nl/en/ntp/ntp-on-sco.html">NTP on SCO Unix</A>, + which includes links to precompiled versions of NTP. + <P> + <A HREF="mailto:kees@echelon.nl">Kees Hendrikse</A>, January 1999 +</BODY> +</HTML> diff --git a/contrib/ntp/html/hints/sgi b/contrib/ntp/html/hints/sgi new file mode 100644 index 000000000000..5e4f7de6d597 --- /dev/null +++ b/contrib/ntp/html/hints/sgi @@ -0,0 +1,74 @@ +adjtime, tick and tickadj: +-------------------------- + +The SGI value for HZ is 100 under Irix 4, with the system clock running +in nominal mode (ftimer off), so the value for tick is 10000 usec. +Tickadj is a bit more tricky because of the behaviour of adjtime(), +which seems to try to perform the correction over 100-200 seconds, with +a rate limit of 0.04 secs/sec for large corrections. Corrections of +less than 0.017 seconds generally complete in less than a second, +however. + +Some measured rates are as follows: + + Delta Rate (sec/sec) + + > 1 0.04 + 0.75 0.04 + 0.6 0.004 + 0.5 0.004 + 0.4 0.0026 + 0.3 0.0026 + 0.2 0.0013 + 0.1 0.0015 + 0.05 0.0015 + 0.02 0.0003 + 0.01 0.015 +Strange. Anyway, since adjtime will complete adjustments of less than +17msec in less than a second, whether the fast clock is on or off, I +have used a value of 150usec/tick for the tickadj value. + +Fast clock: +----------- + +I get smoother timekeeping if I turn on the fast clock, thereby making +the clock tick at 1kHz rather than 100Hz. With the fast clock off, I +see a sawtooth clock offset with an amplitude of 5msec. With it on, +the amplitude drops to 0.5msec (surprise!). This may be a consequence +of having a local reference clock which spits out the time at exactly +one-second intervals - I am probably seeing sampling aliasing between +that and the machine clock. This may all be irrelevant for machines +without a local reference clock. Fiddling with the fast clock doesn't +seem to compromise the above choices for tick and tickadj. + +I use the "ftimer" program to switch the fast clock on when the system +goes into multiuser mode, but you can set the "fastclock" flag in +/usr/sysgen/master.d/kernel to have it on by default. See ftimer(1). + +timetrim: +--------- + +Irix has a kernel variable called timetrim which adjusts the system +time increment, effectively trimming the clock frequency. Xntpd could +use this rather than adjtime() to do it's frequency trimming, but I +haven't the time to explore this. There is a utility program, +"timetrim", in the util directory which allows manipulation of the +timetrim value in both SGI and xntpd native units. You can fiddle with +default timetrim value in /usr/sysgen/master.d/kernel, but I think +that's ugly. I just use xntpd to figure out the right value for +timetrim for a particular CPU and then set it using "timetrim" when +going to multiuser mode. + +Serial I/O latency: +------------------- + +If you use a local clock on an RS-232 line, look into the kernel +configuration stuff with regard to improving the input latency (check +out /usr/sysgen/master.d/[sduart|cdsio]). I have a Kinemetrics OM-DC +hooked onto /dev/ttyd2 (the second CPU board RS-232 port) on an SGI +Crimson, and setting the duart_rsrv_duration flag to 0 improves things +a bit. + + +12 Jan 93 +Steve Clift, CSIRO Marine Labs, Hobart, Australia (clift@ml.csiro.au) diff --git a/contrib/ntp/html/hints/solaris.html b/contrib/ntp/html/hints/solaris.html new file mode 100644 index 000000000000..8595fbfc3e17 --- /dev/null +++ b/contrib/ntp/html/hints/solaris.html @@ -0,0 +1,139 @@ +<HTML> +<HEAD> +<TITLE>Solaris hints and kinks</TITLE> +</HEAD> +<BODY> +Information on compiling and executing ntpd under Solaris. +<BR> +Last Updated: Sun Jun 21 01:32:18 EDT 1998, +John Hawkinson, +<! -- This is deliberately not a mailto -- > <jhawk@MIT.EDU> +<P> +If you're not running Solaris 2.5.1 or later, it is likely +that you will have problems; upgrading would be a really good plan. +<P> +<H3>All Solaris versions</H3> +<P> +Proper operation of ntp under Solaris requires setting the kernel +variable <I>dosynctodr</I> to zero (meaning "do not synchronize the clock +to the hardware time-of-day clock"). This can be done with the +tickadj utility: +<BLOCKQUOTE><TT> +tickadj -s +</TT></BLOCKQUOTE> +If you prefer, it can also be done with the native Solaris kernel debugger: +<BLOCKQUOTE><TT> +echo dosynctodr/W0 | adb -k -w /dev/ksyms /dev/mem +</BLOCKQUOTE></TT> +<P> +Or, it can also be set by adding a line to /etc/system: +<BLOCKQUOTE><TT> +set dosynctodr = 0 +</BLOCKQUOTE></TT> +<P> +Instead of the <I>tick</I> kernel variable, which many operating +systems use to control microseconds added to the system time every +clock tick (c.f. <A HREF="../notes.htm#frequency_tolerance">Dealing +with Frequency Tolerance Violations</A>), Solaris has the variables +<I>nsec_per_tick</I> and <I>usec_per_tick</I>. +<P> +<I>nsec_per_tick</I> and <I>usec_per_tick</I> control the number of +nanoseconds and microseconds, respectively, added to the system clock +each clock interrupt. Enterprising souls may set these based on +information collected by ntpd in the <CODE>/etc/ntp.drift</CODE> file +to correct for individual hardware variations. +<P> +On UltraSPARC systems, <I>nsec_per_tick</I> and <I>usec_per_tick</I> +are ignored in favor of the <I>cpu_tick_freq</I> variable, which +should be automatically be determined by the PROM in an accurate +fashion. +<P> +In general, the same ntp binaries should not be used across multiple +operating system releases. There is enough variation in the core operating +system support for timekeeping that a rebuild of ntpd for the idiosyncracies +of your specific operating system version is advisable. +<P> +It is recommended that ntp be started via a script like <A +HREF="solaris.xtra.S99ntpd">this one</A>, installed in +<CODE>/etc/init.d/ntpd</CODE> with a symbol link from +<CODE>/etc/rc2.d/S99ntpd</CODE>. + +<H3>Solaris 2.6</H3> +<P> +Solaris 2.6 adds support for kernel PLL timekeeping, but breaks this +support in such a fashion that using it worse than not. This is <A +HREF="solaris.xtra.4095849"> SUN Bug ID 4095849</A>, and it is not yet +fixed as of June 1998. +<P> +<H3>Solaris 2.5 and 2.5.1</H3> +<P> +On UltraSPARC systems, calculation of <I>cpu_tick_freq</I> is broken +such that values that are off by significant amounts may be used +instead. This unfortunately means that ntpd may have severe problems +keeping synchronization. This is <A HREF="solaris.xtra.4023118"> SUN Bug ID +4023118</A>. Bryan Cantrill <! -- <bmc@eng.sun.com> --> of Sun +posted <A HREF="solaris.xtra.patchfreq">patchfreq</A>, a workaround script, +to comp.protocols.time.ntp in March of 1997. +<P> +<HR> +<H2>OLD DATA</H2> +<STRONG>I can't vouch for the accuracy the information below this +rule. It may be significantly dated or incorrect.</STRONG> +<P> +<P> +<H3>Solaris 2.2</H3> +<P> +Solaris 2.2 and later contain completely re-written clock code to +provide high resolution microsecond timers. A benefit of the +re-written clock code is that adjtime does not round off its +adjustments, so ntp does not have to compensate for this +rounding. Under Solaris 2.2 and later, ntp #define's +<CODE>ADJTIME_IS_ACCURATE</CODE>, and does not look for the <I>tickadj</I> +kernel variable. +<P> +<H3>Solaris 2.1</H3> +(This originally written by William L. Jones <jones@chpc.utexas.edu>) +<P> +Solaris 2.1 contains fairly traditional clock code, with <I>tick</I> +and <I>tickadj</I>. +<P> +Since settimeofday under Solaris 2.1 only sets the seconds part of timeval +care must be used in starting xntpd. I suggest the following start +up script: +<BLOCKQUOTE><TT> +tickadj -s -a 1000 +<BR>ntpdate -v server1 server2 +<BR>sleep 20 +<BR>ntpdate -v server1 server2 +<BR>sleep 20 +<BR>tickadj -a 200 +<BR>xntpd +</TT></BLOCKQUOTE> + +The first tickadj turns of the time of day clock and sets the tick +adjust value to 1 millisecond. This will insure that an adjtime value +of at most 2 seconds will complete in 20 seconds. +<P> +The first ntpdate will set the time to within two seconds +using settimeofday or it will adjust time using adjtime. +<P> +The first sleep insures the adjtime has completed for the first ntpdate. +<P> +The second ntpdate will use adjtime to set the time of day since the +clock should be within 2 seconds of the correct time. +<P> +The second tickadj set the tick adjust system value to 5 microseconds. +<P> +The second sleeps insure that adjtime will complete before starting +the next xntpd. +<P> +I tried running with a tickadj of 5 microseconds with out much success. +200 microseconds seems to work well. +<P> +<HR> +Prior versions of this file had major text contributed by: +<MENU> +<LI>Denny Gentry <denny@eng.sun.com> +</MENU> +<BODY> +</HTML> diff --git a/contrib/ntp/html/hints/solaris.xtra.4023118 b/contrib/ntp/html/hints/solaris.xtra.4023118 new file mode 100644 index 000000000000..84c5d15214b2 --- /dev/null +++ b/contrib/ntp/html/hints/solaris.xtra.4023118 @@ -0,0 +1,36 @@ + Bug Id: 4023118 + Category: kernel + Subcategory: other + State: integrated + Synopsis: sun4u doesn't keep accurate time + Description: + +[ bmc, 12/20/96 ] + +The clock on a sun4u drifts unacceptably. On a typical 143 mHz Ultra, +the clock took 1.0001350 seconds to count 1 second. While this may seem +trivial, it adds up quickly. In this case, the TOD chip will have to +pull the clock forward by 2 seconds every 4 hours and 7 minutes. +This drift rate is so high, that the clock is close to being too broken +for NTP to guarantee correctness (in order for NTP's mechanism to work, +it must be assured that the local clock drifts no more than 20 ms in 64 +seconds; this particular 143 mHz Ultra will drift by nearly 9 ms in that +period). This problem has been reproduced on virtually all sun4u +classes. + +The fundamental problem lies in the kernel's perception of ticks per +second. The PROM is responsible for determining this figure exactly, +and the kernel extracts it into the variable cpu_tick_freq. On sun4u's, +this number is disconcertingly round: 143000000, 167000000, 248000000, +etc. Indeed, a simple experiment revealed that these numbers were +quite far from the actual ticks per second. Typical was the 143 mHz +Ultra which was discovered to tick around 142,980,806 (+/- 10) times +per second. + + Work around: + + Integrated in releases: s297_27 + Duplicate of: + Patch id: + See also: + Summary: diff --git a/contrib/ntp/html/hints/solaris.xtra.4095849 b/contrib/ntp/html/hints/solaris.xtra.4095849 new file mode 100644 index 000000000000..8d3ce8074cfd --- /dev/null +++ b/contrib/ntp/html/hints/solaris.xtra.4095849 @@ -0,0 +1,74 @@ + Bug Id: 4095849 + Category: kernel + Subcategory: syscall + State: evaluated + Synopsis: time_constant value >6 with PLL in use leads to integer divide + zero trap panic + Description: +If the time_constant parameter is 7 or higher, and the phase-lock looping model +is in use, the system will take a "integer divide zero trap" panic in +the clock routine as soon as the time_offset becomes non-zero. + +time_constant defaults to 0. The only place it is set is in the ntp_adjtime +system call, from the 'constant' element of the timex structure argument. + + Work around: +Never set the constant element of the timex structure passed to ntp_adjtime to +a value larger than 6. + +satish.mynam@Eng 1998-04-30 +1. Use Sun's version of NTP software instead of PD version. This problem +is not seen with Sun's NTP version (which is mostly eqivalent to PD NTP 3.4 +plus some Sun's local functionality futures). + +2. Workaround for the public domain NTP version ONLY: + ===================================================== +The workaround for public domain NTP version is to disable the +KERNEL_PLL from the NTP code. This way ntp_Adjtime() system call is +totally bypassed without sacrificing any of the functionality of the +NTP. The only hit you might see is the way kernel precision timminig +is done without the PLL algorithm in the kernel. + + The easiest way to disable ntp_adjtime option is(without changing + any makefiles or other config files) to disable the KERNEL_PLL + value in the ./config.h file. + +After doing a ./configure for probing for all the necessary tools(compilers, +os version, libraries), please comment out KERNEL_PLL macro in +the ./config.h file. This will disable the KERNEL_PLL part of the source +code and the newly obtained xntpd is just similar to the old one but it +does not use ntp_adjtime() system call. This prevents it from panic'ng +the kernel. + +/*#define KERNEL_PLL 1*/ + +I complied a new xntpd binary this way and it does nothave any ntp_adjtime() +related stuff. + +Default: +======= +/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings +xntpd | +grep ntp_adjtime +354:adj_frequency: ntp_adjtime failed: %m +357:loop_config: ntp_adjtime() failed: %m +435:get_kernel_info: ntp_adjtime() failed: %m + +With KERNEL_PLL disabled in config.h file +-======================= + +/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings +xntpd.nopll | grep ntp_adjtime + + Integrated in releases: + Duplicate of: + Patch id: + See also: 4133517 + Summary: +If the time_constant parameter is 7 or higher, and the phase-lock looping model +is in use, the system will take a "integer divide zero trap" panic in +the clock routine as soon as the time_offset becomes non-zero. + +time_constant defaults to 0. The only place it is set is in the ntp_adjtime +system call, from the 'constant' element of the timex structure argument. +---------------------------------------------------------------------------- diff --git a/contrib/ntp/html/hints/solaris.xtra.S99ntpd b/contrib/ntp/html/hints/solaris.xtra.S99ntpd new file mode 100644 index 000000000000..33662ba73fd0 --- /dev/null +++ b/contrib/ntp/html/hints/solaris.xtra.S99ntpd @@ -0,0 +1,20 @@ +#!/bin/sh +if [ $1 = "start" ]; then + if [ -x /usr/local/bin/xntpd ]; then + echo "Starting NTP daemon, takes about 1 minute... " + # The following line is unnecessary if you turn off + # dosynctodr in /etc/system. + /usr/local/bin/tickadj -s + /usr/local/bin/ntpdate -v server1 server2 + sleep 5 + /usr/local/bin/xntpd + fi +else + if [ $1 = "stop" ]; then + pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` + if [ "${pid}" != "" ]; then + echo "Stopping Network Time Protocol daemon " + /usr/bin/kill ${pid} + fi + fi +fi diff --git a/contrib/ntp/html/hints/solaris.xtra.patchfreq b/contrib/ntp/html/hints/solaris.xtra.patchfreq new file mode 100644 index 000000000000..9600881500e8 --- /dev/null +++ b/contrib/ntp/html/hints/solaris.xtra.patchfreq @@ -0,0 +1,85 @@ +#!/bin/ksh + +# +# File: patchfreq +# Author: Bryan Cantrill (bmc@eng.sun.com), Solaris Performance +# Modified: Sat Apr 26 04:00:59 PDT 1997 +# +# This is a little script to patch a 5.5 or 5.5.1 kernel to get around +# the cpu_tick_freq inaccuracy. Before running this script, one must +# know the true frequency of one's CPU; this can be derived by NTP, +# or by observing the clock relative to the time-of-day chip over a +# long period of time (the TOD will pull system time when it drifts +# by more than two seconds). +# +# Patching a kernel can render a machine unbootable; do not run this +# script unless you are prepared to accept that possibility. It +# is advisable to have a backout path (e.g. net booting, an alternate +# boot disk, an installation CD) should your machine fail to boot. +# +# This is not a product of Sun Microsystems, and is provided "as is", +# without warranty of any kind expressed or implied including, but not +# limited to, the suitability of this script for any purpose. +# + +if [ $# -eq 0 ]; then + echo "Usage: $0 cpu_tick_freq [ alternate_kernel ]" + exit 1 +fi + +cpu_tick_freq=$1 +kernel=/platform/sun4u/kernel/unix + +if [ $# -eq 2 ]; then + kernel=$2 +fi + +if [ ! -w $kernel ]; then + echo "$0: Cannot open $kernel for writing." + exit 1 +fi + +arch=`echo utsname+404?s | adb $kernel | cut -d: -f2` + +if [ ! $arch = "sun4u" ]; then + echo "Patch only applies to sun4u" + exit 1 +fi + +rel=`echo utsname+202?s | adb $kernel | cut -d: -f2` + +if [ ! $rel = "5.5" ] && [ ! $rel = "5.5.1" ]; then + echo "Patch only applies to 5.5 or 5.5.1..." + exit 1 +fi + +nop="1000000" # nop +store_mask="ffffe000" # mask out low 13 bits +store="da256000" # st %o5, [%l5 + offset] + +instr=`echo setcpudelay+34?X | adb $kernel | cut -d: -f 2 | nawk '{ print $1 }'` + +if [ $instr = $nop ]; then + echo "Instruction already patched..." +else + let masked="(16#$store_mask & 16#$instr) - 16#$store" + if [ $masked -ne 0 ]; then + echo "Couldn't find instruction to patch; aborting." + exit 1 + fi + + if ! echo setcpudelay+34?W $nop | adb -w $kernel 1> /dev/null + then + echo "adb returned an unexpected error; aborting." + fi +fi + +echo "Patching cpu_tick_freq to $cpu_tick_freq..." + +if ! echo cpu_tick_freq?W 0t$cpu_tick_freq | adb -w $kernel 1> /dev/null; then + echo "adb returned an unexpected error; aborting." + exit 1 +fi + +echo "$kernel successfully patched." +exit 0 diff --git a/contrib/ntp/html/hints/sun4 b/contrib/ntp/html/hints/sun4 new file mode 100644 index 000000000000..424fa1873824 --- /dev/null +++ b/contrib/ntp/html/hints/sun4 @@ -0,0 +1,15 @@ +Notes on CPU clock oscillator tolerance with SunOS 4.1.1 and 4.1.3 + +A bug in SunOS 4.1.1 results in the kernel time losing 1 microsecond +per tick of the system clock. The bug was fixed (bugid 1094383) for +SunOS 4.1.1 and corrected in SunOS 4.1.3. The easiest way to fix this +is to replace the 4.1.1 binary clock.o with the corresponding 4.1.3 +binary. Without this change it is necessary to use the tickadj program +included in this distribution with the -t 9999 option. + +The tickadj option will work in all cases except when the kernel has +been modified to correct the CPU clock oscillator frequency using a +1-pps signal from a precision source. The bugfix must be installed for +this wrinkle to work properly. + +Dave Mills (mills@udel.edu) diff --git a/contrib/ntp/html/hints/svr4-dell b/contrib/ntp/html/hints/svr4-dell new file mode 100644 index 000000000000..2c92f8a6337e --- /dev/null +++ b/contrib/ntp/html/hints/svr4-dell @@ -0,0 +1,8 @@ +Notes on the DELL SVR4. + +You should use -DSETTIMEOFDAY_BROKEN. + +Philip.Gladstone@mail.citicorp.com + +(XXX But there is no checking for SETTIMEOFDAY_BROKEN in the code) + diff --git a/contrib/ntp/html/hints/svr4_package b/contrib/ntp/html/hints/svr4_package new file mode 100644 index 000000000000..b9f5ca391f34 --- /dev/null +++ b/contrib/ntp/html/hints/svr4_package @@ -0,0 +1,33 @@ +Date: Wed, 12 Apr 1995 12:42:03 +0100 +Message-ID: <513.797686923@concurrent.co.uk> +From: Andy Chittenden <asc@concurrent.co.uk> + +Dave + +Here is a uuencoded, compressed tar file. The only file I've +changed is Makefile - I've included the full file rather than diffs. +There are some new files as well: + + xntp shell script that starts up ntp during boot up + (the packaging stuff creates links to it so it comes + up at run level 2). As with all svr4 start/stop + scripts, it takes one parameter which is either + start or stop. It assumes that ntp.conf is in + /etc/inet/ntp.conf (where it should be on svr4 + machines). + prototype describes the file contents of the package. + You might like to review its contents to + see whether you want to include any other + files or remove some. NB I've made the man + pages go into 1m as they should on svr4. + preinstall runs before installation takes place. It + ensures that ntp is down if it is up before + installing a replacement package + postinstall starts up ntp after package installation. + preremove brings down ntp before removing the package. + +You create a package using "make package". This creates a file +called xntp.pkg. To install this package, you use +"pkgadd -d `pwd`/xntp.pkg xntp". This will start up ntp if +/etc/inet/ntp.conf exists. If you don't want the package anymore, use +"pkgrm xntp". I have tested this on Solaris 2.4. diff --git a/contrib/ntp/html/hints/todo b/contrib/ntp/html/hints/todo new file mode 100644 index 000000000000..e0e5ffa37696 --- /dev/null +++ b/contrib/ntp/html/hints/todo @@ -0,0 +1,4 @@ +Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>: + Any change in a source file in the lib directory causes all files to + be recompiled (because the objects are removed). Add a better rule for + make to update the library. Maybe just remove "-rm -f $?". diff --git a/contrib/ntp/html/hints/vxworks.html b/contrib/ntp/html/hints/vxworks.html new file mode 100644 index 000000000000..4df83c5afd56 --- /dev/null +++ b/contrib/ntp/html/hints/vxworks.html @@ -0,0 +1,18 @@ +<HTML> +<HEAD> + <TITLE>vxWorks Port of NTP</TITLE> +</HEAD> +<BODY LINK="#00008B" VLINK="#8B0000"> + +<H1>VxWorks port of NTP </H1> + +<P>Please look at the <A HREF="../vxworks.htm">Vxworks file</A> in the html directory.
+ +<P>Casey Crellin</A> <BR>
+<A HREF="mailto:casey@csc.co.za">casey@csc.co.za</A> </P>
+ +<P><BR> +</P> + +</BODY> +</HTML> diff --git a/contrib/ntp/html/hints/winnt b/contrib/ntp/html/hints/winnt new file mode 100644 index 000000000000..6fd7c84aa74d --- /dev/null +++ b/contrib/ntp/html/hints/winnt @@ -0,0 +1,207 @@ +------------- +INTRODUCTION: +------------- +Last revision 27 July 1999 Version 4.0.95. + +This version compiles under WINNT with Visual C 6.0. + +Greg Brackley and Sven Dietrich + +Significant changes: +-Visual Studio v6.0 support +-Winsock 2.0 support +-Use of I/O completion ports for sockets and comm port I/O +-Removed the use of multimedia timers (from ntpd, others need removing) +-Use of waitable timers (with user mode APC) and performance counters to fake getting a better time +-Trimble Palisade NTP Reference Clock support +-General cleanup, prototyping of functions +-Moved receiver buffer code to a separate module (removed unused members from the recvbuff struct) +-Moved io signal code to a separate module + +Compiling Instructions: +1. Requires Perl to be installed, and the Perl environment variable to be set correctly +2. Open the .\ports\winnt\ntp.dsw +3. Batch build of all debug projects compile + + +Last revision: 20-Oct-1996 + +This version corrects problems with building the XNTP +version 3.5-86 distribution under Windows NT. + +The following files were modified: + blddbg.bat + bldrel.bat + include\ntp_machine.h + xntpd\ntp_unixclock.c + xntpd\ntp_refclock.c + scripts\wininstall\build.bat + scripts\wininstall\setup.rul + scripts\wininstall\readme.nt + scripts\wininstall\distrib\ntpog.wri + html\hints\winnt (this file) + +In order to build the entire Windows NT distribution you +need to modify the file scripts\wininstall\build.bat +with the installation directory of the InstallShield +software. Then, simply type "bldrel" for non-debug +or "blddbg" for debug executables. + + + +Greg Schueman + <schueman@acm.org> + + +Last revision: 07-May-1996 + +This set of changes fixes all known bugs, and it includes +several major enhancements. + +Many changes have been made both to the build environment as +well as the code. There is no longer an ntp.mak file, instead +there is a buildntall.bat file that will build the entire +release in one shot. The batch file requires Perl. Perl +is easily available from the NT Resource Kit or on the Net. + +The multiple interface support was adapted from Larry Kahn's +work on the BIND NT port. I have not been able to test it +adequately as I only have NT servers with one network +interfaces on which to test. + +Enhancements: +* Event Logging now works correctly. +* Version numbers now work (requires Perl during build) +* Support for multiple network interface cards (untested) +* NTP.CONF now default, but supports ntp.ini if not found +* Installation procedure automated. +* All paths now allow environment variables such as %windir% + +Bug fixes: +* INSTSRV replaced, works correctly +* Cleaned up many warnings +* Corrected use of an uninitialized variable in XNTPD +* Fixed ntpdate -b option +* Fixed ntpdate to accept names as well as IP addresses + (Winsock WSAStartup was called after a gethostbyname()) +* Fixed problem with "longjmp" in xntpdc/ntpdc.c that + caused a software exception on doing a Control-C in xntpdc. + A Cntrl-C now terminates the program. + +See below for more detail: + + Note: SIGINT is not supported for any Win32 application including + Windows NT and Windows 95. When a CTRL+C interrupt occurs, Win32 + operating systems generate a new thread to specifically handle that + interrupt. This can cause a single-thread application such as UNIX, + to become multithreaded, resulting in unexpected behavior. + + +Possible enhancements and things left to do: +* Reference clock drivers for NT (at least Local Clock support) +* Control Panel Applet +* InstallShield based installation, like NT BIND has +* Integration with NT Performance Monitor +* SNMP integration +* Fully test multiple interface support + + +Known problems: +* bug in ntptrace - if no Stratum 1 servers are available, + such as on an IntraNet, the application crashes. + + + + +Last revision: 12-Apr-1995 + + +This NTPv3 distribution includes a sample configuration file and the project +makefiles for WindowsNT 3.5 platform using Microsoft Visual C++ 2.0 compiler. +Also included is a small routine to install the NTP daemon as a "service" +on a WindowsNT box. Besides xntpd, the utilities that have been ported are +ntpdate and xntpdc. The port to WindowsNT 3.5 has been tested using a Bancomm +TimeServe2000 GPS receiver clock that acts as a strata 1 NTP server with no +authentication (it has not been tested with any refclock drivers compiled in). +Following are the known flaws in this port: +1) currently, I do not know of a way in NT to get information about multiple + network interface cards. The current port uses just one socket bound to + INADDR_ANY address. Therefore when dealing with a multihomed NT time server, + clients should point to the default address on the server (otherwise the + reply is not guaranteed to come from the same interface to which the + request was sent). Working with Microsoft to get this resolved. +2) There is some problem with "longjmp" in xntpdc/ntpdc.c that causes a + software exception on doing a Control-C in xntpdc. Be patient! +3) The error messages logged by xntpd currently contain only the numerical + error code. Corresponding error message string has to be looked up in + "Books Online" on Visual C++ 2.0 under the topic "Numerical List of Error + Codes". + + +---------------------------------------------------- +MAKING XNTPD FOR WindowsNT 3.5 using Visual C++ 2.0: +---------------------------------------------------- + +Separate projects are needed for xntpd, ntpdate, xntpdc, and the library +containing routines used by them. + +1) First build the static library composed of routines in the lib + subdirectory of the distribution. Load the project by opening the + corresponding makefile libntp.mak (in the lib subdirectory of the + distribution) by choosing the Open option in the File menu. This should + display a list of files contained in this project. Then choose the + "Rebuild All" option from the Project menu in order to compile the + routines into a library. The libntp.lib static library is created in + the lib/WinDebug directory + + You can now choose to build xntpd, ntpdate, and xntpdc in any order. + +2) To build xntpd, load the project by opening the corresponding makefile + xntpd.mak (in the xntpd subdirectory of the distribution), and rebuild + all files. The xntpd.exe executable is created in the xntpd/WinDebug + directory. + +3) repeat the above step for ntpdate and xntpdc + + +------------------------------------------------- +INSTALLING XNTPD AS A SERVICE UNDER WindowsNT 3.5 +------------------------------------------------- + +At this point you need to install 'xntpd' as a service. First modify the +sample configuration file conf/config.winnt35 in the distribution to +suit your needs. Then install it as "%SystemRoot%\NTP.INI" (%SystemRoot% +is an environmental variable that can be determined by typing "set" at +the "Command Prompt" or from the "System" icon in the "Control Panel", +NTP.INI is the suggested name for the "ntp.conf" file in Windows environment). +The instsrv.c program in the util subdirectory of the distribution can +be used to install 'xntpd' as a service and start automatically at boot +time. Compile instsrv.c, and enter form the command prompt + "instsrv.exe NetWorkTimeProtocol <pathname_for_xntd.exe>" +Clicking on the "Services" icon in the "Control Panel" ("Main" group +in the "Program Manager") will display the list of currently installed +services in a dialog box. The NetworkTimeProtocol service should show +up in this list. Select it in the list and hit the "Start" button in +the dialog box. The NTP service should start. View the event log by +clicking on the "Event Viewer" icon in the "Administrative Tools" group +of the "Program Manager", there should be several successful startup +messages from NTP. NTP will keep running and restart automatically when +the machine is rebooted. + +You can change the start mode (automatic/manual) and other startup +parameters correponding to the NTP service (eg. location of conf file) +also in the "Services" dialog box if you wish. + +There is no clean way to run 'ntpdate' before starting 'xntpd' at boot +time, unlike the Unix environment. 'xntpd' will step the clock upto +a 1000 seconds. While there is no reason that the system clock should +be that much off during bootup if 'xntpd' was running before bootup, +you may want to increase the CLOCK_WAYTOOBIG parameter in include/ntp.h +from 1000 to, say, MAXINT. + +You can also use instsrv.c to delete the NTP service + "instsrv.exe NetworkTimeProtocol remove" + + +Viraj Bais +<vbais@mailman1.intel.com> |