On Tue, 8 May 2007, Oliver Fromme wrote:

Martin Dieringer wrote:
> Oliver Fromme wrote:
> > Are you sure that your /etc/ntp.conf ist correct?
>
> # cat /etc/ntp.conf
>
> server time.fu-berlin.de iburst maxpoll 9
> driftfile /var/db/ntp.drift
> logfile /var/log/ntpd

You must add "restrict" lines for every server and for
localhost, like these:

restrict time.fu-berlin.de nomodify
restrict 127.0.0.1


I'm sorry I do not understand what this flag is for (I don't
understand the manpage either)


> # ntpq -p
> No association ID's returned

That's because the default (when no "restrict" lines are
there) doesn't allow a connection at all..


well now it works without "restrict":
# ntpq -p
     remote           refid      st t when poll reach   delay offset  jitter
==============================================================================
*time            192.53.103.108   2 u   19   64   77   91.454 301.926 860.104


and the clock is "only" 3 seconds late now...


> and how will the clock run when not connected to the internet?

ntpd calculates the drift of the local clock.  During times
when it cannot reach the server, it corrects the local
clock using the recorded drift.


ok this sounds beautiful, but what if the drift is irregular?
Maybe if it depends on the load of the machine etc.?
Maybe ntpd just can't handle this?


the clock should run correct in the range of very few seconds a day.
There is an error somewhere and using ntpd to mask this is just
cosmetic.


> it should at least be somehow in a sensible range

Yes, it should, if the off-line times aren't too long.

no, it should if there is no on-line connection at all, or shouldn't
it?


> But 2 minutes is also too much

ntpd should be able to handle that without problems.

yes maybe, sometimes...


> I have to redialup every 24h which normally works fine.

How are you redialling?  If you get a new dynamic IP
address, it might be necessary to restart ntpd.
MYADDR:
!bg /etc/rc.d/ntpd restart

great! 8-(
as "restart" does not work because the pid seems to be wrong and
usually there are 5 or so ntpd's running... ?


btw, this is on the other machine which is now 2 minutes off again,
maybe 1 hour after correct setting:

# ntpq -p
     remote           refid      st t when poll reach   delay offset  jitter
==============================================================================
 chronos.zedat.f .PPS.            1 u  457  512  377  366.965 37369.6 8640.85

log:
 8 May 16:11:08 ntpd[57617]: synchronized to 130.133.1.10, stratum=1
 8 May 16:11:08 ntpd[57617]: time reset +0.651381 s
 8 May 16:11:08 ntpd[57617]: kernel time sync disabled 2041
 8 May 16:12:22 ntpd[57617]: synchronized to 130.133.1.10, stratum=1
 8 May 16:13:30 ntpd[57617]: no servers reachable

now: 16:57


m.

_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to