Joe Horn 的啟示錄

rsyslog daemon 在 OpenVZ guest 瘋狂佔用 CPU resource

剛幫忙解掉的問題。
某台建立在 OpenVZUbuntu 的 rsyslog daemon process 瘋狂佔用 CPU resource。
log 看到的狀況是這樣:

...
Dec 14 06:25:13 Linux rsyslogd-2177: rsyslogd[internal_messages]: 1134916 messages lost due to rate-limiting
Dec 14 06:25:13 Linux rsyslogd: imklog: error reading kernel log - shutting down: Bad file descriptor
Dec 14 06:25:13 Linux rsyslogd: message repeated 498 times: [imklog: error reading kernel log - shutting down: Bad file descriptor]
Dec 14 06:25:19 Linux rsyslogd-2177: rsyslogd[internal_messages]: 1114295 messages lost due to rate-limiting
Dec 14 06:25:19 Linux rsyslogd: imklog: error reading kernel log - shutting down: Bad file descriptor
Dec 14 06:25:19 Linux rsyslogd: message repeated 498 times: [imklog: error reading kernel log - shutting down: Bad file descriptor]
Dec 14 06:25:25 Linux rsyslogd-2177: rsyslogd[internal_messages]: 1805432 messages lost due to rate-limiting
Dec 14 06:25:25 Linux rsyslogd: imklog: error reading kernel log - shutting down: Bad file descriptor
Dec 14 06:25:25 Linux rsyslogd: message repeated 498 times: [imklog: error reading kernel log - shutting down: Bad file descriptor]
...

把 /etc/rsyslog.conf 下列這行註解掉,重新啟動 rsyslog 就搞定了…

$ModLoad imklog   # provides kernel logging support
Exit mobile version