On Fri, Mar 26, 2021 at 02:06:34PM +0100, Stefano Sambi wrote:
> Hi,
> I'm using ptp4l 2.0. On the slave I'm monitoring the lock status ("s2",
> "s1", "s0") to detect when the synchroniziation fails, and I configured the
> following parameter to be sure the syncronization is always under 10 ms:
>  step_threshold 0.01

That option doesn't ensure synchronization.  It only allows the clock
to jump.

> Unfortunately, rarely a spike in the master offset occurs, and the status
> goes immediately to "s0".

Because you asked for that behavior using step_threshold!

> Is there any parameter to filter these spikes,

The program doesn't have any outlier rejection logic.

> in order to use the status
> to detect synchronization failures and at the same time be sure that the
> real offset is under 10 ms?

The offset numbers are not the "real offsets" but rather an
instantaneous estimation.  You need another method, like a PPS, to
measure the actual offset.  This can be done once as a calibration
procedure.  Another way is to use the reverse measurement (see nsm -
NetSync Monitor client).

The larger question is why your offsets are so large and jittery.
Are you using SW time stamping?  Is your network full of non-PTP
equipment?

If you are using HW time stamping, then you can mitigate the effect of
the noisy network by adjusting the PI weights (like kP = .1, kP = .001)

HTH,
Richard


_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to