Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 35501  / 1 Year ago, wed, march 15, 2023, 2:47:30

I'm setting up Ubuntu on an embedded machine that runs over a cellular connection, where we pay per byte. The machine also has no RTC battery, so it starts from a random time every boot.



I'd like to ensure that the time gets synced up when the cellular connection comes available so that log messages, etc have real times, but I also don't want to pay an arm and a leg for NTP traffic.



Can I customize the rate at which NTP updates the time? I'm using openntpd currently, but I'm not wedded to it.



The internet is not necessarily up at boot, so ntupdate and related at startup won't work. And scheduling via cron means waiting for the scheduled task to kick in, whereas I want a time daemon to get a time sync ASAP.


More From » ntp

 Answers
7

Some of these answers could win the obfuscated ntp configuration contest.



Use the ntp reference implementation and use iburst to set the time quickly upon booting. After that the you can use the minpoll directive to limit how often ntpd queries remote time servers. This will allow you to take advantage of ntpd's clock disciplining and keep the bandwidth down.



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


Chrony is a good alternative to the ntp reference implementation. Openntpd is not.


[#38395] Wednesday, March 15, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
initiallartebeest

Total Points: 24
Total Questions: 118
Total Answers: 105

Location: Venezuela
Member since Thu, Jul 15, 2021
3 Years ago
;