1847456 Members
3597 Online
110265 Solutions
New Discussion

Re: NTP Issue

 
Zhang, Rong-liang
New Member

NTP Issue

Hi,

I use ntp to sync the time, after configuration and startup the xntpd, the time is sync. But a problem appear: when I use set_parms date_time to modify the date on the server, the client can't sync the date and time, why? Something I do is wrong?

which step should I use to modify the server time and how to check the client can aync the server time timely and correctly?

pls give me your advice, thanks.

Best regards,

Rong-liang, Zhang
5 REPLIES 5
Fred Martin_1
Valued Contributor

Re: NTP Issue

I think ntp will not correct the time all at once, if the correction is too large. It will instead make may small changes over time. Could that be what is happening?

Here is some reading:

http://docsrv.sco.com/NET_tcpip/CTOC-ntpN.ntp.html

See the bit on ntpdate.

fmartin@applicatorssales.com
Bill Hassell
Honored Contributor

Re: NTP Issue

It is VERY important not to change the time on a running server, especially if it is running a database or other programs that must have accurate timestamps. If the time is off by more than 10 minutes (and NTP has been setup correctly), just reboot the system and the date will be 'jumped' to the right time before the database or other programs are started. NTP will never try to adjust the time if it is off by more than 1024 seconds (which is about 17 minutes). Make sure that your NTP servers are working correctly by running: ntpq -p


Bill Hassell, sysadmin
Florian Heigl (new acc)
Honored Contributor

Re: NTP Issue

If the step ntpd would have to do to get in sync with the server is more than 1 hour, ntpd assumes something is wrong and terminates.

You should use ntpd for the server, too.

a small sample config would be

/etc/ntp.conf:
driftfile /var/run/ntp.drift
# this collects long-term data on the local
clock to raise it's quality.
server 127.127.1.1
fudge 127.127.1.1 stratum 8
# the above uses the local clock as a last resort, if no other server is available.
server pool.ntp.org
# uses a DNS round robin of very well maintained stratum 2 servers. endorsed by comp.protocols.time.ntp
#server 12.13.14.15 # maybe a server supplied by Your ISP

xntpd -c /etc/ntp/conf will start it, after 15 mins test the config by issuing ntpq -p

If this looks ok, use it, if You not sure or there are problems, ask.

for regular startup, You only have to enter a 1 and an initial NTP server to /etc/rc.config.d/netdaemons

export NTPDATE_SERVER=pool.ntp.org
export XNTPD=1

yesterday I stood at the edge. Today I'm one step ahead.
Florian Heigl (new acc)
Honored Contributor

Re: NTP Issue

For reference - after a few minutes for the first initial syncronisations this would look like in the following:

# ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
LOCAL(1) LOCAL(1) 10 l 3 64 377 0.00 0.000 10.01
*126.Red-213-96- 96.Red-213-96-1 3 u 33 64 377 147.92 -186.95 69.95


Note that this system only shows one external server, this is too litte. I've got an reason for this state, but no excuse :)

A rule of thumb is that a network should have two stratum 3 timeservers using three stratum 2 upstream servers. the upstream servers should be in a close geographic location.

The official list is at:
http://www.eecis.udel.edu/~mills/ntp/clock2a.html

take Your pick.
yesterday I stood at the edge. Today I'm one step ahead.
Zhang, Rong-liang
New Member

Re: NTP Issue

Hi all,

Thanks for your ideas.

I know the cause.

Rong-liang, Zhang