PHC_CTL(8) | System Manager's Manual | PHC_CTL(8) |
phc_ctl - directly control PHC device clock
phc_ctl [ options ] <device> [ commands ]
phc_ctl is a program which can be used to directly control a PHC clock device. Typically, it is used for debugging purposes, and has little use for general control of the device. For general control of PHC clock devices, phc2sys (8) should be preferred.
<device> may be either CLOCK_REALTIME, any /dev/ptpX device, or any ethernet device which supports ethtool's get_ts_info ioctl.
phc_ctl is controlled by passing commands which take either an optional or required parameter. The commands (outlined below) will control aspects of the PHC clock device. These commands may be useful for inspecting or debugging the PHC driver, but may have adverse side effects on running instances of ptp4l (8) or phc2sys (8)
The arguments specified in seconds are read as double precision floating point values, and will scale to nanoseconds. This means providing a value of 5.5 means 5 and one half seconds. This allows specifying fairly precise values for time.
Read the current clock time from the device
Set the PHC clock time to CLOCK_REALTIME
Set PHC clock time to 0 (seconds since Epoch)
Quickly sanity check frequency slewing by setting slewing frequency by positive 10%, resetting clock to 0.0 time, waiting for 10 seconds, and then reading time. The time read back should be (roughly) 11 seconds, since the clock was slewed 10% faster.
June 2014 | linuxptp |