所謂シングルボードコンピュータ、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
最初の数字がオフセット、つまり時刻がどれだけずれているか、次の数字が最初の更新として何回同期作業を行うか。