最新消息:

hwclock: Open of /dev/rtc failed, errno=19: No such device

hwclock admin 7259浏览 0评论

hwclock

RTC_RD_TIME: Inappropriate ioctl for device
ioctl() to /dev/rtc to read the time failed

今早一台服务器故障,后来有空上来查看故障日志,未果,发现时间不对,如下:

[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 https://www.kernel.org/pub/linux/utils/util-linux/v2.27/util-linux-2.27.tar.gz
tar xzvf util-linux-2.27.tar.gz
cd util-linux-ng-2.27
./configure
make
make install
cp  hwclock/hwclock /sbin/

解决二

cd /dev/ && mknod rtc1 c 254 0 && ln -s /dev/rtc1 /dev/rtc

hwclock –show –rtc=/dev/rtc1

转载请注明:爱开源 » hwclock: Open of /dev/rtc failed, errno=19: No such device

您必须 登录 才能发表评论!