Community discussions

 
swits1109
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sat Sep 10, 2016 6:03 pm

Force NTP Client Update

Mon Aug 26, 2019 5:47 pm

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?
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1790
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: Force NTP Client Update

Mon Aug 26, 2019 7:24 pm

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.
 
swits1109
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sat Sep 10, 2016 6:03 pm

Re: Force NTP Client Update

Mon Aug 26, 2019 7:29 pm

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.
 
mkx
Forum Guru
Forum Guru
Posts: 3183
Joined: Thu Mar 03, 2016 10:23 pm

Re: Force NTP Client Update

Mon Aug 26, 2019 7:34 pm

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...
BR,
Metod
 
cifzo
just joined
Posts: 12
Joined: Mon Feb 18, 2019 10:35 pm

Re: Force NTP Client Update

Mon Aug 26, 2019 7:36 pm

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
 
swits1109
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 64
Joined: Sat Sep 10, 2016 6:03 pm

Re: Force NTP Client Update

Mon Aug 26, 2019 7:58 pm

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!

Who is online

Users browsing this forum: No registered users and 126 guests