On Wed, Feb 04, 2026 at 04:23:40PM +0100, MOUHOUNE Samir wrote: > Dear chrony-users, > > I’m looking for guidance on how chrony should ideally handle validity and > stratum when using a PHC refclock. I’m working on an embedded Linux > system where the local time source is a PHC exposed via /dev/ptp0, and > chrony is configured with refclock PHC /dev/ptp0. > > We can detect source validity and stratum (from our upstream time system) > and expose those values in sysfs, but chrony’s PHC refclock doesn’t > appear to consume that information. As a result, chrony keeps reporting a > low stratum even when the upstream time is invalid or stratum >= 16. > > Questions: > > 1. Is there a recommended mechanism in chrony to convey refclock > validity/unsync state when the source is a PHC?
I think the only option is to disable the selection of the source by the "chronyc selectopts PHC0 +noselect" command. > 2. Is there any supported way for a PHC refclock to influence the > effective stratum in chrony, without patching chrony? No. > As an alternative, we can feed chrony via SHM. That lets us set leap = > LEAP_Unsynchronised when invalid, which chrony understands, but SHM > doesn’t carry stratum (at least in the standard structure), so the > stratum still can’t be made dynamic. > > Given these constraints, what approach would you recommend to correctly > represent both validity and stratum for a PHC-based source? Currently, there is no way to do that. -- Miroslav Lichvar -- To unsubscribe email [email protected] with "unsubscribe" in the subject. For help email [email protected] with "help" in the subject. Trouble? Email [email protected].
