1833806 Members
3155 Online
110063 Solutions
New Discussion

Re: NTP for hpux11.31

 
Fauziah Mahdan
Super Advisor

NTP for hpux11.31

HI all,
I just set ntp server and client for 2 of my hpux11.31 server.
After start the xntpd service the clock still show the same is there any patches related to this?
17 REPLIES 17
Robert-Jan Goossens
Honored Contributor

Re: NTP for hpux11.31

Hi,

What is the time difference? NTP will slowly adapt the time of the HPUX server to the time of the NTP server.

If you would like to sink the time at once, you can use the ntpdate command.

Just remember that if you have applications running on the HP server and you use the ntpdate command the time will be synced immediate. Question is how will these apps handle this time reset?

If you would like to use ntpdate first stop xntpd, use ntpdate and start xntpd again.

Regards,
Robert-Jan
Fabio Ettore
Honored Contributor

Re: NTP for hpux11.31

Hi,

usually it takes from 5 and 8 minutes to sync. Anyway is the gap from server and client over 15 minutes?

Best regards,
Fabio
WISH? IMPROVEMENT!
Fauziah Mahdan
Super Advisor

Re: NTP for hpux11.31

The problem is when I run ps-ef |grep xntpd no service is running, but already issue xntpd start many time.

The client machine also did not follow NTP server time.
Dennis Handly
Acclaimed Contributor

Re: NTP for hpux11.31

>no service is running, but already issue xntpd start many time.

Have you tried looking at syslog.log and maybe /etc/rc.log for errors/excuses?
Steven E. Protter
Exalted Contributor

Re: NTP for hpux11.31

Shalom,

ntp will not handle discrepancies that are too large. To deal with this, you must manually adjust your system clock to within an hour of real time.

Note: You should not roll a system time back with a running oracle database open. Doing so will likely cause it to crash.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fabio Ettore
Honored Contributor

Re: NTP for hpux11.31

Hi,

xntpd dies on clinet if gap from server is too large, that's the reason why I asked if the gap is over 15 minutes on my first post.

See also this from man of xntpd:

The NTP daemon has three regimes in which it operates:

offset below 128 milliseconds
This is the normal operating regime of NTP. A properly configured NTP hierarchy (with reasonable networking) can operate for years without ever approaching the 128 millisecond upper limit. All time adjustments are small and smooth (known as SLEWING), and nobody even notices the SLEW adjustments unless they have a cesium clock or a GPS clock and expensive instrumentation to make sophisticated measurements (HP/Agilent makes the instruments).

offset above 128 milliseconds
This regime is often encountered at power-on because, those battery-backed real-time clocks they put in computers are not too great. Because NTP is quite capable of keeping the offset below one millisecond all the time it is running, many users want to get into the normal regime quickly when an offset above 128 millisecond is encountered at startup. So in this situation NTP will (fairly quickly) make a single STEP change, and is usually successful in getting the offset well below 128 millisecond so there will be no more of the disruptive STEP changes.

offset above 1000 seconds
This is so far out of the normal operating range that NTP decides something is terribly wrong and human intervention is required. The daemon shuts down.


1000 seconds are 16 minutes or so, if you have such discrepancy xtnpd will die with a message in syslog.log.

So post:

- reply about the discrepancy between client and server;
- if syslog.log shows something related to xntpd.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
Fabio Ettore
Honored Contributor

Re: NTP for hpux11.31

Hi,

xntpd dies on clinet if gap from server is too large, that's the reason why I asked if the gap is over 15 minutes on my first post.

See also this from man of xntpd:

The NTP daemon has three regimes in which it operates:

offset below 128 milliseconds
This is the normal operating regime of NTP. A properly configured NTP hierarchy (with reasonable networking) can operate for years without ever approaching the 128 millisecond upper limit. All time adjustments are small and smooth (known as SLEWING), and nobody even notices the SLEW adjustments unless they have a cesium clock or a GPS clock and expensive instrumentation to make sophisticated measurements (HP/Agilent makes the instruments).

offset above 128 milliseconds
This regime is often encountered at power-on because, those battery-backed real-time clocks they put in computers are not too great. Because NTP is quite capable of keeping the offset below one millisecond all the time it is running, many users want to get into the normal regime quickly when an offset above 128 millisecond is encountered at startup. So in this situation NTP will (fairly quickly) make a single STEP change, and is usually successful in getting the offset well below 128 millisecond so there will be no more of the disruptive STEP changes.

offset above 1000 seconds
This is so far out of the normal operating range that NTP decides something is terribly wrong and human intervention is required. The daemon shuts down.


1000 seconds are 16 minutes or so, if you have such discrepancy xtnpd will die with a message in syslog.log.

