// Using NTPD with PTPD | Light At The End Of The Tunnel Using NTPD with PTPD – Light At The End Of The Tunnel

Light At The End Of The Tunnel

systems administration meanderings

Using NTPD with PTPD

We have a requirement at work to synchronise our servers to within a micro-second. To achieve this we used a combination of a CDMA modem (can use a GPS device), PTPD, and NTPD.

We used the CDMA modem as a stratum 0 reference to NTPD. This means that NTPD would have control of adjusting the clock on the server. PTPD was then configured to run as the master on this server as follows:-

ptpd -b bond0 -s 1 -t

Each of the servers that were due to be synchronised were configured in the following manner:-

ptpd -b bond0 -g -y 0 -D -f /var/log/ptpd.log

In addition, to allow PTPD to adjust the clock on the clients, NTPD was configured not to run. Statistics were output to ensure that the servers were in sync, the format is shown below, the third column showing the difference between the master and the slave.

slv, 0.000052696, 0.000000196, 82719, 0

As you can see the output above shows that the client is within 200 nanoseconds in its time to the master.

Once all of this was setup Nagios was configured to ensure the ptpd daemons were running and that statistics were being output to /var/log/ptpd.log.


Share

#