Re: [ntp:questions] How should an NTP server fail?

2010-06-11 Thread Miroslav Lichvar
On Fri, Jun 11, 2010 at 03:08:53AM +, David L. Mills wrote:
 An hour later I disconnected the server. By second 4773 the server
 became unreachable and was undeclared the system peer. ten minutes
 later I reconnected the server which again became reachable and the
 system peer.

You are missing the point. The bug doesn't show up if the clock
filter is filled with 8 valid samples before the connection is
blocked. There has to be at least one MAXDISPERSE sample (not the last
one).

Blocking the connection on ntpd start right after fourth reply was
recevied seems to trigger the bug reliably.

If you want to trigger it in a normal situation, you need to partially
flush the filter, let few valid samples in and then block the
connection pernamently. This doesn't work reliably and you might need
to retry it several times.

 If you are using an old release version, that
 might explain your results.

I can reproduce it with 4.2.6p1 and 4.2.7p32, I haven't tried
anything else.

-- 
Miroslav Lichvar
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How should an NTP server fail?

2010-06-11 Thread David L. Mills

Miroslav,

Careful inspection of the code, experience with the debug trace and the 
evidence presented previously strongly suggests your conclusion has no 
relevance. See my previous messages on the number of samples in the 
clock filter. I have nothing further to offer you.


Dave

Miroslav Lichvar wrote:


On Fri, Jun 11, 2010 at 03:08:53AM +, David L. Mills wrote:
 


An hour later I disconnected the server. By second 4773 the server
became unreachable and was undeclared the system peer. ten minutes
later I reconnected the server which again became reachable and the
system peer.
   



You are missing the point. The bug doesn't show up if the clock
filter is filled with 8 valid samples before the connection is
blocked. There has to be at least one MAXDISPERSE sample (not the last
one).

Blocking the connection on ntpd start right after fourth reply was
recevied seems to trigger the bug reliably.

If you want to trigger it in a normal situation, you need to partially
flush the filter, let few valid samples in and then block the
connection pernamently. This doesn't work reliably and you might need
to retry it several times.

 


If you are using an old release version, that
might explain your results.
   



I can reproduce it with 4.2.6p1 and 4.2.7p32, I haven't tried
anything else.

 



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How should an NTP server fail?

2010-06-11 Thread David L. Mills

Miroslav,

My scenario did include the condition of eight valid sample before 
pulling the plug The first missed poll response did result in one 
MAXDISPERSE sample in the filter, but that is completely irrelevant. The 
point is the poll routine calls clock_select() for every poll sent when 
the last four samples in the reach register are missing, so it is 
guaranteed that the server be marked down after that.


You are invited to peruse the code in ntp_proto.c and look for calls to 
clock_select(). Note it is not possible to exit this routine without 
either finding a system peer or declaring no system peer. See the calls 
to report_event().


Dave

Miroslav Lichvar wrote:


On Fri, Jun 11, 2010 at 03:08:53AM +, David L. Mills wrote:
 


An hour later I disconnected the server. By second 4773 the server
became unreachable and was undeclared the system peer. ten minutes
later I reconnected the server which again became reachable and the
system peer.
   



You are missing the point. The bug doesn't show up if the clock
filter is filled with 8 valid samples before the connection is
blocked. There has to be at least one MAXDISPERSE sample (not the last
one).

Blocking the connection on ntpd start right after fourth reply was
recevied seems to trigger the bug reliably.

If you want to trigger it in a normal situation, you need to partially
flush the filter, let few valid samples in and then block the
connection pernamently. This doesn't work reliably and you might need
to retry it several times.

 


If you are using an old release version, that
might explain your results.
   



I can reproduce it with 4.2.6p1 and 4.2.7p32, I haven't tried
anything else.

 



___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How should an NTP server fail?

2010-06-11 Thread Steve Kostecke
On 2010-06-05, goofyzig backup...@gmail.com wrote:

 Hi there. A quick question about what to expect when it comes to NTP
 failures. I configured a Meinberg NTP server (software-based server),
 had it working, serving time to the back-end hosts, Reachability at
 377 for its two NTP upstream time sources (internet NTP servers). Once
 configured, I wanted to see how the server failed.

Please post the configuration file you used as the version line from
'ntpq -crv' (on the server).

-- 
Steve Kostecke koste...@ntp.org
NTP Public Services Project - http://support.ntp.org/

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] How should an NTP server fail?

2010-06-11 Thread Steve Kostecke
On 2010-06-11, Kasper Pedersen s...@kasperkp.dk wrote:

 On 06/11/2010 04:47 PM, David L. Mills wrote:

 My scenario did include the condition of eight valid sample before
 pulling the plug The first missed poll response did result in one
 MAXDISPERSE sample in the filter, but that is completely irrelevant.
 The point is the poll routine calls clock_select() for every poll
 sent when the last four samples in the reach register are missing, so
 it is guaranteed that the server be marked down after that.

 For entertainment value, 'ntpq cartoons' with 4 samples, and 8
 samples:

 At 2 minutes after pulling the plug, there is a difference.

