English Ukrainian
With hardware time stamping, [application]*phc2sys* needs to be used to synchronize the `PTP` hardware clock to the system clock. If running [application]*phc2sys* as a service, edit the `/etc/sysconfig/phc2sys` configuration file. The default setting in the `/etc/sysconfig/phc2sys` file is as follows:
With hardware `PTP` support, the NIC has its own on-board clock, which is used to time stamp the received and transmitted `PTP` messages. It is this on-board clock that is synchronized to the `PTP` master, and the computer's system clock is synchronized to the `PTP` hardware clock on the NIC. With software `PTP` support, the system clock is used to time stamp the `PTP` messages and it is synchronized to the `PTP` master directly. Hardware `PTP` support provides better accuracy since the NIC can time stamp the `PTP` packets at the exact moment they are sent and received while software `PTP` support requires additional processing of the `PTP` packets by the operating system.
Where _summary-updates_ is the number of clock updates to include in summary statistics. An example follows:
Where _em3_ is the interface you want to configure. Below is example output from [application]*ptp4l* when the `PTP` clock on the NIC is synchronized to a master:
Where _em3_ is the interface you want to check.
When you do not want to start [application]*phc2sys* as a service, you can start it from the command line. For example, enter the following command as `root`:
When there are multiple `PTP` domains available on the network, or fallback to `NTP` is needed, the [application]*timemaster* program can be used to synchronize the system clock to all available time sources. The `PTP` time is provided by [application]*phc2sys* and [application]*ptp4l* via _shared memory driver_ (*SHM* reference clocks to `chronyd` or `ntpd` (depending on the `NTP` daemon that has been configured on the system). The `NTP` daemon can then compare all time sources, both `PTP` and `NTP`, and use the best sources to synchronize the system clock.
When the `DHCP` client program, [application]*dhclient*, receives a list of `NTP` servers from the `DHCP` server, it adds them to `ntp.conf` and restarts the service. To disable that feature, add [command]#PEERNTP=no# to `/etc/sysconfig/network`.
When running as a service, options are specified in the `/etc/sysconfig/ptp4l` file. More information on the different [application]*ptp4l* options and the configuration file settings can be found in the `ptp4l(8)` man page.
When running as a service, options are specified in the `/etc/sysconfig/phc2sys` file. More information on the different [application]*phc2sys* options can be found in the `phc2sys(8)` man page.
When `PTP` time synchronization is working properly, new messages with offsets and frequency adjustments will be printed periodically to the [application]*ptp4l* and [application]*phc2sys* (if hardware time stamping is used) outputs. These values will eventually converge after a short period of time. These messages can be seen in `/var/log/messages` file. An example of the output follows:
When a peer delay request is received on a port using the *E2E* mechanism.
When a *E2E* delay request is received on a port using the *P2P* mechanism.
~]# vi /etc/timemaster.conf
~]# vi /etc/sysconfig/phc2sys
OPTIONS="-a -r -r"
Verifying Time Synchronization
Using the PTP Management Client
Using ptp4l From The Command Line
Using PTP
Useful Websites