Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2つのマシン間で時間が合わないときの対処法 #1713

Open
98shimpei opened this issue Mar 30, 2022 · 0 comments
Open

2つのマシン間で時間が合わないときの対処法 #1713

98shimpei opened this issue Mar 30, 2022 · 0 comments

Comments

@98shimpei
Copy link
Contributor

1)そもそもPCの時間が合っていない

chronyを入れた。

$ chronyc sources
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^? jaxonred                      0   0   377   10y     +0ns[   +0ns] +/-    0ns
$ chronyc tracking
Reference ID    : 127.127.1.1 ()
Stratum         : 10
Ref time (UTC)  : Wed Mar 30 03:34:44 2022
System time     : 0.000000053 seconds slow of NTP time
Last offset     : +0.000000000 seconds
RMS offset      : 0.000000000 seconds
Frequency       : 36.815 ppm slow
Residual freq   : +0.000 ppm
Skew            : 0.000 ppm
Root delay      : 0.000000 seconds
Root dispersion : 0.000001 seconds
Update interval : 0.0 seconds
Leap status     : Not synchronised

でnot synchornized と言われている。

2つのマシンで以下を実行し目視で確認。(目視以外の良いツールが有ればおしえてください)

watch -n0.1 date +"%H:%M:%S:%N"

でも、なんかズレている。

2)

server jaxonred minpoll 0 maxpoll 0 maxdelay .001

server jaxonred minpoll 0 maxpoll 0 maxdelay .005

として、

/etc/init.d/chrony restart

した。

$ chronyc sources
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* jaxonred                     10   0   377     0    -12us[  -13us] +/-  822us
$ chronyc tracking
Reference ID    : 192.168.96.52 (jaxonred)
Stratum         : 11
Ref time (UTC)  : Wed Mar 30 03:37:31 2022
System time     : 0.000073991 seconds fast of NTP time
Last offset     : +0.000107954 seconds
RMS offset      : 0.000079116 seconds
Frequency       : 36.815 ppm slow
Residual freq   : +38.644 ppm
Skew            : 1.916 ppm
Root delay      : 0.001699 seconds
Root dispersion : 0.000043 seconds
Update interval : 2.0 seconds
Leap status     : Normal

としてうまく言っていそう。(どちらが必要だったかは不明。。。。)

2)ココをクリアすると良いツールがいくつか有るので確認。
topicのsynchronizedを確認する https://github.com/jsk-ros-pkg/jsk_common/blob/master/doc/jsk_topic_tools/scripts/is_synchronized.rst
名前解決できていないホスト名を確認する https://github.com/jsk-ros-pkg/jsk_common/blob/master/doc/jsk_tools/cltools/rostopic_host_sanity.rst

cc: @k-okada

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant