[ntp:questions] Type 28 driver (gpsd, SHM) - understanding "flag1"

2015-02-20 Thread David Taylor

Folks,

I'm looking at:

  http://www.eecis.udel.edu/~mills/ntp/html/drivers/driver28.html

and wanting to be sure that I understand flag1 correctly.  The situation 
is starting a computer which has no real-time clock, and has been down 
for a day.  This computer is in the middle of nowhere, and has a GPS and 
PPS as reference clocks, using the type 22 and type 28 drivers.  By 
observation, the type 22 (PPS) driver won't kick in until the type 28 
(SHM/gpsd) driver is valid, but also by observation with no flags set it 
seems that the type 28 driver never syncs at all, even though valid GPS 
data is present.


My reading of that page is:

- the default, flag1 = 0 or absent, and no time2 set, NTP will not kick 
in unless the local clock is within 4 hours of the GPS time.  It seems 
that even with -g as an ntpd parameter, which /should/ allow a large 
initial offset NTP won't kick in.  In the computer in question, the 
difference is likely to be in excess of 24 hours, so NTP will not 
attempt to correct the clock.  This is not the desired behaviour!


Is my understanding correct?  Would the correct thing to do in such 
circumstances be to set flag1 = 1 so that the difference limit is ignored?


I ask what may be an obvious question as I appear to have difficulty in 
reading the page.  Perhaps old age, I hope nothing more!  I suppose I 
had expect the "-g" to override other sanity checks.


--
Thanks,
David
Web: http://www.satsignal.eu

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread David Taylor

On 21/02/2015 07:04, William Unruh wrote:
[]

orphan mode is about a group of computers. "Orphan Mode allows a group
of ntpd processes to automonously select a leader in the event that all
real time sources become unreachable (i.e. are inaccessible)."

chrony's is that you can enter the time by hand (Ie, by typing a current
time and hitting enter) on a single machine.  You are the "remote clock". Now, 
how useful that
is now adays is open to question, but in the past with telephone modems
and flaky connections it was worth something. And if you are setting up
something on the Hebrides or on a buoy in the Atlantic where no
connection of anykind is possible, it could be useful.
Ie, it IS different from orphan mode.


"Things chronyd can do that ntpd can?t:  chronyd provides support for 
isolated networks whether the only method of time correction is manual 
entry (e.g. by the administrator looking at a clock)."


The claim is for "networks", not single machines.

--
Cheers,
David
Web: http://www.satsignal.eu

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread William Unruh
On 2015-02-21, Paul  wrote:
> On Fri, Feb 20, 2015 at 3:23 PM, William Unruh  wrote:
>
>> ??? how do assume that the chrony docs do not tell the truth?
 ^ you

>
>
> I don't understand that sentence.

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread William Unruh
On 2015-02-21, David Taylor  wrote:
> On 20/02/2015 20:22, William Unruh wrote:
> []
>> No. The local clock simply trusts the time (Ie all offsets are defined
>> to be zero) chrony takes the time as entered by hand by the operator and
>> uses that to determine the offset. Of course that will not be terribly
>> accurate ( a second is probably good), but if you are disconnected for a
>> month, a second is probably pretty good accuracy.
>
> In practice, how does that differ from orphan mode?  I think that 
> statement on behalf of chrony needs to be clarified as it may be misleading.

orphan mode is about a group of computers. "Orphan Mode allows a group
of ntpd processes to automonously select a leader in the event that all
real time sources become unreachable (i.e. are inaccessible)." 

chrony's is that you can enter the time by hand (Ie, by typing a current
time and hitting enter) on a single machine.  You are the "remote clock". Now, 
how useful that
is now adays is open to question, but in the past with telephone modems
and flaky connections it was worth something. And if you are setting up
something on the Hebrides or on a buoy in the Atlantic where no
connection of anykind is possible, it could be useful.
Ie, it IS different from orphan mode. 

>

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread David Taylor

On 20/02/2015 20:22, William Unruh wrote:
[]

No. The local clock simply trusts the time (Ie all offsets are defined
to be zero) chrony takes the time as entered by hand by the operator and
uses that to determine the offset. Of course that will not be terribly
accurate ( a second is probably good), but if you are disconnected for a
month, a second is probably pretty good accuracy.


In practice, how does that differ from orphan mode?  I think that 
statement on behalf of chrony needs to be clarified as it may be misleading.


--
Cheers,
David
Web: http://www.satsignal.eu

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread Paul
On Fri, Feb 20, 2015 at 3:23 PM, William Unruh  wrote:

> ??? how do assume that the chrony docs do not tell the truth?


I don't understand that sentence.
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP with 2 servers

2015-02-20 Thread Brian Inglis

On 2015-02-20 16:58, William Unruh wrote:

On 2015-02-20, Nuno Pereira  wrote:

In our infrastructure we had some ntp clients that don't have access to the
world and so they are configured to use only 2 servers (by the way, the other
have 2 more options). In reality both servers are the same, but with different
IPs.

So you only have one server. Why have two that are the same?

 From time to time some clients configured in this way lose their reference for
some short period.
I know how NTP works
(http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO), and so this seems
to be caused by both 2 servers or just 1 of them not have survived.
But both the clients and the servers are physically in the same place, and
even if they aren't in the same IP network, they are in the same LAN with just
a switch or two between them (delay is between 1 and 2 ms).

What is the switch? Smoke signals? Any switch should be a lot lot faster
than 1ms.

