我有三个运行 Bullseye 的树莓派。我不知道它是什么时候开始的(显然是为什么),但是 ntpd 每 2 小时就会重新启动一次。我在 Journalctl 输出或 daemon.log 中可以看到的只是
Dec 8 04:43:43 ntp1 systemd[1]: Stopping Network Time Service...
Dec 8 04:43:43 ntp1 systemd[1]: Stopped Network Time Service.
Dec 8 04:43:43 ntp1 systemd[1]: Starting Network Time Service...
Run Code Online (Sandbox Code Playgroud)
ntpd 似乎没有做错什么。我怎样才能找出 systemd 这样做的原因并阻止它?
在这种情况下,ntpd 配置为具有本地 PPS 参考时钟的层 1 服务器,因此这就是为什么我宁愿它不要无缘无故地重新启动。
这是 ntp 服务文件:
[Unit]
Description=Network Time Service
Documentation=man:ntpd(8)
After=network.target
Conflicts=systemd-timesyncd.service
[Service]
Type=forking
# Debian uses a shell wrapper to process /etc/default/ntp
# and select DHCP-provided NTP servers if available
ExecStart=/usr/lib/ntp/ntp-systemd-wrapper
PrivateTmp=true
[Install] …Run Code Online (Sandbox Code Playgroud) systemd ×1