Comparing NIC and System Clocks

Enhanced PTP User Guide (UG1602)

Document ID
UG1602
Release Date
2023-04-07
Revision
1.1 English

The phc_ctl utility is part of Linux PTP. If linuxptp is installed on the server, phc_ctl can be used to set the adapter clock and compare the time offset against the system clock.

Get System Clock Time

# phc_ctl CLOCK_REALTIME get

Get NIC Clock Time

# phc_ctl <interface> get

Compare System and NIC Clocks

# phc_ctl /dev/ptpN cmp

Set NIC Clock from System Clock

# phc_ctl /dev/ptpN set

The NIC clock can be specified by the sfptpd interface or by device number.