And the question is why this does happen in the local network?
Aren't they close enough in order to avoid a split?
Given that, I have changed the configuration, and now they only use 1 server,
but that is not a good solution.

But that is what you have!

Any alternative for the configuration? More servers, most likely virtual
servers?


I dislike the term servers here and prefer sources, as what you need are
3-5 independent sources of time. You can get that by setting up NTP on
some other Internet facing physical servers (Windows, Linux, BSD) whose
CPUs and network I/O are not overloaded, using pool and/or separate,
local, independent sources, and have all your internal clients configured
to sync from all of those internal sources.
You will have to roll patchings across your internal time sources with
delays to ensure that no more than one source is out of sync at any time.
--
Take care. Thanks, Brian Inglis
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Paul
On Fri, Feb 20, 2015 at 6:21 PM, Harlan Stenn  wrote:

> This is interesting.  It may be that only 4 responses are returned at a
> time, but there has been lots of evidence and experience that depending
> on your resolver (most resolvers, from what I've seen), you won't get
> the same responses each time (this point assumes there are more than 4
> answers to be had).
>

I suspect the limit of four is enforced by the pool DNS servers and tweaked
by a short TTL.

Two points:
1) sometimes  2.*.pool is magic.  One would want to account for that.
2) sometimes a cache will return the same answer for n.*.pool if n is a
constant for longer than you might expect despite the TTL.

Something like 0.uk.pool, 1.uk.pool, 3.uk.pool and uk.pool will should
return 16 unique IPv4 addresses in the UK.
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP with 2 servers

2015-02-20 Thread William Unruh
On 2015-02-20, Nuno Pereira  wrote:
>
>  
>
> In our infrastructure we had some ntp clients that don't have access to the
> world and so they are configured to use only 2 servers (by the way, the other
> have 2 more options). In reality both servers are the same, but with different
> IPs.

So you only have one server. Why have two that are the same?

>
>  
>
> From time to time some clients configured in this way lose their reference for
> some short period.
>
>  
>
> I know how NTP works
> (http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO), and so this seems
> to be caused by both 2 servers or just 1 of them not have survived.
>
> But both the clients and the servers are physically in the same place, and
> even if they aren't in the same IP network, they are in the same LAN with just
> a switch or two between them (delay is between 1 and 2 ms).

What is the switch? Smoke signals? Any switch should be a lot lot faster
than 1ms.

>
>  
>
> And the question is why this does happen in the local network?
>
> Aren't they close enough in order to avoid a split?
>
>  
>
>  
>
> Given that, I have changed the configuration, and now they only use 1 server,
> but that is not a good solution.

But that is what you have!

>
> Any alternative for the configuration? More servers, most likely virtual
> servers?

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Brian Inglis

On 2015-02-20 12:19, Roger wrote:

On 20 Feb 2015 17:49:15 GMT, Rob  wrote:


Roger  wrote:

On Fri, 20 Feb 2015 12:45:54 +, Roger
 wrote:


After about 11 minutes it has dropped one, leaving 6 servers.
I'll continue to monitor and report back.


Just to recap, I now have this in my ntp.conf:

pool 0.uk.pool.ntp.org
pool 1.uk.pool.ntp.org
pool 2.uk.pool.ntp.org
pool 3.uk.pool.ntp.org


Why not just:

pool pool.ntp.org

That should be enough.


I did have just one line "pool uk.pool.ntp.org" but the rogue
server didn't get dropped even after 27 hours. I included the
"uk" to try to make sure that the servers were as local as
possible. Without that they could be anywhere in Europe.

Terje made the suggestion about too few servers. DNS returns 4
IP addresses at a time. By having four lines ntpd could have 12
different IP addresses returned if it used all four lines.

As I'm not capable of going through the source code and trying
to work out the best strategy I have to do it by trial and
error.


Add iburst preempt to the ends of your pool server lines to improve startup and 
drop poorer sources.

--
Take care. Thanks, Brian Inglis
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Harlan Stenn
Jan Ceuleers writes:
> Using dig on a sample of the pool it seems that DNS queries to the
> pool only ever return 4 entries. So if ntpd relies on there being
> around 10 servers for some of its monitoring capabilities to kick in
> then we seem to have a bit of a disconnect.

