Operating System - HP-UX
1753710 Members
4679 Online
108799 Solutions
New Discussion юеВ

Date/Time Sync under HP-UX 11.00

 
John Rinehart
Occasional Contributor

Date/Time Sync under HP-UX 11.00

We have been using the program 'Setime.c'(Source magazine article: Sys Admin Vol. 4, No.3. "A Server-Based Date/Time Synchronizer for TCP/IP by Ed Schaefer) under hpux 10.20, without issue for several years. Now under hpux-11.00, it fails every time. We use this on a varity of systems, some that do not support NTP or TSP. Can anyone tell me if either the structures of Date/Time have changed under hpux 11 or if anyone is using Setime successfully under hpux 11? Attached is the source code.
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Date/Time Sync under HP-UX 11.00

Hi John:

Lot's of folks use NTP which comes as a part of HP-UX.

A very simple guide to setting up Network Time Protocol (NTP) is found in the "Installing and Administering Internet Services" manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90685/B2355-90685.html

For a good list of available time sources, see:

http://www.eecis.udel.edu/~mills/ntp/clock1.htm
If you wish to merely synchronize locally take a look at document #A5864817. You can use one of your servers as a "master" clock for the remaining ones without going outside of your local network.

...JRF...
federico_3
Honored Contributor

Re: Date/Time Sync under HP-UX 11.00

Implement NTP on your ?network?

The mechanism which NTP uses to keep systems clocks in syncronization is the following :

From my point of view it's better for you if you keep two NTP peer servers ( if one of these fails there is the other one for the syncronization) with internal system clock as time source and all the other machines as NTP client . This configuration can be done easily with SAM ( Time -> NTP Network time Sources ) or configuring the files /etc/ntp.conf and /etc/rc.config.d/netdaemons as explained in the man xntpd. After this configuration start the Daemon xntpd ( manually doing /sbin/init.d/xntpd start or with SAM -> Start NTP on action)

You could also do like this:
activate the xntpd daemon on one Server (let's say server1) and in the other ones you have to add a cron entry like this:
0 8,16,0 * * * /usr/sbin/ntpdate -s server1

This way it works fine but from my point of view it's better having two peer servers (As explained in the previous mail) in a such way that if one of the ntp client lose connection to one of the ntp servers it's the other one to give the sync.


Federico

John Rinehart
Occasional Contributor

Re: Date/Time Sync under HP-UX 11.00

Thanks for the responces. But as some of the manufacturing equipment that we have does not support NTP, we are forced to correct the 'c' program. The underlaying issue is that HPUX 10.20 & 11.00 have DIFFERENCES in their TCP/IP Port-13 (daytime) reply. hpux 11.00 now includes a TimeZone in it's reply. A stock installation of hpux 10.20 did not include TimeZone in it's reply. We have modified the code to be aware of OS's and their differences.