2

I've got ntpd running. It's been running for a while, and the polling frequency is up to the max of 1024

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*time.local      132.163.4.102    2 u  813 1024  377    0.109   -0.209   0.342

For whatever reason, I would like to set the polling frequency back to 128 sec. I don't mind if, after it does 128 sec for a while, it follows its usual plan of increasing the poll frequency back to 1024. But right now, at this moment, I want it at 128.

Is there a way to do that? The only way I know is to restart ntpd.

  • I haven't tried much of anything. I ran ntpq and read the man pages for ntpq and the old ntpdc , but none of them had any obvious reference to changing the current polling frequency. – hymie Oct 10 '16 at 10:04
0

Yes - but you will need to restart ntpd to reload the config.

Have a look at the docs here.

You can set two options minpoll n and maxpoll n which you can adjust to give you the desired upper and lower limits.

These options specify the minimum and maximum poll intervals for NTP messages, in seconds to the power of two. The maximum poll interval defaults to 10 (1,024 s), but can be increased by the maxpoll option to an upper limit of 17 (36.4 h). The minimum poll interval defaults to 6 (64 s), but can be decreased by the minpoll option to a lower limit of 4 (16 s).

For example in my config I list;

server 127.127.28.1 minpoll 4 which polls my gps pps every 16sec.

minpoll & maxpoll cal be used together.

I don't believe there is any way to reduce the poll frequency 'now' and have it work back up to 1024 but you can reduce it and keep it within a more desired window.

  • I'm sorry if I wasn't clear. I'm not asking how to permanently reconfigure my ntpd and I emphatically do not want to stop and restart it. It is running and I want to adjust it. – hymie Oct 10 '16 at 10:05
  • then the only way I can think of is to make the current peer unreachable and ntpd should reduce its poll interval - but that's about it and there is no guarantee it will work. NTP does its own thing unless you reconfigure it and you have to HUP or restart it either way once you change the config (which is not what you want) – user3788685 Oct 10 '16 at 17:24
0

It would be theoretically possible if you had configured authentication keys ahead of time in /etc/ntp.conf, found the association id with ntpq, and used the writevar command on the association id to change the polling interval.

Except that the only association variable you're allowed to change at runtime is the leap second indicator. See https://lists.ntp.org/pipermail/questions/2005-February/004382.html for an explanation of this and a pointer to the code that implements it.

In short, no it's not possible. Why do you think you want to change the polling interval anyway?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.