0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Chronyを使ってみた

Last updated at Posted at 2023-04-25

FreeBSDにはntpdが入っているのですが、ファイルが大きくて4M Flashなモジュールには入りません。そこでchronyを追加してみました。

無し

3539968 Apr 24 16:05 Fon_FON2305E_FDT.zimage

ntp

4293120 Apr 25 09:38 Fon_FON2305E_FDT.zimage

chrony

3694080 Apr 25 09:31 Fon_FON2305E_FDT.zimage

serverを書いたconfを用意してchronydを起動します。

/usr/local/etc/chrony.conf
server 10.0.1.18 iburst

chronycで確認してみます。

# ./chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* 10.0.1.18                     2   6   377    31  -2463us[-6062us] +/-   45ms

ntpdはST1の機能などがあるので、大きいのかもしれません。

このモジュールはRTCがないので起動直後には1970年になります。

この状態で、chronydを上げると、時間を合わせにいきません。

Jan  1 09:02:11  chronyd[80]: Adjustment of -1682393497.1 seconds is invalid

以下のようにすると強制的に合わせられました。

# ./chronyc makestep
Apr 25 12:33:48  chronyd[80]: System clock was stepped by 1682393497.111568 seconds

ntpdateはntpdが起動していると実行できませんがChronyは逆でした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?