[ntp:questions] Change poll interval at runtime?
Ron Frazier (NTP)
timekeepingntplist at c3energy.com
Sun Feb 26 06:41:42 UTC 2012
On 2/26/2012 1:00 AM, A C wrote:
> On 2/25/2012 21:55, Ron Frazier (NTP) wrote:
>> On 2/25/2012 5:05 PM, A C wrote:
>>> On 2/25/2012 13:09, Richard B. Gilbert wrote:
>>>> On 2/25/2012 1:20 AM, A C wrote:
>>>>> On 2/24/2012 21:26, A C wrote:
>>>>>> Is it possible to change the polling interval of one or more
>>>>>> associated
>>>>>> servers at runtime? It seems like I should be able to run:
>>>>>>
>>>>>> ntpq -c "writevar &associd hpoll=N" or is it ppoll?
>>>>>>
>>>>>
>>>>> Actually, I should have been more specific and say change the minimum
>>>>> polling interval. In other words, be able to adjust the conf file's
>>>>> minpoll flag at runtime instead of restarting.
>>>>
>>>> What problem are you trying to solve?
>>>>
>>>> NTPD does a pretty good job of adjusting itself most of the time.
>>>>
>>>> Short poll intervals are useful when correcting large errors.
>>>> Long poll intervals allow NTPD to make small corrections very
>>>> accurately.
>>>
>>> The idea was to bump up the minimum poll interval after ntpd has been
>>> running for a day or so to something more kind to the remote servers
>>> because the refclock is holding the remote servers clamped to 64
>>> seconds. If I set minpoll in the config file, then ntpd's start up
>>> takes a long time because of a long poll interval. If I don't set the
>>> minpoll, then ntpd doesn't do "a pretty good job" because it clamps
>>> the polling interval.
>>>
>>
>> I've noticed the same thing. You could try what I'm doing, although I'm
>> still testing for the best configuration.
>>
>> # GPS Lines
>> server 127.127.20.5 prefer minpoll 3 maxpoll 6 mode 72
>> fudge 127.127.20.5 time2 0.3100 refid GPS1
>>
>> # Internet server lines
>> # NIST New York
>> server nist1-ny.ustiming.org minpoll 8 maxpoll 13
>>
>> # other internet server lines similar
>>
>> Sincerely,
>
> I know I can do that to the config file but then it takes forever to
> synchronize. As I said, the idea was to not give a min/maxpoll so
> that ntpd would converge on a clock adjustment quickly (polling once
> ever 64 seconds) and then, after a couple days, I could throttle back
> the polling interval without restarting the server and changing the
> configuration file.
>
I'm polling the GPS every 8 seconds, and it's the preferred server. I'm
allowing it to poll the GPS at up to every 64 seconds. Note that I've
forced the internet servers to a longer interval, but that doesn't
affect convergence time if the GPS server is my primary time source,
denoted with "*", as far as I can tell. I can preset the clock to
within a few 10's of ms or so with something like NTPDATE to an internet
NIST server, or even with the GUI interface to the clock to within 300
ms or so if I'm really careful how I click the mouse button. Once I
start NTPD, it locks into the GPS and starts polling every 8 seconds. I
get synchronized to within 20 ms or so within just a few minutes. A few
minutes more, and I get to the level of accuracy which is at the limit
of my USB GPS, which is about 6 mS. I don't know if you're running PPS
or not. I'm not running PPS. If you need uS accuracy, I'm sure it will
take longer. What I'm describing is running on Windows. I've tried to
do the same thing on Linux. However, when I'm on Linux, even if the
clock is synchronized to within 30 mS when I start NTPD, I immediately
get offsets reported from all clock sources in the 500 - 5000 mS
range. I don't know why. The best I can do is to sync the clock with
the GUI interface while NTPD is running and get it to within 300 - 500
ms just comparing to my wristwatch (which is atomic). Then I let it
sync up from there. I think there is a problem with the startup code in
NTPD when it's pulling time from the NMEA driver and running Linux. You
cannot run NTPDATE while NTPD is running, which is why I have to use the
GUI. However, in Windows at least, I don't have to wait any more than
half an hour to get synchronized to within the limits of my equipment.
Sincerely,
Ron
--
(PS - If you email me and don't get a quick response, don't be concerned.
I get about 300 emails per day from alternate energy mailing lists and
such. I don't always see new messages very quickly. If you need a
reply and have not heard from me in 1 - 2 weeks, send your message again.)
Ron Frazier
timekeepingdude AT c3energy.com
More information about the questions
mailing list