Re: [chrony-users] Synchronize from precise RTC when offline or long time without synchronization

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


2017-12-14 20:09 GMT+01:00 Bill Unruh <unruh@xxxxxxxxxxxxxx>:


William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/

On Thu, 14 Dec 2017, Jan Breuer wrote:

We have a device based on RaspberryPi running recent Raspbian Linux. 
We are using TCXO based RTC which should keep time within ±3ppm (PCF2129).

3ppm is not terribly precise. That is 1 second in about 3 days. And if that is
your only timekeeper (source) it is all you are going to get.

I also don't need terribly precise device. It is just for time attendance of employees. So ±1 minute is ok in offline/holdover.
So it is much better then system clock, which is >20ppm.
With this RTC I can reach ±1 min within 8 months. With system clock, it can go away 1 minute per month, which is not acceptable.

I just want to tell the chrony to beliave RTC more then system clock in holdover.
So it will do opposite of trimrtc in holdover.
 
We also expect that some devices will work completely without network all the time so they will never see any NTP
server.

Then you are going to have to get some other source for time.


Yes, the administrator of the device is that source (and his wristwatch). No joke, that's my situation.
 

I would like to have the most precise time on my device. 
What I would like to do is to use RTC time in holdover (RTC->sys) and synchronize RTC in normal operation
(sys->RTC).

But without an external source, your system could drift by much more than
3PPM.

User will be able to manually set correct time in offline device if needed so this should also propagate to RTC.

A user setting will be good to more than 1 second.


I know that rtcsync option will do the sys->RTC
I know that with refclock, I can implement SHM/SOCK driver which do RTC->sys but this will prevent rtcsync on the
same RTC.

You do not want rtcsync. That makes the rtc run at the same rate as the
system, which in general is worse than 3PPM if it is undisciplined.


Thats it, I need chrony to conditionaly do rtcsync/trimrtc only in situation it is synced from better source.
And do hctosys in situation, it is not synchronized.
 
There is the chronyc command trimrtc, but again it is only good to about a
second.

Ok, trimrtc can be better then rtcsync for me.
 
Without an external source of time, your clock is going to be out by many
seconds. You can get cheap gps receivers with pps which you can use on an
isolated system which will get you acuracy down to microseconds. Or
intermittent network connectivity.

This is everything OK for me. I know it will be going out, so the user will be the only one who can correct it.
GPS is not a solution, because it can be inside a building and external antenna is no go. 



Is there a possibility to realise this so I can have both RTC->sys and sys->RTC depending on situation?

Jan Breuer


Jan Breuer


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