1*abb0f93cSkardelLast update: Sun Mar 13 15:05:31 PST 1994 2*abb0f93cSkardel 3*abb0f93cSkardelThis file hopefully describes the whatever and however of how to get xntp 4*abb0f93cSkardelrunning on hpux 7.0 and later s300. s400, s700, and s800. 5*abb0f93cSkardel 6*abb0f93cSkardelFirst off, all the standard disclaimers hold here ... HP doesn't have anthing 7*abb0f93cSkardelto do with this stuff. I fool with it in my spare time because we use it and 8*abb0f93cSkardelbecause I like to. We just happen to have a lot of HP machines around here :-) 9*abb0f93cSkardelXntpd has been in use here for several years and has a fair amount of mileage 10*abb0f93cSkardelon various HP platforms within the company. I can't really guarantee bug fixes 11*abb0f93cSkardelbut I'd certainly like to hear about bugs and I won't hestitate to look at 12*abb0f93cSkardelany fixes sent to me. 13*abb0f93cSkardel 14*abb0f93cSkardelNow lets talk OS. If you don't have 7.0 or later, pretty much hang it up now. 15*abb0f93cSkardelThis stuff has run here on pretty much everything from 8.0 upward on s300, 16*abb0f93cSkardels700, and s800. It is known to run on 7.0 s300/s400 but all reports are 17*abb0f93cSkardelfrom the field and not my personal experience. 18*abb0f93cSkardel 19*abb0f93cSkardelIf you are lucky enough to have a s300 or s400 with 9.03, then you no longer 20*abb0f93cSkardelhave to worry about adjtimed as HP-UX now has adjtime(2). The rest of you 21*abb0f93cSkardelwill have to wait on 10.0 which will have adjtime(2) and a supported though 22*abb0f93cSkardela bit older version of xntpd. 23*abb0f93cSkardel 24*abb0f93cSkardelNext, let me explain a bit about how this stuff works on HP-UX's that do not 25*abb0f93cSkardelhave adjtime(2). The directory adjtime contains libadjtime.a and the adjtimed 26*abb0f93cSkardeldaemon. Instead of the adjtime(2) system call, we use a library routine to 27*abb0f93cSkardeltalk to adjtimed thru message queues. Adjtimed munges into /dev/kmem and 28*abb0f93cSkardelcauses the clock to skew properly as needed. PLEASE NOTE that the adjtime 29*abb0f93cSkardelcode provided here is NOT a general replacement for adjtime(2) ... use of 30*abb0f93cSkardelthis adjtime(3)/adjtimed(8) other than with xntpd may yield very odd results. 31*abb0f93cSkardel 32*abb0f93cSkardelWhat to do to get this stuff running ? 33*abb0f93cSkardel 34*abb0f93cSkardel * If you are running an OS less than 10.0 or do not have a s300/s400 35*abb0f93cSkardel with 9.03 or better 36*abb0f93cSkardel -> cd machines 37*abb0f93cSkardel -> vi hpux 38*abb0f93cSkardel -> (change -DSYS_HPUX=? to match whatever you are running [7,8,9]) 39*abb0f93cSkardel -> cd .. 40*abb0f93cSkardel 41*abb0f93cSkardel * Say "make makeconfig" 42*abb0f93cSkardel 43*abb0f93cSkardel * Say "make", sit back for a few minutes. 44*abb0f93cSkardel 45*abb0f93cSkardel * cd authstuff 46*abb0f93cSkardel * Say "./authcert < certdata" and check the output. Every line should 47*abb0f93cSkardel end with "OK" ... if not, we got trouble. 48*abb0f93cSkardel * Now try "./authspeed auth.samplekeys". What we want to 49*abb0f93cSkardel remember here is the "authentication delay in CPU time" 50*abb0f93cSkardel * cd .. 51*abb0f93cSkardel 52*abb0f93cSkardel * Say "make install" 53*abb0f93cSkardel 54*abb0f93cSkardel * I'd suggest reading the xntp docs about now :-) ... seriously !! 55*abb0f93cSkardel 56*abb0f93cSkardel * One thing I have added to this version of xntpd is a way to select 57*abb0f93cSkardel config files if you are sharing /usr/local thru NFS or whatever. 58*abb0f93cSkardel If the file /usr/local/etc/xntp.conf happens to be a directory, the 59*abb0f93cSkardel files in that directory are searched until a match is found. The 60*abb0f93cSkardel rules for a match are: 61*abb0f93cSkardel 62*abb0f93cSkardel 1. Our hostname 63*abb0f93cSkardel 2. default.<machine id> (as in default.375 or default.850) 64*abb0f93cSkardel 3. default 65*abb0f93cSkardel 66*abb0f93cSkardel * Ok, make sure adjtimed is running (just start it up for now with 67*abb0f93cSkardel "/usr/local/etc/adjtimed"). Using -z as an option will get you 68*abb0f93cSkardel a usage message. 69*abb0f93cSkardel 70*abb0f93cSkardel * Now start up xntpd and watch it work. 71*abb0f93cSkardel 72*abb0f93cSkardel * Make sure that adjtimed gets started at boot right before xntpd. 73*abb0f93cSkardel We do this in /etc/netbsdsrc. They must both run as root !! 74*abb0f93cSkardel 75*abb0f93cSkardelPossible problems ? 76*abb0f93cSkardel 77*abb0f93cSkardel * On some 320's and 835's we have had to run adjtimed with "-p 45" or 78*abb0f93cSkardel so to get rid of syslog messages about "last adjust did not finish". 79*abb0f93cSkardel 80*abb0f93cSkardel * At 9.0, there is a problem with DIAGMON (patch available from the 81*abb0f93cSkardel response center) which causes it to delete the message queue that 82*abb0f93cSkardel adjtimed/xntpd use to communicate. (see next note for result) 83*abb0f93cSkardel 84*abb0f93cSkardel * Xntpd has been known to get really ticked off when adjtime() fails 85*abb0f93cSkardel which is usually only while running the emulation code on HP-UX. 86*abb0f93cSkardel When it gets mad, it usually jumps the clock into never never land. 87*abb0f93cSkardel Possible reasons for this are adjtimed being killed or just never 88*abb0f93cSkardel started or adjtimed being completely swapped out on a really busy 89*abb0f93cSkardel machine (newer adjtimed try to lock themselves in memory to prevent 90*abb0f93cSkardel this one). 91*abb0f93cSkardel 92*abb0f93cSkardelAnything else ... just drop me a line at ken@sdd.hp.com 93*abb0f93cSkardel 94*abb0f93cSkardelReceived: from louie.udel.edu by huey.udel.edu id aa14418; 15 Jun 95 9:19 EDT 95*abb0f93cSkardelReceived: from host5.colby.edu (host-05.colby.edu) by host-04.colby.edu with ESMTP (1.37.109.15/Colby 1.1) 96*abb0f93cSkardel id AA165442355; Thu, 15 Jun 1995 09:19:16 -0400 97*abb0f93cSkardelReceived: by host5.colby.edu (1.37.109.15/Colby 1.1) 98*abb0f93cSkardel id AA056252339; Thu, 15 Jun 1995 09:18:59 -0400 99*abb0f93cSkardelDate: Thu, 15 Jun 1995 09:18:59 -0400 (EDT) 100*abb0f93cSkardelFrom: "Jeff A. Earickson" <jaearick@colby.edu> 101*abb0f93cSkardelTo: Mills@huey.udel.edu 102*abb0f93cSkardelSubject: More minor bugs in xntp3.4s 103*abb0f93cSkardelIn-Reply-To: <9506150022.aa12727@huey.udel.edu> 104*abb0f93cSkardelMessage-Id: <Pine.HPP.3.91.950615083549.4557A-100000@host5.colby.edu> 105*abb0f93cSkardelMime-Version: 1.0 106*abb0f93cSkardelContent-Type: TEXT/PLAIN; charset=US-ASCII 107*abb0f93cSkardel 108*abb0f93cSkardelDave, 109*abb0f93cSkardel After reading the hpux hints file, I realized I didn't install or 110*abb0f93cSkardelstart adjtimed. In the course of doing this, I discovered that: 111*abb0f93cSkardel 112*abb0f93cSkardel--> $(TOP) is not defined in adjtime/Makefile, so "make install" can't 113*abb0f93cSkardel find the install.sh script. 114*abb0f93cSkardel 115*abb0f93cSkardel--> "make install" from the main Makefile never goes into the adjtime 116*abb0f93cSkardel directory, so I added the following two lines into the install 117*abb0f93cSkardel target of the main Makefile: 118*abb0f93cSkardel 119*abb0f93cSkardel @echo installing from adjtime 120*abb0f93cSkardel @cd adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" install 121*abb0f93cSkardel 122*abb0f93cSkardelThis twiddle may not be right for all systems, but it got adjtimed 123*abb0f93cSkardelinstalled for me. 124*abb0f93cSkardel 125*abb0f93cSkardel You might also want to add to the hpux hints file that one way to 126*abb0f93cSkardelfire things up at boot time is to add the following lines to the localrc 127*abb0f93cSkardelfunction of /etc/rc: 128*abb0f93cSkardel 129*abb0f93cSkardel #---daemons for Network Time Protocol (version 3.4s) 130*abb0f93cSkardel #---note that adjtimed is only needed for HP-UX 9.X, not 10.0 131*abb0f93cSkardel #---adjtimed must be running or xntpd won't work right... 132*abb0f93cSkardel if [ -x /usr/local/bin/adjtimed ]; then 133*abb0f93cSkardel /usr/local/bin/adjtimed -r & echo -n ' adjtimed' 134*abb0f93cSkardel if [ -x /usr/local/bin/xntpd ]; then 135*abb0f93cSkardel /usr/local/bin/xntpd & echo -n ' xntpd' 136*abb0f93cSkardel fi 137*abb0f93cSkardel fi 138*abb0f93cSkardel 139*abb0f93cSkardelI discovered that the "-r" option of adjtimed is needed to clear out any 140*abb0f93cSkardeltrash from a previous execution of it. Otherwise adjtimed quietly dies 141*abb0f93cSkardeland leaves xntpd in the lurch... 142*abb0f93cSkardel 143*abb0f93cSkardelThanks for the help. 144*abb0f93cSkardel 145*abb0f93cSkardel** Jeff A. Earickson, Ph.D PHONE: 207-872-3659 146*abb0f93cSkardel** Senior UNIX Sysadmin, Information Technology EMAIL: jaearick@colby.edu 147*abb0f93cSkardel** Colby College, 4214 Mayflower Hill, FAX: 207-872-3555 148*abb0f93cSkardel** Waterville ME, 04901-8842 149*abb0f93cSkardel 150*abb0f93cSkardelOn Thu, 15 Jun 1995 Mills@huey.udel.edu wrote: 151*abb0f93cSkardel 152*abb0f93cSkardel> Jeff, 153*abb0f93cSkardel> 154*abb0f93cSkardel> Read the hpux file in the hints directory. 155*abb0f93cSkardel> 156*abb0f93cSkardel> Dave 157*abb0f93cSkardel> 158*abb0f93cSkardel 159