linuxPTPを使用した2つのホスト間のシステム時刻の同期

linuxPTPを使用した2つのホスト間のシステム時刻の同期

linuxptpを使用して2つのシステム間で高精度のシステム時刻同期を設定したいと思います。

最初のホストでは:

  • インターネットに接続されたインターフェイスを介してNTPを使用してシステム時間を定期的に同期します。
  • 2番目のインターフェイス(eno2)で次のコマンドを実行します。ptp4l -i eno2 -S -P -4 -m

2番目のホストでは:

  • 最初のホストenp0s31f6に接続されているインターフェイスで、次を実行します。eno2ptp4l -s -i enp0s31f6 -S -P -4 -m

ただし、2 番目のホストではptp4lシステム時間は同期されません。

ptp4l[1024.042]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[1024.047]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[1024.793]: port 1: new foreign master 525400.fffe.cc6c9a-1
ptp4l[1028.792]: selected best master clock 525400.fffe.cc6c9a
ptp4l[1028.792]: foreign master not using PTP timescale
ptp4l[1028.792]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[1030.792]: master offset -1217822064 s0 freq  +34411 path delay    585487
ptp4l[1031.792]: master offset -1217693321 s0 freq  +34411 path delay    456366
ptp4l[1032.793]: master offset -1217396626 s0 freq  +34411 path delay    456366
ptp4l[1033.793]: master offset -1217375833 s0 freq  +34411 path delay    389459
ptp4l[1034.792]: master offset -1217740750 s0 freq  +34411 path delay    389459
ptp4l[1035.794]: master offset -608727349 s0 freq  +34411 path delay    374835
ptp4l[1036.793]: master offset -608893145 s0 freq  +34411 path delay    389459
ptp4l[1037.792]: master offset -609164618 s0 freq  +34411 path delay    389459
ptp4l[1038.793]: master offset      27325 s0 freq  +34411 path delay    374835
ptp4l[1039.792]: master offset     -32658 s0 freq  +34411 path delay    367815
ptp4l[1040.793]: master offset    -114491 s0 freq  +34411 path delay    367815
ptp4l[1041.793]: master offset     181711 s0 freq  +34411 path delay    358661
ptp4l[1042.793]: master offset      65535 s0 freq  +34411 path delay    358661
ptp4l[1043.793]: master offset     -69744 s0 freq  +34411 path delay    366265
ptp4l[1044.794]: master offset     248163 s0 freq  +34411 path delay    350007
ptp4l[1045.794]: master offset     -25172 s1 freq +75113179 path delay    350007
ptp4l[1046.718]: master offset  -75276446 s2 freq +67510258 path delay    350007
ptp4l[1046.718]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[1047.653]: master offset -142323559 s2 freq +60663223 path delay    350007
ptp4l[1048.592]: master offset -203217301 s2 freq +54370632 path delay    350007
[...]
ptp4l[1062.203]: master offset -596973889 s2 freq +8426740 path delay   2862004
ptp4l[1063.193]: master offset -605906062 s0 freq +8426740 path delay   2862004
ptp4l[1063.193]: port 1: SLAVE to UNCALIBRATED on SYNCHRONIZATION_FAULT
[...]

どんなアイデアがありますか?

ベストアンサー1

問題の原因を見つけました。バックグラウンドのNTPアップデートと競合しています...

NTPはクライアント側で無効にする必要があります。この場合、時間更新はPTPクライアントによって実行されます。

おすすめ記事