Re: ntpd problem freebsd 5.3 [ and Re: I found your question about NTPd on Sep 27]

2004-11-21 Thread Christian Hiris
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Monday 22 November 2004 03:40, [EMAIL PROTECTED] wrote:
 I am having the same problem you mentioned here.
 http://lists.freebsd.org/pipermail/freebsd-questions/2004-September/059279.
 html

 I was wondering if you ever found out the cause and/or a way to correct the
 problem.

As this answer appears to be more complete, than my first one, I attached it 
to the original thread, just for the archives. I'm not a ntp specialist, so 
maybe there are some things that I misunderstood, but I think it's better 
than no answer. ;-)

 Sep 23 17:13:41 panther ntpd[467]: kernel time sync enabled 2001
 Sep 23 21:29:44 panther ntpd[467]: kernel time sync enabled 6001
 Sep 23 21:46:48 panther ntpd[467]: kernel time sync enabled 2001
 Sep 24 01:11:39 panther ntpd[467]: kernel time sync enabled 6001
 Sep 24 01:45:47 panther ntpd[467]: kernel time sync enabled 2001
 Sep 24 02:19:59 panther ntpd[467]: kernel time sync enabled 6001

IMHO this isn't a problem - the messages are informational. ntpd just switches 
(kernel) clock discipline modes between PLL (Phase-Locked-Loop) and FLL 
(Frequency-Locked-Loop).

I recently found a good documentation on ntpd PLL/FLL hybrid mode (including 
the differences between ntp v3/v4 PLL/FLL mode's handling):   
http://www.eecis.udel.edu/~mills/database/papers/allan.pdf

I was pointed to the above link by  
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/contrib/ntp/html/kern.html
You also can find this document in /usr/src, if you have sources installed on 
your system.

As I mentioned, there seems to be nothing wrong with messages 6001 and 2001.  
Kernel time discipline (and probably kernel time discipline messages) could 
be disabled via ntpdc control message's or ntpd config-file's disable 
kernel option. I think this also would disable nano-second 
clock-disciplining ability, so I would left it enabled. I never tried to 
disable kernel time discipline, so I can't imagine what would happen in real 
life ... 
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/contrib/ntp/html/miscopt.html

See also the option tinker allan option. This option allows you to change 
the seconds for minimum Allan intercept, which is a parameter of the PLL/FLL 
clock discipline algorithm. I left this at default value, too.
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/contrib/ntp/html/miscopt.html

Loopfilter's implementation can be found at: 
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/contrib/ntp/ntpd/ntp_loopfilter.c
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/sys/timex.h


Two simple examples of ntpd status decoding (see timex.h):

Status message time sync enabled 2001 tells us:

STA_PLL   0x0001  [true]   /* enable PLL updates (rw) */
STA_NANO  0x2000  [true]   /* resolution (0 = us, 1 = ns) (ro) */
STA_MODE  0x4000  [false]  /* mode (0 = PLL, 1 = FLL) (ro) *
STA_CLK   0x8000  [false]  /* clock source (0 = A, 1 = B) (ro) */
- --
  0x2001  PLL upd. on, Resolution=ns, mode=PLL, clock-src=A

Status message time sync enabled 6001 tells us:

STA_PLL   0x0001  [true]   /* enable PLL updates (rw) */
STA_NANO  0x2000  [true]   /* resolution (0 = us, 1 = ns) (ro) */
STA_MODE  0x4000  [true]   /* mode (0 = PLL, 1 = FLL) (ro) *
STA_CLK   0x8000  [false]  /* clock source (0 = A, 1 = B) (ro) */
- -
  0x6001  PLL upd. on, Resolution=ns, mode=FLL, clock-src=A

Cheers,
ch

- -- 
Christian Hiris [EMAIL PROTECTED] | OpenPGP KeyID 0x3BCA53BE 
OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBoZag09WjGjvKU74RAoveAJ9vbuBz+wDK24VZL9+KSKL4GDvMcgCbBvzm
4Yd/BHzqkNicKibb+rlDky0=
=SH5B
-END PGP SIGNATURE-
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: ntpd problem freebsd 5.3

2004-09-24 Thread Christian Hiris
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday 24 September 2004 22:20, Dan Rue wrote:
 Heyo,

 I have a dual xeon machine on 5.3 beta 5 - and I am getting these ntpd
 messages in /var/log/messages non stop since I went up to 5.3:

 Sep 23 17:13:41 panther ntpd[467]: kernel time sync enabled 2001
 Sep 23 21:29:44 panther ntpd[467]: kernel time sync enabled 6001
 Sep 23 21:46:48 panther ntpd[467]: kernel time sync enabled 2001
 Sep 24 01:11:39 panther ntpd[467]: kernel time sync enabled 6001
 Sep 24 01:45:47 panther ntpd[467]: kernel time sync enabled 2001
 Sep 24 02:19:59 panther ntpd[467]: kernel time sync enabled 6001

 I googled without luck.

 Here's my (masked) ntpd.conf and rc.conf goodies:

 [EMAIL PROTECTED]:~$ cat /etc/rc.conf | grep ntpd
 ntpd_enable=YES  # Run ntpd Network Time Protocol (or NO).
 [EMAIL PROTECTED]:~$ cat /etc/ntp.conf

 # VISI
 server 209.98.0.1
 server 209.98.98.1

 # U of Minnesota
 server 128.101.101.101

 peer   ***.***.***.***

 [EMAIL PROTECTED]:~$

 FWIW, the time is correct on the machine - I did an ntpd -g to
 synchronize it the first time.

 Oh, and the other thing is that I have ntp set up the exact same way on
 a dozen other machines without problems (same or similar ntpd.conf).

 Any ideas what those log messages even mean?

Status 2001 means that phase-locked-loop operation has been enabled, 6001 
means frequency-locked-loop has been enabled. As I understand it, ntpd 
switches to FLL mode, if it dedects large phase or frequency errors (there is 
a much better description in src/contrib/ntp/ntpd/ntp_loopfilter.c) 
The Status codes are listed in timex.h. 

There is also an easier way than searching timex.h :)
 
 ntpdc -c kerninfo | grep status
status:   6001  pll nano mode=fll
 ntpdc -c kerninfo matrix020 | grep status
status:   2001  pll nano
 
Cheers,
ch
  
- -- 
Christian Hiris [EMAIL PROTECTED] | OpenPGP KeyID 0x3BCA53BE 
OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBVMX/09WjGjvKU74RAnLJAJwIkFCW5ZrNQVyQgD5XDO3CxInXPACfcIHh
J7loalf6HlsU7k2dQVYt4Wg=
=b2nW
-END PGP SIGNATURE-
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]