[chrony-dev] Feature request: Set RTC if error > X secs

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Hi, I have a feature request that I suspect might be straightforward:

- I have a number of routers with RTC that we need to initialise and get a rough time/date on them. This is quite a slow process booting up each, SSH in, wait for clock to be set and then use chronyc to force RTC to save the time. At the moment it takes a human to do each one (slow). The RTC date seems to default to 2000 (or 1970 sometimes..)

- For various reasons it's helpful to keep the RTC reasonably close to "real time". The reason is that the boxes can often be flashed or have the volatile storage reset, so the chrony offset to RTC is often lost. Also the routers are often left disconnected from the internet for long periods, so no reliable NTP is generally available (perhaps a few mins a week at most and over a very congested connection at that time)

- Many of the routers have a GPS attached which sets the clock

So at present I run cron once an hour and use that to sync current time to RTC. I could also use kernel to do this but I'm hoping an hour is enough for RTC drift to be measured and estimated.

So what might be very helpful is when sync is established with some reliable source, AND the RTC is identified as more than X seconds out, then immediately sync RTC. That way I could set say 30 secs as the error term, measure the drift for as long as possible, but equally if the machine boots up with a vastly wrong clock then it's immediately corrected once clock sync is established (this would make initialising these devices much simpler)

(Case in point is I have a router which has somehow lost it's clock, owner is booting it up, it gets time, but then the owner turns it off 5 mins later and the RTC doesn't get saved...)

Grateful if you could consider this...

Thanks

Ed W

--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/