Re: [chrony-users] Chrony not taking SOCKET data from Application

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


AFAIK , rtcsync syncs the rtc clock to the system clock when the rtcsync
directive is given. It is not a continuous process. chrony itself measures the
offset and drift of the rtc and remembers them when next it is asked to set
the system clock from the rtc. That assumes that nothing else has altered the
rtc, and that the temperature of the rtc has been constant, because its drift
is strongly influenced by temperature. There is aslo the keernel 11 min sysnc,
where the kernel every 11 min can reset the rtc from the system clock. In that
case measuring the drift does not work.

The problem with chrony's use of the rtc drift is precisely the temperature
dependence. That drift is measured while the computer is running and thus warm. But it is
usually used after the computer has been off and thus cold. (and unfortunately
the computer cannot take that into account since it is not running or
measuring anything while it is off). But anyway, chrony uses the rtc only on switchon. It does not use it at other
times.

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 ______|_    theory.physics.ubc.ca/

On Mon, 13 Mar 2023, sarveshwar k wrote:

[CAUTION: Non-UBC Email]Hi Miroslav Lichvar,
Does "rtcsync" directive starts syncing RTC with system time irrespective of refclocks syncing the
System clock.

No, rtcsync does a one time sysnc of the rtc with system time.


Can we configure as like below:
1. Using refclocks for GPS and PPS, sync the system clock
2. Once system clock is synced, RTC should be synced
3. If no refclock signals available for GPS and PPS, rtcsync shall not happen

Thanks & Regards
Sarveshwar.K

On Fri, Feb 24, 2023 at 10:37 AM Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:

      On Fri, 24 Feb 2023, sarveshwar k wrote:

      > [CAUTION: Non-UBC Email]Hi Miroslav Lichvar,
      > Can I use pps directive to a PPS refclock?
      > refclock PPS /dev/pps1 poll 0 pps lock GPS refid PPS trust prefer
      >
      > Will this increase the accuracy?

No.

      >
      > I am using below refclocks:
      > refclock PPS /dev/pps1 poll 0 lock GPS refid PPS trust prefer
      > refclock SOCK /var/run/chrony/udssocket.sock poll 0 refid GPS noselect

      It is not going to poll at GHz rates (that is the speed of the computer) I am
      not sure but suspect polling would be better, but could also be more subject
      to delays if the computer is busy. Do not know if anyone has compared polling
      to interrupt.

      >
      > As we are using GPS and 1PPS, our assumption is chrony synchronizes system clock with
      nanosecond
      > level accuracy. Am I right on this? But we see microsecond level accuracy even after
      using
      > makestep directive.

      No. It cannot. The clock does not even send out the PPS with ns accuracy. Most
      gps receivers put out a pps signal which is a sawtooth accuracy of tens of ns
      displacement which can be corrected later, if you have a timeing gps.
      Furthermore one needs to set up the PPS cabling so as to impedence match
      between the gps receiver, the cabling and the computer interface. or the pps
      edge will get rounded off and smeared out with an unknown relation to the
      actual time to probably hundreds of nanoseconds. Futher more the computer has
      to notice that the pulse has come in and to read the system clock which is of
      the order of a microsecond. Now if you had a super accurate clock that you
      could compare the computer time with the UPS time, then some of that error is
      systematic and could be subtraced off. The random fluctuation can be averaged
      out in chrony to maybe 100ns, but of course systematic errors cannot be
      averaged out. So you are probably goot to a microsecond, not nanoseconds.

      >
      > Thanks & Regards
      > Sarveshwar.K
      >
      > On Mon, Feb 20, 2023 at 3:56 PM sarveshwar k <sarveshwar.kt@xxxxxxxxx> wrote:
      >       Hi Miroslav,
      > Thanks for the information.
      >
      > >My question would be, why do you need the system clock to be so
      > >accurate? The CPU is connected to the outside world over PCIe, which
      > >has latency and possibly also asymmetry in hundreds of nanoseconds.
      > >What do you do on that computer that this accuracy would make a
      > >difference?
      > This system clock is being used by other applications like IMU sensor data
      timestamping. 
      > We are having this chrony running in an ECU (Electronic Control Unit) along with PTP
      stack
      > to send PTP packets to other ECUs in the network to get synced to Master ECU.
      >
      > Thanks & Regards
      > Sarveshwar.K
      >
      > On Thu, Feb 16, 2023 at 1:59 PM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
      >       On Thu, Feb 16, 2023 at 10:04:02AM +0530, sarveshwar k wrote:
      >       > Is it not possible to achieve synchronization accuracy less than 100ns with
      >       > chrony (with GPS and 1PPS).
      >
      >       With HW timestamping of the PPS signal (e.g. on the I210) it is
      >       possible, but difficult to verify.
      >
      >       My question would be, why do you need the system clock to be so
      >       accurate? The CPU is connected to the outside world over PCIe, which
      >       has latency and possibly also asymmetry in hundreds of nanoseconds.
      >       What do you do on that computer that this accuracy would make a
      >       difference?
      >
      >       > Can we configure chrony behaving as a measurement tool (not to make any
      >       > corrections)?
      >
      >       There is the chronyd -x option or the refclock noselect option for
      >       that.
      >
      >       --
      >       Miroslav Lichvar
      >
      >
      >       --
      >       To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
      >       with "unsubscribe" in the subject.
      >       For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
      >       with "help" in the subject.
      >       Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.
      >
      >
      >




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