My Original question:
> Hi Admins,
> I am trying to establish NTP between two standalone servers.I
> have set up ntp.conf file in the first server which is supposed to be the
> ntp client of the other.ntp.conf file has entry like -
> server armonk version 2
> On the second server which should be the NTP server "xntpd" daemon is
> running.
> Now if I use command "ntp armonk" from the ntp client then it shows very
> large offset of 3456 sec and if I force the clock using "ntp -s -f armonk"
> then the time on client is set almost an hour behind than the armonk(NTP
> Server).
> Is there a way to make this offset ZERO so that time can be synchronized
> using NTP.
> Thanks and I'll summarize.
>
> Ashish Tripathi
> Unix Administrator
> Infogrames Inc.
> NewYork
> NY 10016
>
Thanks to Maria and Tom for the useful replies.Tom's reply showed me
where the problem is.Actually TimeZone are not the same on the servers.Below
are the replies
Tom:
You are assuming the problem is with NTP. I suspect that perhaps your
two systems don't agree on the time zone. Remember, what's getting set
by NTP is the UTC time (aka Greenwich Mean Time, that is, the universal
time standard). That value should be the same on both systems. What
you are SEEING with, for instance, the "date" command is influenced by
the time zone you have set on the system. If the two systems don't have
the same time zone set (or your user environment has set it differently
on the two systems), then you will see different times displayed.
Tom
Maria:
Hello,
"ntp -s -f <server>" should work.
"ntp -v <server>" is a useful command;
# ntp -v <server>
Packet from: [140.100.200.199]
Leap 0, version 1, mode Server, poll 0, precision -18 stratum 1 (GPS)
Synch Distance is 0000.0000 0.000000
Synch Dispersion is 0000.0014 0.000305
Reference Timestamp is c05eccf2.000da1a9 Wed Apr 10 16:38:42 2002
Originate Timestamp is c05eccf7.b898a222 Wed Apr 10 16:38:47 2002
Receive Timestamp is c05eccf7.b8face67 Wed Apr 10 16:38:47 2002
Transmit Timestamp is c05eccf7.b906034f Wed Apr 10 16:38:47 2002
Input Timestamp is c05eccf7.b91bb490 Wed Apr 10 16:38:47 2002
<server>: delay:0.001830 offset:0.000583 Wed Apr 10 16:38:47 2002
I guess that you are using it.
The alternatives are;
1. Set date/time manually using date command (see man page for date)
2. Set the "-g" option for xntpd, which allows automatic large changes and
then restart xntpd.
# rcmgr set XNTPD_OPTS "-g"
# /sbin/init.d/xntpd restart
Note: This is assuming the daemon you are using is xntpd.
-g Allows xntpd to correct any time difference, including differences
greater than 1000 seconds.
Have fun,
Maria
Received on Wed Apr 10 2002 - 14:57:49 NZST