在Debian服务器上,我遇到了hwclock问题:
$ hwclock --show hwclock: Cannot access the Hardware Clock via any known method. hwclock: Use the --debug option to see the details of our search for an access method.
系统在backports内核Debian 4.9.18-1~bpo8+1 (2017-04-10) 。
这里是debugging输出:
$ hwclock --debug hwclock from util-linux 2.25.2 hwclock: cannot open /dev/rtc: Device or resource busy No usable clock interface found. hwclock: Cannot access the Hardware Clock via any known method.
clocksource:
$ cat /sys/devices/system/clocksource/clocksource0/current_clocksource tsc
最后, rtc设备存在:
$ ls -l /dev/rtc* lrwxrwxrwx 1 root root 4 Apr 29 16:41 /dev/rtc -> rtc0 crw------- 1 root root 253, 0 Apr 29 16:41 /dev/rtc0
这个问题似乎是连接到clocksource ,检查available_clocksource :
$ cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm
根据“什么”clocksource tsc unstable“是什么意思? 它看起来像TSC(时间戳计数器)是不是很可靠。
通过更新/etc/default/grub您可以切换到另一个可用的时钟源。 我正在使用HPET 。
GRUB_CMDLINE_LINUX_DEFAULT="clocksource=hpet"
并更新grub:
update-grub2
重新启动后, hwclock再次工作(只需重新启动,没有任何修改可能也有帮助 – 这可能只是问题多久)。
注 :最佳时钟源可能取决于您的主板和CPU型号。