Right after a update of Ubuntu Server I faced that rsyslog used 100% CPU and that /var/log/syslog got filled up with following line, which was repeated almost every second:
[rsyslog] imklog: error reading kernel log - shutting down: Bad file descriptorThe problem is, that rsyslog tries to log kernel messages, which is as OpenVZ/Proxmox Container default not possible - to fix this, remove/comment out following line in the file /etc/rsyslog.conf (here already done):
# $ModLoad imklog # provides kernel logging supportAfter that, restart rsyslog and the problem should be gone.
这位仁兄的情况跟我基本一样,同样是升级过系统。
说白了,就是OpenVZ和Proxmox架设的VPS并不支持内核日志,然后rsyslog就拼命提示说读取不了kernel日志,CPU最终被消耗殆尽。
感觉有些地方解释的不大清楚,将就点吧。