Host Synchronization With PTP

It is **required** to run the IEEE-1588 Precision Time Protocol (PTP) service with distributed PolySync systems, specifically while performing Record or Replay functionalities. Without the PTP service, hosts defined on the same network will have differing system times and PolySync data will not be aligned. ### 1. Start PTP services To start PTP services an Ethernet interface must have already been designated. This was demonstrated in the [distributed host set up](/articles/?p=1090). The developer must grant _sudo_ level permission for the PolySync Manager to start PTP services: ```bash $ sudo -E /usr/local/polysync/bin/polysync-manager -p ``` It is advised to leave PolySync PTP services running at all times. However, if necessary the PTP service can be stopped with the PolySync Manager as well: ```bash $ sudo -E /usr/local/polysync/bin/polysync-manager -l ``` ### 2. Start PTP services during host start-Up To start PTP services during the host start-up (boot) routine, users can follow these steps: 1. Create a bash script file located in _/etc/init.d/_ named _psync-startup.sh_, then copy the following lines: ```bash #!/bin/bash # source the environment . /usr/local/polysync/utils/ # start PolySync PTP services, called as sudo during ECU booting /usr/local/polysync/bin/polysync-manager -p ``` 2. Make the script executable: ```bash $ chmod +x /etc/init.d/ ``` 3. Create a symbolic link to the appropriate runtime level (user runtime level) in which to execute the script: ```bash $ sudo ln -s /etc/init.d/ /etc/rc4.d/ ```