Eventhacker
Knowledge / Network / Timing & Synchronisation

Analyzing PTP with Linux

Linux is a powerful, vendor-neutral analysis platform for measuring IEEE 1588 PTP, hardware timestamping, and clock stability in event networks.

1. Linux as a PTP Analysis Platform

Modern Linux network stacks support IEEE 1588 PTP directly. Linux can participate in PTP domains, synchronize system clocks, and measure Grandmaster offset using PTP Hardware Clocks (PHC).

Important Technical Distinction: Linux can measure PTP, analyze clock offset, and participate in IEEE 1588 networks. It does not automatically substitute a proprietary Audinate Dante Controller endpoint, but serves as a vendor-neutral network inspector.

2. Linux Kernel PTP Architecture

Professional Network Interface Cards (NICs) include an onboard hardware clock (/dev/ptp0). Timestamping occurs at the physical layer, avoiding OS scheduling jitter:

Ethernet PHY / NIC Hardware
        |
        v
 Hardware Timestamping (PHY Layer)
        |
        v
 PTP Hardware Clock (PHC)  -->  /dev/ptp0
        |
        v
 linuxptp Daemon (ptp4l / phc2sys)
        |
        v
 Linux System Clock (CLOCK_REALTIME)

3. Hardware vs. Software Timestamping

Understanding the difference is critical when assessing measurement accuracy:

Software Timestamping

Timestamp is recorded when the packet reaches kernel or user space after passing driver queues and OS scheduling. Uncertainty: 10–500 microseconds.

Hardware Timestamping

Timestamp is captured directly at the Ethernet PHY as bits enter/leave the wire. Uncertainty: nanoseconds (< 100 ns).

Check interface capabilities with: ethtool -T eth0

4. Key linuxptp Tools

ptp4l

Implements PTP boundary/ordinary clock. Synchronizes the PHC with the network PTP Grandmaster.

phc2sys

Synchronizes system clock (CLOCK_REALTIME) to the NIC PTP Hardware Clock (/dev/ptp0).

pmc

PTP Management Client. Queries Grandmaster identity, clock class, priority, domain, and offset datasets.

5. 5-Step PTP Inspection Workflow

Step 1: Identify Interfaces Inspect link state, interface name, driver, and NIC capabilities.
Step 2: Check Timestamp Capabilities Verify whether hardware timestamping and /dev/ptp0 are available.
Step 3: Observe PTP Domain & Grandmaster Identify PTP version (v1/v2), domain ID, and active Grandmaster Clock ID.
Step 4: Measure Clock Stability & Offset Track offset values, frequency drift, and Grandmaster election changes.
Step 5: Correlate with Network Infrastructure Check VLAN tagging, IGMP multicast snooping, and switch QoS settings.

6. Eventhacker XChanger Integration

The Eventhacker XChanger 19" edge node leverages Linux PTP tooling to provide a vendor-neutral Media Network Clock Inspector dashboard:

PTP Clock Inspector — Eventhacker XChanger

Leader (Grandmaster):Yamaha-FOH-01 (00:a0:de:ff:fe:12:34:56)
Protocol / Domain:PTPv1 / Domain 0
Clock State:LOCKED
Measured Offset:+2.4 µs
Hardware Timestamping:ACTIVE (/dev/ptp0)
Leader Changes (24h):0
Back to Time Synchronization Explore Hardware: XChanger Network Toolbox