1181834SrobertoLast update: Sun Mar 13 15:05:31 PST 1994 2181834Sroberto 3181834SrobertoThis file hopefully describes the whatever and however of how to get xntp 4181834Srobertorunning on hpux 7.0 and later s300. s400, s700, and s800. 5181834Sroberto 6181834SrobertoFirst off, all the standard disclaimers hold here ... HP doesn't have anthing 7181834Srobertoto do with this stuff. I fool with it in my spare time because we use it and 8181834Srobertobecause I like to. We just happen to have a lot of HP machines around here :-) 9181834SrobertoXntpd has been in use here for several years and has a fair amount of mileage 10181834Srobertoon various HP platforms within the company. I can't really guarantee bug fixes 11181834Srobertobut I'd certainly like to hear about bugs and I won't hestitate to look at 12181834Srobertoany fixes sent to me. 13181834Sroberto 14181834SrobertoNow lets talk OS. If you don't have 7.0 or later, pretty much hang it up now. 15181834SrobertoThis stuff has run here on pretty much everything from 8.0 upward on s300, 16181834Srobertos700, and s800. It is known to run on 7.0 s300/s400 but all reports are 17181834Srobertofrom the field and not my personal experience. 18181834Sroberto 19181834SrobertoIf you are lucky enough to have a s300 or s400 with 9.03, then you no longer 20181834Srobertohave to worry about adjtimed as HP-UX now has adjtime(2). The rest of you 21181834Srobertowill have to wait on 10.0 which will have adjtime(2) and a supported though 22181834Srobertoa bit older version of xntpd. 23181834Sroberto 24181834SrobertoNext, let me explain a bit about how this stuff works on HP-UX's that do not 25181834Srobertohave adjtime(2). The directory adjtime contains libadjtime.a and the adjtimed 26181834Srobertodaemon. Instead of the adjtime(2) system call, we use a library routine to 27181834Srobertotalk to adjtimed thru message queues. Adjtimed munges into /dev/kmem and 28181834Srobertocauses the clock to skew properly as needed. PLEASE NOTE that the adjtime 29181834Srobertocode provided here is NOT a general replacement for adjtime(2) ... use of 30181834Srobertothis adjtime(3)/adjtimed(8) other than with xntpd may yield very odd results. 31181834Sroberto 32181834SrobertoWhat to do to get this stuff running ? 33181834Sroberto 34181834Sroberto * If you are running an OS less than 10.0 or do not have a s300/s400 35181834Sroberto with 9.03 or better 36181834Sroberto -> cd machines 37181834Sroberto -> vi hpux 38181834Sroberto -> (change -DSYS_HPUX=? to match whatever you are running [7,8,9]) 39181834Sroberto -> cd .. 40181834Sroberto 41181834Sroberto * Say "make makeconfig" 42181834Sroberto 43181834Sroberto * Say "make", sit back for a few minutes. 44181834Sroberto 45181834Sroberto * cd authstuff 46181834Sroberto * Say "./authcert < certdata" and check the output. Every line should 47181834Sroberto end with "OK" ... if not, we got trouble. 48181834Sroberto * Now try "./authspeed auth.samplekeys". What we want to 49181834Sroberto remember here is the "authentication delay in CPU time" 50181834Sroberto * cd .. 51181834Sroberto 52181834Sroberto * Say "make install" 53181834Sroberto 54181834Sroberto * I'd suggest reading the xntp docs about now :-) ... seriously !! 55181834Sroberto 56181834Sroberto * One thing I have added to this version of xntpd is a way to select 57181834Sroberto config files if you are sharing /usr/local thru NFS or whatever. 58181834Sroberto If the file /usr/local/etc/xntp.conf happens to be a directory, the 59181834Sroberto files in that directory are searched until a match is found. The 60181834Sroberto rules for a match are: 61181834Sroberto 62181834Sroberto 1. Our hostname 63181834Sroberto 2. default.<machine id> (as in default.375 or default.850) 64181834Sroberto 3. default 65181834Sroberto 66181834Sroberto * Ok, make sure adjtimed is running (just start it up for now with 67181834Sroberto "/usr/local/etc/adjtimed"). Using -z as an option will get you 68181834Sroberto a usage message. 69181834Sroberto 70181834Sroberto * Now start up xntpd and watch it work. 71181834Sroberto 72181834Sroberto * Make sure that adjtimed gets started at boot right before xntpd. 73181834Sroberto We do this in /etc/netbsdsrc. They must both run as root !! 74181834Sroberto 75181834SrobertoPossible problems ? 76181834Sroberto 77181834Sroberto * On some 320's and 835's we have had to run adjtimed with "-p 45" or 78181834Sroberto so to get rid of syslog messages about "last adjust did not finish". 79181834Sroberto 80181834Sroberto * At 9.0, there is a problem with DIAGMON (patch available from the 81181834Sroberto response center) which causes it to delete the message queue that 82181834Sroberto adjtimed/xntpd use to communicate. (see next note for result) 83181834Sroberto 84181834Sroberto * Xntpd has been known to get really ticked off when adjtime() fails 85181834Sroberto which is usually only while running the emulation code on HP-UX. 86181834Sroberto When it gets mad, it usually jumps the clock into never never land. 87181834Sroberto Possible reasons for this are adjtimed being killed or just never 88181834Sroberto started or adjtimed being completely swapped out on a really busy 89181834Sroberto machine (newer adjtimed try to lock themselves in memory to prevent 90181834Sroberto this one). 91181834Sroberto 92181834SrobertoAnything else ... just drop me a line at ken@sdd.hp.com 93181834Sroberto 94181834SrobertoReceived: from louie.udel.edu by huey.udel.edu id aa14418; 15 Jun 95 9:19 EDT 95181834SrobertoReceived: from host5.colby.edu (host-05.colby.edu) by host-04.colby.edu with ESMTP (1.37.109.15/Colby 1.1) 96181834Sroberto id AA165442355; Thu, 15 Jun 1995 09:19:16 -0400 97181834SrobertoReceived: by host5.colby.edu (1.37.109.15/Colby 1.1) 98181834Sroberto id AA056252339; Thu, 15 Jun 1995 09:18:59 -0400 99181834SrobertoDate: Thu, 15 Jun 1995 09:18:59 -0400 (EDT) 100181834SrobertoFrom: "Jeff A. Earickson" <jaearick@colby.edu> 101181834SrobertoTo: Mills@huey.udel.edu 102181834SrobertoSubject: More minor bugs in xntp3.4s 103181834SrobertoIn-Reply-To: <9506150022.aa12727@huey.udel.edu> 104181834SrobertoMessage-Id: <Pine.HPP.3.91.950615083549.4557A-100000@host5.colby.edu> 105181834SrobertoMime-Version: 1.0 106181834SrobertoContent-Type: TEXT/PLAIN; charset=US-ASCII 107181834Sroberto 108181834SrobertoDave, 109181834Sroberto After reading the hpux hints file, I realized I didn't install or 110181834Srobertostart adjtimed. In the course of doing this, I discovered that: 111181834Sroberto 112181834Sroberto--> $(TOP) is not defined in adjtime/Makefile, so "make install" can't 113181834Sroberto find the install.sh script. 114181834Sroberto 115181834Sroberto--> "make install" from the main Makefile never goes into the adjtime 116181834Sroberto directory, so I added the following two lines into the install 117181834Sroberto target of the main Makefile: 118181834Sroberto 119181834Sroberto @echo installing from adjtime 120181834Sroberto @cd adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" install 121181834Sroberto 122181834SrobertoThis twiddle may not be right for all systems, but it got adjtimed 123181834Srobertoinstalled for me. 124181834Sroberto 125181834Sroberto You might also want to add to the hpux hints file that one way to 126181834Srobertofire things up at boot time is to add the following lines to the localrc 127181834Srobertofunction of /etc/rc: 128181834Sroberto 129181834Sroberto #---daemons for Network Time Protocol (version 3.4s) 130181834Sroberto #---note that adjtimed is only needed for HP-UX 9.X, not 10.0 131181834Sroberto #---adjtimed must be running or xntpd won't work right... 132181834Sroberto if [ -x /usr/local/bin/adjtimed ]; then 133181834Sroberto /usr/local/bin/adjtimed -r & echo -n ' adjtimed' 134181834Sroberto if [ -x /usr/local/bin/xntpd ]; then 135181834Sroberto /usr/local/bin/xntpd & echo -n ' xntpd' 136181834Sroberto fi 137181834Sroberto fi 138181834Sroberto 139181834SrobertoI discovered that the "-r" option of adjtimed is needed to clear out any 140181834Srobertotrash from a previous execution of it. Otherwise adjtimed quietly dies 141181834Srobertoand leaves xntpd in the lurch... 142181834Sroberto 143181834SrobertoThanks for the help. 144181834Sroberto 145181834Sroberto** Jeff A. Earickson, Ph.D PHONE: 207-872-3659 146181834Sroberto** Senior UNIX Sysadmin, Information Technology EMAIL: jaearick@colby.edu 147181834Sroberto** Colby College, 4214 Mayflower Hill, FAX: 207-872-3555 148181834Sroberto** Waterville ME, 04901-8842 149181834Sroberto 150181834SrobertoOn Thu, 15 Jun 1995 Mills@huey.udel.edu wrote: 151181834Sroberto 152181834Sroberto> Jeff, 153181834Sroberto> 154181834Sroberto> Read the hpux file in the hints directory. 155181834Sroberto> 156181834Sroberto> Dave 157181834Sroberto> 158181834Sroberto 159