I can confirm the observed behavior with 4.2.7p34. However the
inflection point is actually between the 4th and 5th polls.

My experiments this afternoon also showed that the presence or absence of
iburst on the server line has no effect.

-- 
Steve Kostecke koste...@ntp.org
NTP Public Services Project - http://support.ntp.org/

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


[ntp:questions] proprietary hardware clock as NTP reference source

2010-06-11 Thread apobrien
Hello list,

I have a set of proprietary hardware timing cards (Symmetricom
bc635PCIe) which synchronize their clocks using a dedicated
interconnect.  As you might imagine the timing card conditioned time
drifts from that of the hosts they're installed in.

What I'd like to do is make the master timing card's time into a NTP
reference clock then use NTP to distribute that time to the other
hosts in the (private) network.

I've looked at Orphan mode and undisciplined local clocks but they
only refer to the host's software clock if I'm not mistaken.  I've
also searched through the archive but I'm afraid I lack the
appropriate terminology to get meaningful results.

Can someone point me toward (some google words maybe) creating an
arbitrary NTP reference source (under Linux)?  I think I'm just
missing something very basic.

I've been looking at the LinuxPPS project as these cards output a PPS
that I might use to condition the host clock using Linux PPS but I
don't have a 8250 serial port on these new fangled PCs.

TIA!
Andy

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] proprietary hardware clock as NTP reference source

2010-06-11 Thread Hal Murray
In article 40aa2d27-9826-4948-a405-e5b311358...@z8g2000yqz.googlegroups.com,
 apobrien apobriens...@gmail.com writes:
Hello list,

I have a set of proprietary hardware timing cards (Symmetricom
bc635PCIe) which synchronize their clocks using a dedicated
interconnect.  As you might imagine the timing card conditioned time
drifts from that of the hosts they're installed in.

What I'd like to do is make the master timing card's time into a NTP
reference clock then use NTP to distribute that time to the other
hosts in the (private) network.

I've looked at Orphan mode and undisciplined local clocks but they
only refer to the host's software clock if I'm not mistaken.  I've
also searched through the archive but I'm afraid I lack the
appropriate terminology to get meaningful results.

Can someone point me toward (some google words maybe) creating an
arbitrary NTP reference source (under Linux)?  I think I'm just
missing something very basic.

I've been looking at the LinuxPPS project as these cards output a PPS
that I might use to condition the host clock using Linux PPS but I
don't have a 8250 serial port on these new fangled PCs.

TIA!
Andy

I think you have two choices.

One is to write a stand alone program that talks to your hardware
and puts the info into shared memory where the shared-memory driver
(driver 28) can get it.  gpsd works this way.

The other is to write your own refclock-driver.  The usual
approach is to find a driver that is as close as you can get
and modify it.  If your changes are small and don't break the
old moce, you may be able to convince the ntp project to merge
them into the main source package.

It may be tricky to get started this way.  The best documentation
is to read the code.  There is some overview here, but it
probably won't help much until you look at the code:
  http://www.cis.udel.edu/~mills/ntp/html/howto.html

-- 
These are my opinions, not necessarily my employer's.  I hate spam.

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] proprietary hardware clock as NTP reference source

2010-06-11 Thread unruh
On 2010-06-11, apobrien apobriens...@gmail.com wrote:
 Hello list,

 I have a set of proprietary hardware timing cards (Symmetricom
 bc635PCIe) which synchronize their clocks using a dedicated
 interconnect.  As you might imagine the timing card conditioned time
 drifts from that of the hosts they're installed in.

 What I'd like to do is make the master timing card's time into a NTP
 reference clock then use NTP to distribute that time to the other
 hosts in the (private) network.

 I've looked at Orphan mode and undisciplined local clocks but they
 only refer to the host's software clock if I'm not mistaken.  I've
 also searched through the archive but I'm afraid I lack the
 appropriate terminology to get meaningful results.

 Can someone point me toward (some google words maybe) creating an
 arbitrary NTP reference source (under Linux)?  I think I'm just
 missing something very basic.

 I've been looking at the LinuxPPS project as these cards output a PPS
 that I might use to condition the host clock using Linux PPS but I
 don't have a 8250 serial port on these new fangled PCs.

Use shmpps. It uses the shm driver to input the PPS to ntp. It requires
that you have some other source to derive the seconds from (I, PPS can
allow ntp to condition to the exact second, but has no idea which second
it is conditioning to) That serial port is used to input the PPS and the
seconds. How would you input the PPS in your case?

 TIA!
 Andy

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions