1836456 Members
2277 Online
110101 Solutions
New Discussion

Setting up NTP

 
SOLVED
Go to solution
Allan Pincus
Frequent Advisor

Setting up NTP

All,

I have a small HP-UX network, about 10 machines. I use /etc/hosts resolution rather than DNS.

I'm trying to turn on xntpd to use the internal clock of one of my machines as a server, and the rest as clients.

I edited the /etc/ntp.conf file with the lines:

server 127.127.1.1

and drift file set to:

/var/adm/ntp.drift

I start the xntpd and get the error message:

"ntpdate[10610]: no server suitable for synchronization found"

I grep out the daemon, and find it, but the ntp.drift log never updates.

What am I doing wrong?

- Allan
14 REPLIES 14
Sajid_1
Honored Contributor
Solution

Re: Setting up NTP

Did you check the output of:
# ntpq -p
This should show your ntp server's name at the client system.
Check and make sure that your systems resolves the name properly. Check the file /etc/rc.config.d/netdaemons and see if everything is enabled and set properly.

gl,
learn unix ..
James R. Ferguson
Acclaimed Contributor

Re: Setting up NTP

Hi Allan:

If the difference in time between your source and the servers that are attempting to synchronize to it is more than 1000 seconds, xntpd will die without synchronization. In this case you will need to manually adjust the date on the server first to minimize the delta and then restart xntpd.

The drift file will not appear to update for sometime so this is not a very reliable measure of xntp activity.

Rather, use 'ntpq -p' to query the status of the xntpd daemon.

Regards!

...JRF...
Rick Garland
Honored Contributor

Re: Setting up NTP

Check out the site www.eecis.udel.edu/ntp. There is a wealth of info there.

First glance would indicate that you are not going outside to a stratum 1 server to get correct time.
steven Burgess_2
Honored Contributor

Re: Setting up NTP

Hi Allan

Here's a doc regarding the output of ntpq -p

http://support4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000048175248

HTH

Steve
take your time and think things through
Sajid_1
Honored Contributor

Re: Setting up NTP

This document explains the step to build a ntp server:
http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000047992570

Doc ID - KBRC00000415
learn unix ..
Sajid_1
Honored Contributor

Re: Setting up NTP

hi again:

This document will tell you the steps for setting up a NTP server and client:
http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000053307950

Doc ID - 1100390400
learn unix ..
John Bolene
Honored Contributor

Re: Setting up NTP

pretty darn easy to do using Sam
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Allan Pincus
Frequent Advisor

Re: Setting up NTP

So I got my NTP running, or so I believe. thanks for all your help (especially the "pretty easy in sam" - duh - always have to do things the hardway).

I ran ntpq -p on my client, looks good. But when I run "date" on my server and "date" on my client, my clocks are 6 minutes apart and have been for the last 15 minutes.

I thought my client would sync with my server.

Something is still not right.

Can someone interpret the output of the NTP for me? I went through the man pages quickly, and there's a lot of stuff.

Thanks!

- Allan
Mike_305
Super Advisor

Re: Setting up NTP

Hi,

You can update time manually using command:

ntpdate

Thanks,

Mike
If there is problem then don't think as problem, think as opportunity.
A. Clay Stephenson
Acclaimed Contributor

Re: Setting up NTP

THe whole point of NTP is that it will not sync by 'stepping' but rather by slewing. Let it adjust the time at it's own pace.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Setting up NTP

Very important: you never want the date to suddenly jump, especially with databases running--you may have to deal with broken links and other corruption.

6 minutes difference will take a minimum of 3 hours to adjust. Be sure you monitor syslog for any errors. Do NOT use ntpdate unless you aren't running anything--it is as bad as simply changing the time using the Unix date command.


Bill Hassell, sysadmin
Sajid_1
Honored Contributor

Re: Setting up NTP

hello,

you can give multiple ntp servers in the config file, if you need the ntp to sync to an accurate time value. You may have to wait for some time after you have configured the ntp clients, depend up on the network traffic. Apply all patches, check the log files and if needed add entry for ntpdate in the crontab file.
learn unix ..
Sajid_1
Honored Contributor

Re: Setting up NTP

This document explains how ntp works:
http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000049138043

Doc ID - S3100006003
learn unix ..
Allan Pincus
Frequent Advisor

Re: Setting up NTP

All,

Thanks everyone. I came into work this morning, and sure enough, my first client was in sync with my server. So the "slew" comment was entirely accurate (10pts!).

My systems are all for semiconductor test equipment, not database driven, so the timestamp is less important, +/-10 minutes, but there have been times where the date was completely wrong. This will help.

I did use the ntpdate command (after stopping xntpd) and it sync'd the client just as expected.

This is a really strong newsgroup!!!

- Allan