NTP設定に、Chronyをを利用しています。
WebUI 日付・時刻設定 のページでも設定できます。
設定ファイル/etc/chrony/chrony.conf
を編集します。
# # chrony.conf generated by MA-Series Web Application Server # driftfile /var/lib/chrony/chrony.drift server ntp.nict.jp iburst trust server ntp1.jst.mfeed.ad.jp iburst trust keyfile /etc/chrony/chrony.keys logdir /var/log/chrony # Stop bad estimates upsetting machine clock. maxupdateskew 100.0 rtcsync makestep 1 3 allow
停止している場合は「Active: inactive (dead)」と表示されます。
root@metis:~# systemctl status chrony.service ○ chrony.service - chrony, an NTP client/server Loaded: loaded (/lib/systemd/system/chrony.service; disabled; vendor prese> Active: inactive (dead) Docs: man:chronyd(8) man:chronyc(1) man:chrony.conf(5)
Chronyを起動します。
root@metis:~# systemctl start chrony.service
状態を確認し、「Active: active (running)」から、起動している事が確認出来ます。
root@metis:~# systemctl status chrony.service ● chrony.service - chrony, an NTP client/server Loaded: loaded (/lib/systemd/system/chrony.service; disabled; vendor prese> Active: active (running) since Tue 2024-01-30 12:25:08 JST; 5s ago Docs: man:chronyd(8) man:chronyc(1) man:chrony.conf(5) Process: 751 ExecStart=/usr/lib/systemd/scripts/chronyd-starter.sh $DAEMON_> Main PID: 760 (chronyd) Tasks: 2 (limit: 2227) Memory: 9.8M CPU: 496ms CGroup: /system.slice/chrony.service tq760 /usr/sbin/chronyd -F 1 mq761 /usr/sbin/chronyd -F 1 Jan 30 12:25:07 metis systemd[1]: Starting chrony, an NTP client/server... Jan 30 12:25:08 metis chronyd[760]: chronyd version 4.2 starting (+CMDMON +NTP > Jan 30 12:25:08 metis chronyd[760]: Loaded seccomp filter (level 1) Jan 30 12:25:08 metis systemd[1]: Started chrony, an NTP client/server.
本装置の起動時に、Chronyを自動起動するように設定します。
root@metis:~# systemctl enable chrony.service Synchronizing state of chrony.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable chrony Created symlink /etc/systemd/system/chronyd.service → /lib/systemd/system/chrony.service. Created symlink /etc/systemd/system/multi-user.target.wants/chrony.service → /lib/systemd/system/chrony.service.
再起動後にChronyが起動している事が確認出来ます。
root@metis:~# systemctl status chrony.service ● chrony.service - chrony, an NTP client/server Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset> Active: active (running) since Tue 2024-01-30 12:34:51 JST; 42s ago Docs: man:chronyd(8) man:chronyc(1) man:chrony.conf(5) Process: 497 ExecStart=/usr/lib/systemd/scripts/chronyd-starter.sh $DAEMON_> Main PID: 579 (chronyd) Tasks: 2 (limit: 2227) Memory: 9.8M CPU: 602ms CGroup: /system.slice/chrony.service tq579 /usr/sbin/chronyd -F 1 mq587 /usr/sbin/chronyd -F 1 Jan 30 12:34:49 metis systemd[1]: Starting chrony, an NTP client/server... Jan 30 12:34:51 metis chronyd[579]: chronyd version 4.2 starting (+CMDMON +NTP > Jan 30 12:34:51 metis chronyd[579]: Loaded seccomp filter (level 1) Jan 30 12:34:51 metis systemd[1]: Started chrony, an NTP client/server.