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