PTP Notification Status Conditions¶
The PTP status notifications are derived based on the following conditions.
PTP Lock State¶
The PTP lock state notification describes the synchronization state of a
monitored ptp4l instance.
Clock Status |
Status |
Description |
|---|---|---|
Freerun |
Clock is out of sync state |
Reported when any of the following conditions are true:
|
Locked |
Clock is in sync state |
Reported when all of the following conditions are true:
The locked clockClass values can be changed using the
|
Holdover |
Clock is in holdover state |
Reported when the Holdover is only entered from the Locked state. If the instance was never Locked (e.g., initial startup), it remains in Freerun. The loss of sync is determined by the same criteria as Freerun:
The holdover duration is configurable per instance. See PTP Instance Monitoring Parameters for details. |
PTP Clock Class¶
The PTP clock class notification reports the clockClass value read from
the grandmaster via PMC. This is a separate notification from the PTP lock
state.
clockClass |
Condition |
Description |
|---|---|---|
6 |
T-GM connected to a PRTC in locked mode (e.g., PRTC traceable to GNSS) |
For additional details on clockClass values, refer to ITU-T standard G.8275.1. |
7 |
T-GM in holdover, within holdover specification, traceable to Category 1 frequency source |
|
135 |
T-BC in holdover, within holdover specification, traceable to Category 1 frequency source |
|
140 |
T-GM in holdover, out of holdover specification, traceable to Category 1 frequency source |
|
248 |
T-GM or T-BC in free-run mode |
|
255 |
Slave only OC (does not send Announce messages) |
Note
Only clockClass values in the locked list (default: 6, 7, 135) are
considered valid for the Locked PTP Lock State. Other values (140, 248,
255) will cause a transition to Holdover or Freerun. The locked list can be
customized via the ptp4lClockClassLockedList Helm override.
Relationship Between Clock Class and Notification State¶
The clock class notification and the PTP lock state notification are
tracked independently. The clock class value is read directly from the
grandmaster via PMC and reported as-is. The PTP lock state is determined
by the ptp-notification service based on its own holdover timer.
This means that during a holdover event, the clock class may change before the PTP lock state transitions to Freerun. For example:
GNSS signal is lost. The grandmaster transitions to holdover and advertises clockClass 7 (T-GM holdover within specification).
The
ptp-notificationservice detects the loss and enters Holdover state for the configuredholdover_secondsduration.The grandmaster’s own holdover timer expires and it advertises clockClass 140 or 248.
The
ptp-notificationclock class notification reports 140 or 248 immediately, because it reflects the actual grandmaster state.The
ptp-notificationPTP lock state may still report Holdover if its own holdover timer has not yet expired.
Note
A clock class of 248 during a PTP lock state of Holdover is expected
behavior when the grandmaster’s holdover expires before the local
ptp-notification holdover timer. The clock class reflects the
grandmaster’s actual state, while the PTP lock state reflects the local
holdover policy.
OS Clock State¶
The OS clock state notification describes whether the system clock is synchronized to the PTP hardware clock (PHC).
Clock Status |
Status |
Description |
|---|---|---|
Locked |
Clock is in sync state |
|
Holdover |
Clock is in holdover state |
The holdover timer has not expired, and one of the following is true:
Holdover is only entered from the Locked state. The holdover duration is configurable per instance. See PTP Instance Monitoring Parameters for details. |
Freerun |
Clock is in freerun |
Holdover conditions are met but the holdover timer has expired. |
GNSS State¶
The GNSS state notification describes the status of the GNSS timing source
monitored by ts2phc.
State |
Status |
Description |
|---|---|---|
Synchronized |
GNSS data is present |
Reported when all of the following are true:
Note A DPLL status of locked alone (without holdover acquired) does not satisfy this condition. |
Failure-Nofix |
GNSS data is not detected |
|
Overall Sync State¶
The overall sync state notification (sync-state) describes the health of
the timing chain on the local system. A locked state is reported when the
system has reference to an external time source (GNSS or PTP) and the
system clock is synchronized to that time source.
State |
Status |
Description |
|---|---|---|
Locked |
Overall state is locked |
The components of the local timing chain necessary for accurately synced
time on the local host are in a healthy state. This means that a local
NIC PHC is locked to an external timing source and the system clock
is synchronized to it. The |
Holdover |
Overall state is in holdover |
One or more components in the local timing chain are in a degraded state (holdover or freerun). The overall sync state holdover time has not expired. The overall holdover time is dynamically calculated as the minimum of the active sync chain component holdover times. See Install PTP Notifications for details. The per-instance holdover durations used in this calculation are configurable. See PTP Instance Monitoring Parameters for configuration details. |
Freerun |
Overall state is freerun |
One or more components in the local timing chain are in a degraded state (holdover or freerun). The overall sync state holdover time has expired. |
Overall Sync State Description¶
This notification helps you to verify that the local system time is being
actively synchronized. If a component of the local timing chain enters a
degraded state, then a sync-state notification will be produced to indicate
that the local timing chain is unhealthy.
The following is an example log output from the ptp-notification container
that indicates the components of the local timing chain:
2025-05-01 15:34:48 INFO Overall sync state chaining info:
os-clock-state = Locked
os-clock's source ptp-device = ptp0
ptp-device's sync-source = PTP
(PTP source) ptp4l-instance-and-state = ('ptp1', 'Locked')
(GNSS source) ts2phc-instance-and-state = NA
Overall sync: previous-state = Freerun, new-state = Locked