sfptpd supports some limited use cases with
sfptpd running alongside chronyd. For both daemons
to co-exist, only one of them can be allowed to discipline the system clock. Unlike NTP,
chronyd does not expose an API that can be used to prevent it from
controlling the system clock.
The following use cases are possible. Those provided by more recent
versions of sfptpd are preferable:
- From version 3.3.0 onwards,
sfptpdhas an option to prevent it from disciplining the system clock:[general] clock_readonly systemThe system clock is then controlled and adjusted by
chronyd, but only read bysfptpd.For this to work correctly, you must also set the following option:
[general] interface systemSee the
clock_readonlyoption in Configuration Options, and theinterfaceoption in Instance-specific Configuration Options. - From version 3.4.0 onwards,
sfptpdsupportschronydas NTP server when eithersfptpdorchronydis statically configured not to discipline the system clock. For example to enable thechronydand PPS use case, launchchronydwith the-xoption. - From version 3.6.0 onwards,
sfptpdhas a crny sync module that provides support for operating alongside the chronyd service. An instance of this module is implicitly created bysfptpd. If you do not require this instance, you should disable it by specifying a crny sync module with no instances:[general] sync_module crnyThis module has an option to specify the path to a script which can be used to enable or disable
chronydclock control:[crny] control_script /usr/share/doc/sfptpd/examples/chrony_clockcontrol.pyAn example script is supplied, as specified in the previous example.
See the
control_scriptoption in Instance-specific Configuration Options.Important: Restarting chronyd is destabilizing for NTP synchronization so this feature should be avoided when the time sync performance of chronyd influences sync instance selection. In the absence of native runtime control for chronyd it is best used in an always-on or always-off mode withsfptpd. If chronyd control is required for fallback it is advisable to give it a lower (numerically higher) priority setting so it is only selected on total failure of PTP, and also to increase the selection_holdoff_period to 60s. Similarly, it is not recommended to use this clock control method while chronyd is operating as a clustering determinant (i.e. as a discriminator).Handling of clock control conflicts between
sfptpdand chronyd has been improved:- If there is a conflict at
sfptpdstartup because an uncontrollable chronyd service is running, this causes a critical error forsfptpd. This behavior is unchanged, but you can now disable this startup check as follows:[general] ignore_critical clock-control-conflict - If there is a subsequent conflict,
sfptpdnow allows operation but blocks system clock updates. This is improved behavior when the conflict is transient. It is, however, recommended in such situations to configuresfptpdexplicitly to treat the system clock as read only:[general] clock_readonly system
- If there is a conflict at
- From version 3.7.1 onwards,
sfptpdhas an option to enable or disable chronyd clock control, instead of specifying a path to the helper script:[crny] clock_control onA helper script is still supplied, but is moved to /usr/libexec.
- From version 3.8.0 onwards,
sfptpdhas a privileged helper so it no longer needs to run as root to controlchronyd.
AMD recommends that when NTP functionality
is required, chronyd is disabled, and standard NTP or
ntpsec is installed.