hwclock: Open of /dev/rtc failed, errno=19: No such device.
今早一臺服務器故障,后來有空上來查看故障日志,未果,發現時間不對,如下:
[root@cache06 ~]# hwclock -w
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
[root@cache06 ~]# hwclock --debug
hwclock from util-linux-2.13-pre7
hwclock: Open of /dev/rtc failed, errno=19: No such device.
No usable clock interface found.
Cannot access the Hardware Clock via any known method.
[root@cache06 ~]# ls -l /dev/rtc
rtc?? rtc0?
通過查找資料發現是因為升級內核是沒有加載相應的時間模塊導致,可用升級hwclock的方式解決,于是如下:
wget http://ftp.sjtu.edu.cn/sites/ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-2.18.tar.gz
tar xzvf util-linux-ng-2.18.tar.gz
cd util-linux-ng-2.18
./configure
make
[root@cache06 util-linux-ng-2.18]# cd hwclock/
[root@cache06 hwclock]# ls
clock.h????? cmos.o???? hwclock.c? kd.o???????? Makefile.in???? rtc.o
clock-ppc.c? hwclock??? hwclock.o? Makefile???? README.hwclock
cmos.c?????? hwclock.8? kd.c?????? Makefile.am? rtc.c
[root@cache06 hwclock]# ./hwclock
Mon 30 Jan 2012 04:52:54 PM CST? -0.780277 seconds
[root@cache06 hwclock]# ./hwclock --show
Mon 30 Jan 2012 04:53:25 PM CST? -0.333056 seconds
[root@cache06 hwclock]# date
Mon Jan 30 16:53:31 CST 2012
[root@cache06 util-linux-ng-2.18]#\cp? hwclock/hwclock /sbin/
轉載于:https://blog.51cto.com/gaizaoren/768989
總結
以上是生活随笔為你收集整理的hwclock: Open of /dev/rtc failed, errno=19: No such device.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 开发高级 Web 部件
- 下一篇: 手动添加mysql服务