[NTP][自分用メモ] RTCを持たないSBCでのchronyの設定について

AIX、UNIX、LinuxARM
Screenshot_2019-04-15 Chrony time synchronization on huge time diff

所謂シングルボードコンピュータ、SBCを触っていると、どうしても時刻がずれます。

というのもRTC(リアルタイムクロック)がほとんど搭載されていないからなのですが、その場合、ntpdやchronyを使用して時間を合わせることになると思いますが、スタートアップの段階で強制的に時刻合わせをするにはどうするのかなと思ったのでメモ。

Not Found

このことについてはChronyの方はドキュメントで触れていました。

chrony – Frequently Asked Questions
makestep 1 -1
sudo systemctl restart chronyd

上記のような記述にしてやると、任意のステップで時刻合わせをするようになるので、これで良いみたいです。

the clock would be stepped in the first three updates if its offset was larger than one second. Normally, it’s recommended to allow the step only in the first few updates, but in some cases (e.g. a computer without an RTC or virtual machine which can be suspended and resumed with an incorrect time) it may be necessary to allow the step on any clock update. The example above would change to

Chrony time synchronization on huge time diff
hello currently i have a localy ntp server (chrony) and a ntp client (chrony), all are working but when i try to change ...
POINT

makestep 1 -1

最初の数字がオフセット、つまり時刻がどれだけずれているか、次の数字が最初の更新として何回同期作業を行うか。

この記事を書いた人

kometchtech

うつ病を患いながら、IT業界の末席にいるおっさんエンジニア。科学計算をしたことがないのに、HPC分野にお邪魔している。興味のある分野で学習したことをblogにまとめつつ、うつ病の経過症状のメモも置いておく日々。じつはRouterboard User Group JPの中の人でもある。 Amazon欲しいものリスト / Arm板を恵んでくれる人募集中

kometchtechをフォローする
タイトルとURLをコピーしました