[ntp:questions] Change poll interval at runtime?

unruh unruh at invalid.ca
Mon Feb 27 04:26:44 UTC 2012

On 2012-02-27, Richard B. Gilbert <rgilbert88 at comcast.net> wrote:
> On 2/26/2012 6:20 PM, unruh wrote:
>> On 2012-02-26, Richard B. Gilbert<rgilbert88 at comcast.net>  wrote:
>>> On 2/26/2012 12:55 AM, 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 prefer minpoll 3 maxpoll 6 mode 72
>>>> fudge 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,
>>>> Ron
>>> NTPD adjusts the poll interval dynamically.  Just because MINPOLL=4 does
>>> not mean that the poll interval is "stuck" there.  Give NTPD a
>>> rock solid 1 second per second source it will ramp up the poll interval
>>> to 1024 seconds.  Those "rock solid" ticks can frequently be found
>>> 1:00AM to 5:00AM local time.  The net quiets down and NTPD takes
>>> shameless advantage.
>>> If you really want good time and can afford a GPS *timing* receiver
>>> that's the way to do it.  The last I heard, you could get a timing
>>> receiver for $100 -- $300.
>> Try $35. The Sure gps is a "timing receiver" in that it has a PPS pulse
>> with a 20ns or so rise time, and probably comparable accuracy.
>> If you want a receiver which a) does a location survey and then uses
>> that location to derive the time even from a single sattelite, b) tells
>> you what the sawtooth correction is
>> (which may be what you think of as a timing receiver) then that is in
>> the range you mention. Mind you if you are feeding a computer, you
>> cannot actually get that ns level time accuracy into your system, since
>> interrupts take 1-10us to be processed.
>>> ANY GPS receiver knows what time it is but the navigation receivers
>>> give priority to location.  Timing receivers give priority to delivering
>>> the correct time.
>> Unfortunately most gps may know what the time is but they keep it
>> secret. You need to look for a PPS output to get the time out from the
>> receiver.
> ALL GPS receivers know both the time and the latitude and longitude. 
> The navigation receivers are optimized for use as navigation device
> while the timing receivers are optimized to deliver time.
> Typically, a timing receiver has a pulse per second output, one edge of 
> which is accurate to within about 50 nanoseconds.  In order to get this
> accuracy, it is necessary to do a "site survey" which establishes

But a "site survey" is what "latitude and longitude" is. Most gps with
PPS output do not do a long "site survey" to determine their position.
They get the position and time from the four or more sattelites they are tracking.
Some do a long term averaging of the position to get rid of random
errors. This makes perhaps at most a 30ns difference in the time accuracy of the
PPS. They will also remember that position, so that they can use only a
single sattelite to get the time, instead of needing 4 of them. But
again, those are rarer than those that simply send out the time via the
PPS based on the current measurements for 4 sattelites. 
They will also report what the error in the PPS was due to the
"sawtooth" correction (difference between true time and nearest "local
oscillator crossing zero" time at which the PPS was sent out. 
> the position of your GPS receiver's antenna.  Once you know the position
> of your antenna you can calculate the time.  This is "overkill" for most 
> people.  If you need something to happen simultaneously in New York 
> City, and in Los Angeles, GPS timing can get you to within
> ~50 ns.

Actually it can get you within a few (<10)ns. This is what long baseline
radio astronomers do.  (also what people who measure neutrino speeds do,
but badly)


More information about the questions mailing list