Page 1 of 1
Force NTP Client Update
Posted: Mon Aug 26, 2019 5:47 pm
by swits1109
Hello,
I have installed the NTP package. I am looking for a way to force the NTP client to update every 10 minutes via a script. Anyone know how to accomplish this?
Re: Force NTP Client Update
Posted: Mon Aug 26, 2019 7:24 pm
by sebastia
Hey
ntp client will determine on it's own how frequently it should poll the upstream server for time update. Usually it starts at 64s and backs down down to 1024s, once clocks are in sync and drift is under control.
Re: Force NTP Client Update
Posted: Mon Aug 26, 2019 7:29 pm
by swits1109
Hey
ntp client will determine on it's own how frequently it should poll the upstream server for time update. Usually it starts at 64s and backs down down to 1024s, once clocks are in sync and drift is under control.
The problem is that mine is drifting too much for some reason, I need to manually update it via scheduler.
Re: Force NTP Client Update
Posted: Mon Aug 26, 2019 7:34 pm
by mkx
Hey
ntp client will determine on it's own how frequently it should poll the upstream server for time update. Usually it starts at 64s and backs down down to 1024s, once clocks are in sync and drift is under control.
The problem is that mine is drifting too much for some reason, I need to manually update it via scheduler.
Usually it takes a few days for drift to get under control. If you manually adjust time while drift is being determined, you're screwing the process and will only take longer.
Unless, of course, the drift is really wild (e.g. more than 1000 PPM) ... in that case just forget about using RB as reference time server for other devices...
Re: Force NTP Client Update
Posted: Mon Aug 26, 2019 7:36 pm
by cifzo
The NTP client does not store the DNS name, but converts it to the IP and stores that (in Winbox). So each time you enter a name (e.g. pool.ntp.org), it will populate with new IPs from the pool. When it does that, I believe it re-synchronizes. So just write a script to repopulate those values.
:local ntpServer "3.us.pool.ntp.org"
:local primary [resolve $ntpServer]
/system ntp client set primary-ntp $primary
Re: Force NTP Client Update
Posted: Mon Aug 26, 2019 7:58 pm
by swits1109
The NTP client does not store the DNS name, but converts it to the IP and stores that (in Winbox). So each time you enter a name (e.g. pool.ntp.org), it will populate with new IPs from the pool. When it does that, I believe it re-synchronizes. So just write a script to repopulate those values.
:local ntpServer "3.us.pool.ntp.org"
:local primary [resolve $ntpServer]
/system ntp client set primary-ntp $primary
I set this up. Will see how it helps. Thanks!