1831698 Members
2148 Online
110029 Solutions
New Discussion

NTP issue

 
njia_1
Trusted Contributor

NTP issue

Hi,

I want to enable NTP on one of rp3410 to sync to our NTP server. The time difference between these two server is one hour. rp3410 is one hour ahead our ntp server

I enabled ntp on the client and started ntpd. then I just realized that the time on the client was set back 1 hour straight away.

currently the rp3410 is running OK but I do not know what will happen, I thought ntp will slow donw the clock on 3410 rather then modified the clock straight away.

any ideas
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: NTP issue

then I just realized that the time on the client was set back 1 hour straight away.

Thats not how ntp works.

If a machine is ahead for its time zone, the clock runs a little slower than normal until it synchs up with the data for its time zone.

Same thing except faster if the machine is ahead.

I would check the TZ Timezone setup and see if the machine that is not working properly is properly set up.

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
njia_1
Trusted Contributor

Re: NTP issue

hi SEP,

I am also confused by this but I noticed that when I started ntpd, there was a message related to ntpdate.

I do not know why but ntpdate was called by ntpd maybe, then ntpdate set the time back 1 hour.

It is already happened, the 3410 is doing something important testing and I can not reboot it.

Now it has been more then 6 hours, everything looks Ok but I am not sure will something happen or not.

thanks
Nan
Bill Hassell
Honored Contributor

Re: NTP issue

I suspect that you started ntp using /sbin/init.d/xntpd. This script is specifically designed to be run only at bootup and shutdown. The reason is that the first command is ntpdate -b which jumps the time to match the server. This is desirable during bootup, before any applications are started, but not on a running system. xntpd will indeed adjust the time slowly but an hour is too much time to adjust. It can't be done in less than 24 hours. xntpd will adjust a 10 minute difference but it will take 3-4 hours.

The correct way to adjust the time on a new NTP client is to setup NTP, verify NTP services with ntpq -p), modify /etc/rc.config.d/netdaemons and then reboot if the time is more than 15 minutes out of sync. xntpd won't make any adjustments if the difference in time is more than 1024 seconds (17 minutes).


Bill Hassell, sysadmin
njia_1
Trusted Contributor

Re: NTP issue

thanks