This is interesting.  It may be that only 4 responses are returned at a
time, but there has been lots of evidence and experience that depending
on your resolver (most resolvers, from what I've seen), you won't get
the same responses each time (this point assumes there are more than 4
answers to be had).

If the number of answers returned is a local policy choice, then it may
well be that one may need multiple pool lines in the ntp.conf file.  If
"more" answers are returned or if the answers are randomized each time,
a single pool line may be all that is required.
-- 
Harlan Stenn 
http://networktimefoundation.org - be a member!

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Roger
On Fri, 20 Feb 2015 20:20:01 +, Phil W Lee
 wrote:

>You may well have mine among them.
>I'd appreciate some feedback on how it appears to be performing from
>elsewhere.
>If 88.96.199.9 looks familiar, drop me an email.

No, yours isn't in there at the moment. The Los Angeles monitor
shows it wandering around by a some milliseconds.

http://www.pool.ntp.org/scores/88.96.199.9
-- 
Roger

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


Re: [ntp:questions] [Is deze mail veilig?] [Is this e-mail safe?] [Cet e-mail est-il sans danger?] Re: Pool server gone wild

2015-02-20 Thread Roger
On Fri, 20 Feb 2015 19:01:23 GMT, Jan Ceuleers
 wrote:

>On 20/02/15 18:49, Rob wrote:
>> Why not just:
>> 
>> pool pool.ntp.org
>> 
>> That should be enough.
>
>It returns only 2 servers (at the moment, and on my system):

There's definitely something wrong; the authority section should
be showing ?.ntpns.org. where ? is a - i inclusive.
-- 
Roger

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


Re: [ntp:questions] NTP with 2 servers

2015-02-20 Thread Paul
On Fri, Feb 20, 2015 at 3:17 PM, Nuno Pereira 
wrote:

> I know how NTP works
> (http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO), and so this
> seems
> to be caused by both 2 servers or just 1 of them not have survived.
>

As recently noted the ntpfaq is outdated and shouldn't be used to make
design decisions.  There's sufficient newer documentation.

Your description is too vague to offer good advice but don't add an IP
address to a system and then use it like two distinct servers.
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Roger
On 20 Feb 2015 19:29:44 GMT, Rob  wrote:

>>>Why not just:
>>>
>>>pool pool.ntp.org
>>>
>>>That should be enough.
>>
>> I did have just one line "pool uk.pool.ntp.org" but the rogue
>
>Did I write "pool uk.pool.ntp.org"?  I don't think so...

No, you didn't. Did I say that you did? It is what I had in my
ntp.conf.

>> server didn't get dropped even after 27 hours. I included the
>> "uk" to try to make sure that the servers were as local as
>> possible. Without that they could be anywhere in Europe.
>
>No, the "pool.ntp.org" name selects the closests servers.
>Close enough when you consider the pool good enough.

Experience tells me that IP addresses are selected on a regional
basis, not a country basis. Sometimes they are all in the UK,
but not always. For example, earlier today one of the servers
that was offered using pool.ntp.org was in Hungary. Putting the
country code in makes it more likely that the IP addresses are
local.
-- 
Roger

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


Re: [ntp:questions] NTP with 2 servers

2015-02-20 Thread Charles Swiger
On Feb 20, 2015, at 12:17 PM, Nuno Pereira  wrote:
> In our infrastructure we had some ntp clients that don't have access to the
> world and so they are configured to use only 2 servers (by the way, the other
> have 2 more options). In reality both servers are the same, but with different
> IPs.

I think ntpd would see the same reference id for that timesource regardless
of which IP you reach it by, and loop detection would figure it out.

[ ... ]
> Given that, I have changed the configuration, and now they only use 1 server,
> but that is not a good solution.

Using 1 server is better than using 2.
Using at least 4 servers is better than using 1.

> Any alternative for the configuration? More servers, most likely virtual 
> servers?

VMs make anywhere from terrible to adequate timeservers.
Bare metal or at the hypervisor level is preferable.

Setup a local NTP subnet of at least 4 peers, and have your clients talk to 
each of those.
Your chosen ntp servers should each be configured with at least one unique 
timesource
which is not used by anything else to promote diversity.

Regards,
-- 
-Chuck

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread William Unruh
On 2015-02-20, Roger  wrote:
> http://www.pool.ntp.org/scores/90.155.73.34
>
> How does one alert an operator that their server is sick?
> Checking back through my peerstats I see that last entry
> which was okay was 2015-02-16 15:08:56.

Send them an email?

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread William Unruh
On 2015-02-19, Paul  wrote:
> On Thu, Feb 19, 2015 at 5:34 AM, David Taylor <
> david-tay...@blueyonder.co.uk.invalid> wrote:
>
>> Does not NTP's orphan mode and local clock driver provide this?
>
>
> Refclock 1 (LOCAL/LOCL) is deprecated and I believe as of a recent release
> it's useless* but "Orphan mode is intended to replace the local clock
> driver. It provides a single simulated UTC source ...".  Note that I
> provided a link not any commentary on the correctness of the claims at that
> link.  It would be nice if the Chrony docs told the truth but likewise the
> NTP docs.

??? how do assume that the chrony docs do not tell the truth? 

>
> *Previously LOCL+PPS was a useful configuration, now you need (or should)
> use kernel PPS.

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread William Unruh
On 2015-02-19, Rob  wrote:
> Miroslav Lichvar  wrote:
>> My update to that after the years would be that 3x is not really the
>> minimum difference. If the clock is stable enough, they can perform
>> similarly.
>
> Indeed when a system is in a reasonably constant temperature and the
> clock happens to be good, ntpd performs similar to chrony.

As I said, I believe that one of the reasons chrony is better is because
it reacts to changes, like temp change, much faster. If there are no
changes, I suspect, but cannot prove, that they are very similar. But
most people do not have temperature controlled crystals on their
computer, and most people have variable work that their computer does,
so the internal temperature fluctuates. 

>
> We have systems in places that are not temperature controlled and then
> chrony is much better.  I am looking for the best way to find the
> values to use in the tempcomp configuration directive.
>
> Ideally there would be a program that analyzes a log of momentary
> temperature and frequency values to find the coefficients, but how
> is such a logfile even generated?
>
> Should I enter a tempcomp line with zero coefficients and then use
> the tempcomp logging?


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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread William Unruh
On 2015-02-19, David Taylor  wrote:
> On 19/02/2015 01:24, Paul wrote:
> []
>> Chrony (in general) pros and cons: <
>> http://chrony.tuxfamily.org/manual.html#Other-time-synchronisation-packages>
> []
>
> ... whwre it says: "Things chronyd can do that ntpd can?t:  chronyd 
> provides support for isolated networks whether the only method of time 
> correction is manual entry (e.g. by the administrator looking at a clock)."
>
> Does not NTP's orphan mode and local clock driver provide this?
>

No. The local clock simply trusts the time (Ie all offsets are defined
to be zero) chrony takes the time as entered by hand by the operator and
uses that to determine the offset. Of course that will not be terribly
accurate ( a second is probably good), but if you are disconnected for a
month, a second is probably pretty good accuracy.


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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread William Unruh
On 2015-02-19, Rob  wrote:
> Miroslav Lichvar  wrote:
>> On Thu, Feb 19, 2015 at 10:05:45AM +, Rob wrote:
>>> We have systems in places that are not temperature controlled and then
>>> chrony is much better.  I am looking for the best way to find the
>>> values to use in the tempcomp configuration directive.
>>
>> What resolution does the sensor have? Don't expect good results
>> with 1C or 0.5C resolution that sensors on mainboards typically have.
>
> I am still finding out what sensor is best to use, we do have a room
> temperature sensor that has .1C resolution and is readable via snmp,
> and there are the usual sensors for board- and inlet air temperature.
> (and of course CPU temperature)
>
> It does not matter if it is only a course indication, the room temperature
> varies over a -10 .. 50C range (don't ask...) and a 1C resolution is not
> bad relative to that.

It is of course the temperature of the crystal itself that is important.
Ie, the room temp could be constant and the computer varies in its
workload and thus its internal temperature. Unfortunately temp sensors
on the crystal are rare in commodity computers. 

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread William Unruh
On 2015-02-19, Rob  wrote:
> Miroslav Lichvar  wrote:
>> On Thu, Feb 19, 2015 at 12:48:46PM +, Rob wrote:
>>> I am still finding out what sensor is best to use, we do have a room
>>> temperature sensor that has .1C resolution and is readable via snmp,
>>> and there are the usual sensors for board- and inlet air temperature.
>>> (and of course CPU temperature)
>>> 
>>> It does not matter if it is only a course indication, the room temperature
>>> varies over a -10 .. 50C range (don't ask...) and a 1C resolution is not
>>> bad relative to that.
>>
>> In my tests using a sensor with 1C resolution it was barely useful
>> with NTP sources and 1024s polling interval. If the sensitivity is
>> around 0.1 ppm per degree, 1C resolution means the compensation
>> jumping the frequency in 0.1ppm steps. That's a lot, especially if you
>> compare it to the tracking skew with a refclock.
>
> Ok but of course we are using PPS and a 16 second polling interval.
> (or maybe the PPS refclock polls even faster although it displays 4 as
> the poll interval indicator)

The shm refclock will get one pulse per second, and then average the
offsets over a 16 sec period after getting rid of the outliers.

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


[ntp:questions] NTP with 2 servers

2015-02-20 Thread Nuno Pereira
Hello.

 

In our infrastructure we had some ntp clients that don't have access to the
world and so they are configured to use only 2 servers (by the way, the other
have 2 more options). In reality both servers are the same, but with different
IPs.

 

>From time to time some clients configured in this way lose their reference for
some short period.

 

I know how NTP works
(http://www.ntp.org/ntpfaq/NTP-s-algo-real.htm#Q-NTP-ALGO), and so this seems
to be caused by both 2 servers or just 1 of them not have survived.

But both the clients and the servers are physically in the same place, and
even if they aren't in the same IP network, they are in the same LAN with just
a switch or two between them (delay is between 1 and 2 ms).

 

And the question is why this does happen in the local network?

Aren't they close enough in order to avoid a split?

 

 

Given that, I have changed the configuration, and now they only use 1 server,
but that is not a good solution.

Any alternative for the configuration? More servers, most likely virtual
servers?

 

Thank you.

 

 

Nuno Pereira

G9Telecom

 

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

Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Rob
Roger  wrote:
> On 20 Feb 2015 17:49:15 GMT, Rob  wrote:
>
>>Roger  wrote:
>>> On Fri, 20 Feb 2015 12:45:54 +, Roger
>>>  wrote:
>>>
After about 11 minutes it has dropped one, leaving 6 servers.
I'll continue to monitor and report back.
>>>
>>> Just to recap, I now have this in my ntp.conf:
>>>
>>> pool 0.uk.pool.ntp.org
>>> pool 1.uk.pool.ntp.org
>>> pool 2.uk.pool.ntp.org
>>> pool 3.uk.pool.ntp.org
>>
>>Why not just:
>>
>>pool pool.ntp.org
>>
>>That should be enough.
>
> I did have just one line "pool uk.pool.ntp.org" but the rogue

Did I write "pool uk.pool.ntp.org"?  I don't think so...

> server didn't get dropped even after 27 hours. I included the
> "uk" to try to make sure that the servers were as local as
> possible. Without that they could be anywhere in Europe.

No, the "pool.ntp.org" name selects the closests servers.
Close enough when you consider the pool good enough.

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Roger
On 20 Feb 2015 17:49:15 GMT, Rob  wrote:

>Roger  wrote:
>> On Fri, 20 Feb 2015 12:45:54 +, Roger
>>  wrote:
>>
>>>After about 11 minutes it has dropped one, leaving 6 servers.
>>>I'll continue to monitor and report back.
>>
>> Just to recap, I now have this in my ntp.conf:
>>
>> pool 0.uk.pool.ntp.org
>> pool 1.uk.pool.ntp.org
>> pool 2.uk.pool.ntp.org
>> pool 3.uk.pool.ntp.org
>
>Why not just:
>
>pool pool.ntp.org
>
>That should be enough.

I did have just one line "pool uk.pool.ntp.org" but the rogue
server didn't get dropped even after 27 hours. I included the
"uk" to try to make sure that the servers were as local as
possible. Without that they could be anywhere in Europe.

Terje made the suggestion about too few servers. DNS returns 4
IP addresses at a time. By having four lines ntpd could have 12
different IP addresses returned if it used all four lines.

As I'm not capable of going through the source code and trying
to work out the best strategy I have to do it by trial and
error.
-- 
Roger

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Charles Swiger
On Feb 20, 2015, at 10:55 AM, Jan Ceuleers  wrote:
> Using dig on a sample of the pool it seems that DNS queries to the pool
> only ever return 4 entries.

Per request, yes-- with something like a 150 or 300 second TTL.
Hopefully, you get a different set of hosts returned from:

dig 0.uk.pool.ntp.org  ..vs..
dig 1.uk.pool.ntp.org

> So if ntpd relies on there being around 10 servers for some of its monitoring
> capabilities to kick in then we seem to have a bit of a disconnect.

ntpd wants to have at least 4 servers around for falseticker detection.

Using the pool directive should encourage it to get at least 5 - 6 sources,
but you might have to wait some time before it re-queries for new servers
if you only listed a single pool directive.

Regards,
-- 
-Chuck

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


Re: [ntp:questions] [Is deze mail veilig?] [Is this e-mail safe?] [Cet e-mail est-il sans danger?] Re: Pool server gone wild

2015-02-20 Thread Jan Ceuleers
On 20/02/15 18:49, Rob wrote:
> Why not just:
> 
> pool pool.ntp.org
> 
> That should be enough.

It returns only 2 servers (at the moment, and on my system):

root@hobbiton:~# dig pool.ntp.org

; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> pool.ntp.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7739
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 13, ADDITIONAL: 25

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;pool.ntp.org.  IN  A

;; ANSWER SECTION:
pool.ntp.org.   146 IN  A   85.201.95.107
pool.ntp.org.   146 IN  A   213.189.188.3

;; AUTHORITY SECTION:
.   36537   IN  NS  f.root-servers.net.
.   36537   IN  NS  b.root-servers.net.
.   36537   IN  NS  j.root-servers.net.
.   36537   IN  NS  h.root-servers.net.
.   36537   IN  NS  m.root-servers.net.
.   36537   IN  NS  c.root-servers.net.
.   36537   IN  NS  k.root-servers.net.
.   36537   IN  NS  d.root-servers.net.
.   36537   IN  NS  g.root-servers.net.
.   36537   IN  NS  a.root-servers.net.
.   36537   IN  NS  l.root-servers.net.
.   36537   IN  NS  i.root-servers.net.
.   36537   IN  NS  e.root-servers.net.

;; ADDITIONAL SECTION:
a.root-servers.net. 300936  IN  A   198.41.0.4
a.root-servers.net. 301233  IN  2001:503:ba3e::2:30
b.root-servers.net. 300942  IN  A   192.228.79.201
b.root-servers.net. 317560  IN  2001:500:84::b
c.root-servers.net. 300974  IN  A   192.33.4.12
c.root-servers.net. 304383  IN  2001:500:2::c
d.root-servers.net. 110366  IN  A   199.7.91.13
d.root-servers.net. 121013  IN  2001:500:2d::d
e.root-servers.net. 112934  IN  A   192.203.230.10
f.root-servers.net. 101758  IN  A   192.5.5.241
f.root-servers.net. 107135  IN  2001:500:2f::f
g.root-servers.net. 110990  IN  A   192.112.36.4
h.root-servers.net. 11  IN  A   128.63.2.53
h.root-servers.net. 116217  IN  2001:500:1::803f:235
i.root-servers.net. 110930  IN  A   192.36.148.17
i.root-servers.net. 114101  IN  2001:7fe::53
j.root-servers.net. 111931  IN  A   192.58.128.30
j.root-servers.net. 118767  IN  2001:503:c27::2:30
k.root-servers.net. 112005  IN  A   193.0.14.129
k.root-servers.net. 8040IN  2001:7fd::1
l.root-servers.net. 111937  IN  A   199.7.83.42
l.root-servers.net. 113806  IN  2001:500:3::42
m.root-servers.net. 300975  IN  A   202.12.27.33
m.root-servers.net. 302827  IN  2001:dc3::35

;; Query time: 36 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Fri Feb 20 19:57:58 CET 2015
;; MSG SIZE  rcvd: 800

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Jan Ceuleers
On 20/02/15 18:46, Roger wrote:
> On Fri, 20 Feb 2015 12:45:54 +, Roger
>  wrote:
> 
>> After about 11 minutes it has dropped one, leaving 6 servers.
>> I'll continue to monitor and report back.
> 
> Just to recap, I now have this in my ntp.conf:
> 
> pool 0.uk.pool.ntp.org
> pool 1.uk.pool.ntp.org
> pool 2.uk.pool.ntp.org
> pool 3.uk.pool.ntp.org
> 
> After five hours ntpd is using the same 6 servers. Perhaps
> because all of the peerstats have been less than 3 milli-
> seconds ntpd is quite happy even though the reach of one of
> the servers isn't always 377.

Using dig on a sample of the pool it seems that DNS queries to the pool
only ever return 4 entries. So if ntpd relies on there being around 10
servers for some of its monitoring capabilities to kick in then we seem
to have a bit of a disconnect.

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Rob
Roger  wrote:
> On Fri, 20 Feb 2015 12:45:54 +, Roger
>  wrote:
>
>>After about 11 minutes it has dropped one, leaving 6 servers.
>>I'll continue to monitor and report back.
>
> Just to recap, I now have this in my ntp.conf:
>
> pool 0.uk.pool.ntp.org
> pool 1.uk.pool.ntp.org
> pool 2.uk.pool.ntp.org
> pool 3.uk.pool.ntp.org

Why not just:

pool pool.ntp.org

That should be enough.

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Roger
On Fri, 20 Feb 2015 12:45:54 +, Roger
 wrote:

>After about 11 minutes it has dropped one, leaving 6 servers.
>I'll continue to monitor and report back.

Just to recap, I now have this in my ntp.conf:

pool 0.uk.pool.ntp.org
pool 1.uk.pool.ntp.org
pool 2.uk.pool.ntp.org
pool 3.uk.pool.ntp.org

After five hours ntpd is using the same 6 servers. Perhaps
because all of the peerstats have been less than 3 milli-
seconds ntpd is quite happy even though the reach of one of
the servers isn't always 377.
-- 
Roger

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Terje Mathisen

Mike Cook wrote:

< snipped>


The server was still in the peerstats at 18:25 the following day
when I did a reboot. So, after approximately 27 hours, ntpd hadn't
dropped it. Obviously, my system isn't performing as you say it
should. Can you, or anyone else, provide a clue as to how I might
determine if my system is a fault or if there is a bug in the ntpd
code?


I.e. as long as you use the pool properly there is no need to
worry about servers coming and going, or even individual servers
that become falsetickers.


Hmmm. Sometime back I had noticed on my servers using the pool, that
a couple of the selected servers had stopped responding. I did not
know at the time that that situation was supposed to be dynamically
corrected so I dropped the pool as  being unreliable. Maybe there is
some issue. I just re-configured 4 servers back to using the pool and
will monitor for black sheep.


You have to use the 'pool' instead of 'server' command in order to get 
the automatic inclusion of multiple servers, with automatic monitoring 
and pruning.




When I first tried 4.2.8 I noticed the "soliciting" lines and that
occasionally a server didn't get used.


I have that too.


Could this also be because you don't have enough servers in your pool?

Terje

--
- 
"almost all programming can be viewed as an exercise in caching"

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Mike Cook
< snipped>
> 
> The server was still in the peerstats at 18:25 the following day
> when I did a reboot. So, after approximately 27 hours, ntpd
> hadn't dropped it. Obviously, my system isn't performing as you
> say it should. Can you, or anyone else, provide a clue as to how
> I might determine if my system is a fault or if there is a bug
> in the ntpd code?
> 
>> I.e. as long as you use the pool properly there is no need to worry 
>> about servers coming and going, or even individual servers that become 
>> falsetickers.

Hmmm. Sometime back I had noticed on my servers using the pool, that a couple 
of the selected servers had stopped responding. I did not know at the time that 
that situation was supposed to be dynamically corrected so I dropped the pool 
as  being unreliable. Maybe there is some issue. I just re-configured 4 servers 
back to using the pool and will monitor for black sheep.

> 
> When I first tried 4.2.8 I noticed the "soliciting" lines and
> that occasionally a server didn't get used.

 I have that too.

Feb 20 13:49:42 raspB2 ntpd[27451]: Soliciting pool server 195.154.41.195
Feb 20 13:50:48 raspB2 ntpd[27451]: Soliciting pool server 195.154.216.35
Feb 20 13:51:55 raspB2 ntpd[27451]: Soliciting pool server 5.39.78.25
Feb 20 13:51:56 raspB2 ntpd[27451]: Soliciting pool server 91.121.157.10
Feb 20 13:53:05 raspB2 ntpd[27451]: Soliciting pool server 195.154.78.115
Feb 20 13:54:12 raspB2 ntpd[27451]: Soliciting pool server 212.83.131.33
^Cmike@raspB2 ~ ntpq -pn
 remote   refid  st t when poll reach   delay   offset  jitter
==
*127.127.28.1.GPS2.   0 l4   16  3770.0000.008   0.006
+192.168.1.4 .PPS1.   1 u3   16  3770.9260.039   0.032
+192.168.1.23.GPS.1 u2   16  3770.5830.049   0.218
 0.pool.ntp.org  .POOL.  16 p-   6400.0000.000   0.004
+5.39.78.25  140.7.62.122 2 u   14   64   175.8832.928   0.047
+188.165.255.179 193.110.137.171  2 u2   6416.0790.342   0.057

It also seems to be soliciting every minute and 7 secs. rather than hourly.

Feb 20 13:49:42 raspB2 ntpd[27451]: Soliciting pool server 195.154.41.195
Feb 20 13:50:48 raspB2 ntpd[27451]: Soliciting pool server 195.154.216.35
Feb 20 13:51:55 raspB2 ntpd[27451]: Soliciting pool server 5.39.78.25
Feb 20 13:51:56 raspB2 ntpd[27451]: Soliciting pool server 91.121.157.10
Feb 20 13:53:05 raspB2 ntpd[27451]: Soliciting pool server 195.154.78.115
Feb 20 13:54:12 raspB2 ntpd[27451]: Soliciting pool server 212.83.131.33
Feb 20 13:55:18 raspB2 ntpd[27451]: Soliciting pool server 188.165.255.179
Feb 20 13:55:19 raspB2 ntpd[27451]: Soliciting pool server 91.121.167.51
Feb 20 13:56:28 raspB2 ntpd[27451]: Soliciting pool server 178.32.54.53
Feb 20 13:57:35 raspB2 ntpd[27451]: Soliciting pool server 91.121.165.146
Feb 20 13:58:42 raspB2 ntpd[27451]: Soliciting pool server 91.121.169.20
Feb 20 13:59:50 raspB2 ntpd[27451]: Soliciting pool server 37.187.107.140
Feb 20 14:00:58 raspB2 ntpd[27451]: Soliciting pool server 195.154.108.164
Feb 20 14:02:05 raspB2 ntpd[27451]: Soliciting pool server 178.32.54.53
Feb 20 14:03:13 raspB2 ntpd[27451]: Soliciting pool server 129.250.35.250
Feb 20 14:04:22 raspB2 ntpd[27451]: Soliciting pool server 5.39.71.117
Feb 20 14:05:31 raspB2 ntpd[27451]: Soliciting pool server 129.250.35.251
Feb 20 14:06:38 raspB2 ntpd[27451]: Soliciting pool server 37.187.2.84
Feb 20 14:07:45 raspB2 ntpd[27451]: Soliciting pool server 87.98.188.218


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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Roger
On Fri, 20 Feb 2015 12:38:50 +0100, Terje Mathisen
 wrote:

>Roger wrote:
>> On Fri, 20 Feb 2015 10:15:31 +0100, Terje Mathisen
>>  wrote:
>>
>>> Rob wrote:
 Roger  wrote:
>   http://www.pool.ntp.org/scores/90.155.73.34
>
> How does one alert an operator that their server is sick?
> Checking back through my peerstats I see that last entry
> which was okay was 2015-02-16 15:08:56.

 There is no need.  The pool system has sent a mail to the operator
 and when he apparently does not react it is not a problem because
 the server will have been removed from the pool anyway.

>>> You are of course correct, I would just add a single small caveat:
>>
>> OK, Rob, thanks for that.
>>
>>> If you are using an older version of ntpd which doesn't support the pool
>>> directive, then you would be stuck trying to access such a server until
>>> you restart ntpd.
>>>
>>> With something like 'pool pool.ntp.org' in your ntp.conf file the ntpd
>>> process will pick the first N (10) servers returned from DNS, then once
>>> every hour it will redo the DNS lookp, the two worst-performing current
>>> servers will be removed and a pair of new ones will be used to replace them.
>>
>> I'm using 4.2.8p1 (compiled using gcc 4.8.2 and binutils 2.23,
>> if those are important) and "pool uk.pool.ntp.org" as the only
>> selection line.
>
>The UK pool might have too few servers.
>
>What does your 'ntpq -p' look like?
>
>If you have less than 10 servers then none of them will be dropped 
>afair, but you can tweak this limit with a fudge command.

Thank you for your fast response. A dig of uk.pool.ntp.org gives
4 addresses. I've changed my ntp.conf to have 4 pool lines
selecting 0.uk, 1.uk, 2.uk, and 3.uk (each of these gives 4
addresses, presumably all different). Restarting ntpd it
solicited 7 servers all of which show up with "ntpq -p" (along
with the four pool lines).

After about 11 minutes it has dropped one, leaving 6 servers.
I'll continue to monitor and report back.
-- 
Roger

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Roger
On Fri, 20 Feb 2015 10:15:31 +0100, Terje Mathisen
 wrote:

>Rob wrote:
>> Roger  wrote:
>>>  http://www.pool.ntp.org/scores/90.155.73.34
>>>
>>> How does one alert an operator that their server is sick?
>>> Checking back through my peerstats I see that last entry
>>> which was okay was 2015-02-16 15:08:56.
>>
>> There is no need.  The pool system has sent a mail to the operator
>> and when he apparently does not react it is not a problem because
>> the server will have been removed from the pool anyway.
>>
>You are of course correct, I would just add a single small caveat:

OK, Rob, thanks for that.

>If you are using an older version of ntpd which doesn't support the pool 
>directive, then you would be stuck trying to access such a server until 
>you restart ntpd.
>
>With something like 'pool pool.ntp.org' in your ntp.conf file the ntpd 
>process will pick the first N (10) servers returned from DNS, then once 
>every hour it will redo the DNS lookp, the two worst-performing current 
>servers will be removed and a pair of new ones will be used to replace them.

I'm using 4.2.8p1 (compiled using gcc 4.8.2 and binutils 2.23,
if those are important) and "pool uk.pool.ntp.org" as the only
selection line.

The server was still in the peerstats at 18:25 the following day
when I did a reboot. So, after approximately 27 hours, ntpd
hadn't dropped it. Obviously, my system isn't performing as you
say it should. Can you, or anyone else, provide a clue as to how
I might determine if my system is a fault or if there is a bug
in the ntpd code?

>I.e. as long as you use the pool properly there is no need to worry 
>about servers coming and going, or even individual servers that become 
>falsetickers.

When I first tried 4.2.8 I noticed the "soliciting" lines and
that occasionally a server didn't get used. I've never noticed
ntpd dropping a server once it had started using it but this is
the first time that a server has been so obviously wrong that I
would have wanted it dropped/replaced.
-- 
Roger

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Terje Mathisen

Roger wrote:

On Fri, 20 Feb 2015 10:15:31 +0100, Terje Mathisen
 wrote:


Rob wrote:

Roger  wrote:

  http://www.pool.ntp.org/scores/90.155.73.34

How does one alert an operator that their server is sick?
Checking back through my peerstats I see that last entry
which was okay was 2015-02-16 15:08:56.


There is no need.  The pool system has sent a mail to the operator
and when he apparently does not react it is not a problem because
the server will have been removed from the pool anyway.


You are of course correct, I would just add a single small caveat:


OK, Rob, thanks for that.


If you are using an older version of ntpd which doesn't support the pool
directive, then you would be stuck trying to access such a server until
you restart ntpd.

With something like 'pool pool.ntp.org' in your ntp.conf file the ntpd
process will pick the first N (10) servers returned from DNS, then once
every hour it will redo the DNS lookp, the two worst-performing current
servers will be removed and a pair of new ones will be used to replace them.


I'm using 4.2.8p1 (compiled using gcc 4.8.2 and binutils 2.23,
if those are important) and "pool uk.pool.ntp.org" as the only
selection line.


The UK pool might have too few servers.

What does your 'ntpq -p' look like?

If you have less than 10 servers then none of them will be dropped 
afair, but you can tweak this limit with a fudge command.


Terje


The server was still in the peerstats at 18:25 the following day
when I did a reboot. So, after approximately 27 hours, ntpd
hadn't dropped it. Obviously, my system isn't performing as you
say it should. Can you, or anyone else, provide a clue as to how
I might determine if my system is a fault or if there is a bug
in the ntpd code?


I.e. as long as you use the pool properly there is no need to worry
about servers coming and going, or even individual servers that become
falsetickers.


When I first tried 4.2.8 I noticed the "soliciting" lines and
that occasionally a server didn't get used. I've never noticed
ntpd dropping a server once it had started using it but this is
the first time that a server has been so obviously wrong that I
would have wanted it dropped/replaced.




--
- 
"almost all programming can be viewed as an exercise in caching"

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread David Woolley

On 20/02/15 08:45, Roger wrote:

 http://www.pool.ntp.org/scores/90.155.73.34

How does one alert an operator that their server is sick?
Checking back through my peerstats I see that last entry
which was okay was 2015-02-16 15:08:56.



You could run whois on the address and contact the contact address 
given.  It is a small ISP (AAISP), so there is a good chance that the 
message will get through.


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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread Miroslav Lichvar
On Thu, Feb 19, 2015 at 10:58:14PM +, Harlan Stenn wrote:
> Would the temperature monitoring script and coefficient
> generation/processsing stuff be a good GSoC project?

Not really, it would be probably easier to write the scripts than
write the GSoC application.

I'd be more interested in some research on software temperature
compensation itself, how good the measurements need to be for a given
time reference to be useful etc.

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


Re: [ntp:questions] chrony as a server

2015-02-20 Thread Miroslav Lichvar
On Thu, Feb 19, 2015 at 04:15:45PM +, Rob wrote:
> > The default PPS refclock driver poll is 0 (1s), this be changed too
> > if the PPS signal has a higher rate. Some GPS units seems to have this
> > configurable (e.g. ublox NEO-6T).
> 
> The PPS really is 1 PPS, but I am not sure if chrony is evaluating each
> pulse separately or is averaging 16 pulse measurements into one clock
> adjustment group.  (as it says poll 4)

It's the latter. The PPS samples collected in one poll interval are
processed by a median filter and the result is used to update the
source statistics and update the clock.

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Terje Mathisen

Rob wrote:

Roger  wrote:

 http://www.pool.ntp.org/scores/90.155.73.34

How does one alert an operator that their server is sick?
Checking back through my peerstats I see that last entry
which was okay was 2015-02-16 15:08:56.


There is no need.  The pool system has sent a mail to the operator
and when he apparently does not react it is not a problem because
the server will have been removed from the pool anyway.


You are of course correct, I would just add a single small caveat:

If you are using an older version of ntpd which doesn't support the pool 
directive, then you would be stuck trying to access such a server until 
you restart ntpd.


With something like 'pool pool.ntp.org' in your ntp.conf file the ntpd 
process will pick the first N (10) servers returned from DNS, then once 
every hour it will redo the DNS lookp, the two worst-performing current 
servers will be removed and a pair of new ones will be used to replace them.


I.e. as long as you use the pool properly there is no need to worry 
about servers coming and going, or even individual servers that become 
falsetickers.


Terje

--
- 
"almost all programming can be viewed as an exercise in caching"

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


[ntp:questions] Pool server gone wild

2015-02-20 Thread Roger
http://www.pool.ntp.org/scores/90.155.73.34

How does one alert an operator that their server is sick?
Checking back through my peerstats I see that last entry
which was okay was 2015-02-16 15:08:56.
-- 
Roger

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


Re: [ntp:questions] Pool server gone wild

2015-02-20 Thread Rob
Roger  wrote:
> http://www.pool.ntp.org/scores/90.155.73.34
>
> How does one alert an operator that their server is sick?
> Checking back through my peerstats I see that last entry
> which was okay was 2015-02-16 15:08:56.

There is no need.  The pool system has sent a mail to the operator
and when he apparently does not react it is not a problem because
the server will have been removed from the pool anyway.

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