我在 VirtualBox VM 中运行 Ubuntu 18.04 LTS。我需要系统时间不与 NTP 同步,因为我有另一个进程从非 NTP 源获取时间更新,将 RTC 设置为本地时间。因此,我运行sudo timedatectl set-ntp 0
禁用 NTP 同步。我确认它已关闭
$ timedatectl status
Local time: Fri 2003-05-09 01:45:21 GMT
Universal time: Fri 2003-05-09 01:45:21 UTC
RTC time: Thu 2019-10-24 15:57:15
Time zone: Atlantic/Reykjavik (GMT, +0000)
System clock synchronized: no
systemd-timesyncd.service active: no
RTC in local TZ: yes
Warning: The system is configured to read the RTC time in the local time zone.
This mode can not be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments. The RTC
time is never updated, it relies on external facilities to maintain it.
If at all possible, use RTC in UTC by calling
'timedatectl set-local-rtc 0'.
但我仍然看到系统时间是由我的自定义时间源监控进程以外的某个进程设置的。有没有办法至少找出哪个 PID 正在设置时间?我还需要做什么才能真的禁用 NTP 同步?这是否只存在于 VirtualBox 中,还是在实际硬件上运行时也会遇到同样的问题?