Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jan 2005 15:51:21 +1100 (EST)
From:      Bsd B <freebsd04@yahoo.com.au>
To:        freebsd-questions@freebsd.org
Subject:   ntp is acting strangely
Message-ID:  <20050121045121.92762.qmail@web54007.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
Hi,
I am baffled about an ntp problem i am experiencing.
Please excuse me if this is a simple question, as I am
still a relatively inexperienced user compared to the
community.
My setup is 3 computers (2 act as game clients and the
other acts as a game server) all running FreeBSD4.9
RELEASE. They are each connected to the internet
(through the network) and through wireless (private
network). Each connection is fully functioning (ie
internet connection is good and they can ping each
other)
The experiment i wanted to carry out was to just have
a look at the ntp offsets over time for the three
computers, and comparing them to each other.
I have written a very simple shell script that simply
outputs the date and time along with the result of the
ntp offset of the server being synched to (ie the
server with a asterik(*) from the result of "ntpq
-p"),  every 30 seconds. 
The servers I have selected in /etc/ntp.conf for all 3
computers are reliable stratum 2 university ntp
servers. (2 are in the x.x.1 network and the other is
on the x.x.20 network)

I ran the script on all 3 computers and over a week
(from Jan 5 to Jan 13), they seemed to run fine
(fluctuating offsets within the range of -50 to 50,
however, towards the end of the week, all 3 tests ran
showed missing data for about 1/2 day, as if there was
some sort of outage. Upon investigation, I found only
one of the client machines had the following in
/var/log/messages  (it is an extract, starting from
the first ntpd related entry - it is the exact data
except i was advised to edit the ip addresses out -
please excuse me)

Jan 11 22:34:46 client1 ntpd[95]: sendto(ntp server 1
x.x.20.x): No route to host
Jan 11 22:39:04 client1 ntpd[95]: sendto(ntp server 1
x.x.20.x): No route to host
Jan 11 23:26:13 client1 ntpd[95]: sendto(ntp server 1
x.x.20.x): No route to host
Jan 12 03:06:05 client1 ntpd[95]: sendto(ntp server 2
x.x.1.x): No route to host
Jan 12 07:53:46 client1 ntpd[95]: sendto(ntp server 3
x.x.1.x): No route to host
Jan 12 11:08:14 client1 ntpd[95]: time reset -0.189678
s

Looking at the ntp offset result files, the missing
data began at approx 11 Jan 2005 22:29:58 (showing an
ntp offset of -5.332) and resumed approx 12 Jan 2005
10:32:26 with an offset of 46.081. The offset 
gradually decreased to -172.70 at 11:07:57 before
dropping out again and resuming minutes later with a
offset of -5.712.

After that it seemed fine.

I don't believe it was just simply the case of 3 of
the ntp servers going down. Also, as stated
previously, 3 computers are pinging fine, and the
script is so simple  and basic that it can't be the
problem. A previous test i ran was even stranger...one
of the computers produced the desired results, one of
the computers received frequent drop outs and the
other only had a small period of results.

Question - is it common to have ntp offsets not
providing data? I specified a drift file
(/var/db/ntp.dirft) in /etc/ntp.conf, which i thought
was used to continue adjusting the offset even when
contact was lost with all servers. So how do I fix
this problem or more importantly, what is the cause of
it? Is it freebsd? 
I have been searching the internet for the last couple
of days and I am yet to find some solid literature or
solutions. I am very keen to get on top of this. 

Any suggestions/ideas/pointers are much appreciated.
Deep thanks in advance

Bob


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050121045121.92762.qmail>