Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2001 23:53:40 -0500
From:      The Anarcat <anarcat@anarcat.dyndns.org>
To:        Kevin Oberman <oberman@es.net>
Cc:        devin-freebsdquestions@rintrah.org, freebsd-questions@FreeBSD.ORG
Subject:   Re: ntpdate works, ntpd does not
Message-ID:  <3C183454.2000105@anarcat.dyndns.org>
References:  <200112121946.fBCJkRd11801@ptavv.es.net>

next in thread | previous in thread | raw e-mail | index | archive | help


Kevin Oberman wrote:

>>Date: Wed, 12 Dec 2001 12:39:46 -0500
>>From: devin-freebsdquestions@rintrah.org
>>Sender: owner-freebsd-questions@FreeBSD.ORG
>>
>>I believe ntpd will poll the server over a period of some time to get a feel
>>for drift. I know when I set it up it took several hours before it would
>>adjust the clock. How long are you waiting before you expect ntpd to make adjustments?
> 
> More specifically, it polls once every 64 seconds it has enough
> samples to be statistically significant. This usually takes 5
> samples. It then starts drifting the clock, if needed.


So that's what.. around 5'20"?

> To watch this happen, use the command "ntpq -p". When a server is
> tagged with a symbol, it's considered for use. The one marked '*' is
> the one being used and those marked '+' are also considered "good".


Ok. Let's take it from here:

[sorry, darn mozilla autofills everything...]

su-2.05# ntpq -p && date && ps jax -o start | grep ntpd\ -p
      remote           refid      st t when poll reach   delay   offset 
jitter
==============================================================================
  time.nist.gov   0.0.0.0         16 u    -   64    0    0.000    0.000 
4000.00
Wed Dec 12 23:37:15 EST 2001
root      4593     1  4593 c06ef9c0    0 S<s   ??    0:00.74 ntpd -p 
/var/run 11:27PM
root      4680  4465  4679 c076a2c0    2 R+    p0    0:00.05 grep ntpd 
-p     11:37PM

so ntpd was started at 11:27PM, 10 minutes before the command was ran, 
and the character before the hostname is " ". This means, from the man page:

        space   (reject) The peer is discarded as unreachable, synchro-
                nized to this server (synch loop) or outrageous synchro-
                nization distance.

So ntpd does reject the host. Maybe it's the synch loop thing I can't 
figure out though..

One thing I read from the tcpdump output I found strange, though.. It 
sends a packet containing a "stratum 0" instruction, somehow. Maybe it's 
related?

The ntpdc "peers" command leads to a different result, surprisingly. 
Indeed, it seems the character codes are different between ntpq and ntpdc:

ntpdc> peers
      remote           local      st poll reach  delay   offset    disp
=======================================================================
=time.nist.gov   5.0.0.0         16   64    0 0.00000  0.000000 0.00000

ntpdc(8):
...
              a "=" means the remote server is being polled
              in client mode,
...

And, BTW, the more I wait, the more the "unreach" counter from the 
ntpdc(8) "peers" command increments.


> IF the source and the sync to the local system are stable, the time
> between polls will increase to 1024 seconds between polls.
> 
> R. Kevin Oberman, Network Engineer
> Energy Sciences Network (ESnet)
> Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
> E-mail: oberman@es.net			Phone: +1 510 486-8634


Thanks,

A.

 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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