| [chrony-users] Re: Guidance on PHC refclock validity/stratum handling in chrony |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: MOUHOUNE Samir <samir.mouhoune@xxxxxxxxx>
- Subject: [chrony-users] Re: Guidance on PHC refclock validity/stratum handling in chrony
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Thu, 5 Feb 2026 08:13:45 +0100
- Cc: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770275633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aY0L0z//56C50+CymdfSHT7XVq2PCFfPkYc1qeo1wSM=; b=MqLd92bJZkBEKGFgDwpaQjkSIdqrklsRRVgrP+R1JhpKRHUIRtXptbDBPKDgVbgW96jlqI AvbrWoNIFXFJBzgjUsXeBgwqUgK7d0cWFBMhtzoStDZO0XHZl8Qveik34c/jDEDnfWm0ja Xg33OZd5VCyj7kUQwaZhxeSlJV76Uq4=
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 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.