hwclock: Open of /dev/rtc failed, errno=19: No such device.
今早一台服务器故障,后来有空上来查看故障日志,未果,发现时间不对,如下:# 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.
# 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.
# 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
# cd hwclock/
# ls
clock.h cmos.o hwclock.ckd.o Makefile.in rtc.o
clock-ppc.chwclock hwclock.oMakefile README.hwclock
cmos.c hwclock.8kd.c Makefile.amrtc.c
# ./hwclock
Mon 30 Jan 2012 04:52:54 PM CST-0.780277 seconds
# ./hwclock --show
Mon 30 Jan 2012 04:53:25 PM CST-0.333056 seconds
# date
Mon Jan 30 16:53:31 CST 2012
#\cphwclock/hwclock /sbin/
页:
[1]