Systemd-Timesyncd
systemd-timesyncd 的預設 NTP 伺服器是什麼?
在我的 yocto 發行版中啟用了該服務
systemd-timesyncd.service
。其配置文件(timesyncd.conf
)如下:# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # Entries in this file show the compile time defaults. # You can change settings by editing this file. # Defaults can be restored by simply deleting this file. # # See timesyncd.conf(5) for details. [Time] #NTP= #FallbackNTP=time1.google.com time2.google.com time3.google.com time4.google.com #RootDistanceMaxSec=5 #PollIntervalMinSec=32 #PollIntervalMaxSec=2048
如您所見,
NTP
未設置配置文件的選項。儘管如此,服務設置了系統日期,並且通過一些登錄journalctl
,我看到 NTP 伺服器可能是time1.google.com
.我的問題是:NTP 伺服器在哪裡設置
systemd-timesyncd
?謝謝
來自 timesyncd.conf 手冊頁。
CONFIGURATION DIRECTORIES AND PRECEDENCE The default configuration is defined during compilation, so a configuration file is only needed when it is necessary to deviate from those defaults. By default, the configuration file in /etc/systemd/ contains commented out entries showing the defaults as a guide to the administrator. This file can be edited to create local overrides.