So post:

- reply about the discrepancy between client and server;
- if syslog.log shows something related to xntpd.

HTH.

Best regards,
Fabio
WISH? IMPROVEMENT!
rick jones
Honored Contributor

Re: NTP for hpux11.31

In addition to the bits about the time being too far off and checking syslog, NTP servers/clients (xntpd being both at the same time...) really need to be pointed at three or more time sources. Otherwise, the "false ticker" algorithms are unable to do their thing.

So, next time before you go to start the xntpd service on your server, do an ntpdate command, pointing at one of the three or more lower stratum servers in your /etc/ntp.conf file first. That should get the system time "close enough" for xntpd to be willing to continue living.

Then do the same thing on your clients.

Finally, make sure that /etc/rc.config.d/netdameons (IIRC that is the one) not only sets the XNTPD flag to 1, but also has an entry for the NTPDATE_SERVER entry - I may have the spelling wrong on those, but once you see them it should become clear. That way on your next boot, there will be an ntpdate command prior to xntpd start.
there is no rest for the wicked yet the virtuous have no pillows
Fauziah Mahdan
Super Advisor

Re: NTP for hpux11.31

I have manually change the client time same as server, only diff few second. Restart the service at both servers and after 5-6 minutes the time still not sync.
Anyway let me try another round by looking at the syslog error if exist.
Thanks all will update the result.
rick jones
Honored Contributor

Re: NTP for hpux11.31

Unless you do special things to your "top level" NTP server to have it sync to its own local clock, until it syncs with the (three or more please) other time servers you've put into ntp.conf, clients cannot sync to it.

So, what are the "server" entries in your ntp server's /etc/ntp.conf file?
there is no rest for the wicked yet the virtuous have no pillows
Fauziah Mahdan
Super Advisor

Re: NTP for hpux11.31

ntp.comf for client i add few statement

server ntpserverip (10.1.1.x)
broadcast 10.1.1.255
driftfile /etc/ntp.drift
broadcastclient yes


Then the out[ut for below command
ntpdate -d 10.1.1.x
transmit(10.1.1.x)
transmit(10.1.1.x)
transmit(10.1.1.x)
transmit(10.1.1.x)
transmit(10.1.1.x)
server 10.1.1.x, port 123
stratum 0, precision 0, leap 00, trust 000
refid [0.0.0.0], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
originate timestamp: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
transmit timestamp: cccdf56d.bb866000 Wed, Nov 19 2008 10:16:13.732
filter delay: 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

19 Nov 10:16:14 ntpdate[14237]: no server suitable for synchronization found
#
Fauziah Mahdan
Super Advisor

Re: NTP for hpux11.31

ntp.conf for the ntp server i add these statement

10.1.1.x 127.127.1.1 stratum 10
driftfile /etc/ntp.drift




server 127.127.1.1
fudge 127.127.1.1 stratum 10
broadcast 10.1.1.255 version 3

pls advice me if I did anything wrong
Fauziah Mahdan
Super Advisor

Re: NTP for hpux11.31

ok guys good news....
The ntp not work because I am copy out the netdaemons to netdaemons_ori as a backup.
The changes I did in netdaemons file. So it still loking at the non changes one which is netdaemons_ori.
After changing to netdaemons.ori than it recognize the setting I have done.
All client sync to the ntp server now it only diff at the second.(few second ahead or back).
rick jones
Honored Contributor

Re: NTP for hpux11.31

If all you care about is all the systems having the same idea of what time it is, but not necessarily the correct time, then you are probably all set.

If you want the systems to have the correct time, your server must sync to a proper time source or sources.
there is no rest for the wicked yet the virtuous have no pillows
Fauziah Mahdan
Super Advisor

Re: NTP for hpux11.31

Thanks for the advice,
What does the stratum means? Actually I am copy out some of the figure from one of the NTP server which was set by HP eng previously.

James R. Ferguson
Acclaimed Contributor

Re: NTP for hpux11.31

Hi:

> What does the stratum means?

See:

http://www.docs.hp.com/en/B2355-91060/ch04s02.html#chbbjajb

This chapter (on NTP) should give you the insight you need.

Regards!

...JRF...
rick jones
Honored Contributor

Re: NTP for hpux11.31

Think of NTP as having a heirarchy of clients/servers. The lower the stratum number the "closer" to a "real" time source the system.

All sorts of useful ntp information at:

http://www.ntp.org/

Keep in mind that the NTP in HP-UX is a somewhat older version than what ntp.org might discuss, so some options in their docs may not match-up, but description of things like stratum is the same.
there is no rest for the wicked yet the virtuous have no pillows