5

I'm seeing repeated never ending such messages in kern.log on my OpenVZ ubuntu 12.04 server.

Mar  2 06:23:33 localhost kernel: Cannot read proc file system: 1 - Operation not permitted.
Mar  2 06:24:04 localhost kernel: last message repeated 5082222 times
Mar  2 06:25:05 localhost kernel: last message repeated 9939060 times
Mar  2 06:26:06 localhost kernel: last message repeated 8501480 times
Mar  2 06:27:07 localhost kernel: last message repeated 10177446 times
Mar  2 06:28:08 localhost kernel: last message repeated 9813564 times
Mar  2 06:29:09 localhost kernel: last message repeated 10017198 times
Mar  2 06:30:10 localhost kernel: last message repeated 9156706 times
Mar  2 06:31:11 localhost kernel: last message repeated 7069506 times
Mar  2 06:32:12 localhost kernel: last message repeated 10223799 times
Mar  2 06:33:13 localhost kernel: last message repeated 10452790 times
Mar  2 06:34:14 localhost kernel: last message repeated 9716982 times
Mar  2 06:35:15 localhost kernel: last message repeated 9178422 times
Mar  2 06:36:16 localhost kernel: last message repeated 7886225 times
Mar  2 06:37:17 localhost kernel: last message repeated 10261076 times
Mar  2 06:38:18 localhost kernel: last message repeated 10283553 times
Mar  2 06:39:19 localhost kernel: last message repeated 10110874 times

Any ideas about how to fix this ? Rsyslog was not installed on my ubuntu 12.04 by default. When I installed Rsyslog, my kern.log, syslog started to overflow with these messages.

Edit:

Here's what my host has to say about rsyslog: "You shouldn't run Rsyslog either, and there isn't much of a requirement for it".

But I believe the problem is not directly with Rsyslog itself, it is just consuming high CPU due to extensive logging. And if I remove Rsyslog, the error would still occur but it just wont be logged.

Is that something to do with shared kernel on openVZ ? Anyone has any idea ?

Rajat Gupta
  • 301
  • 4
  • 17
  • 1
    If your host says that, change hosts... – Jenny D Mar 03 '14 at 08:19
  • is it like I shouldn't be concerned with kern.log logs on an OpenVZ based VPS ? Since I am on a shared kernel.. ? – Rajat Gupta Mar 03 '14 at 09:16
  • I meant that if your host says you shouldn't use one of the standard unix syslog varieties, then I would not feel comfortable keeping anything I value with that host. – Jenny D Mar 03 '14 at 10:06

1 Answers1

6

Rsyslog has a tendency to use 100%+ CPU on OpenVZ. I run following commands via SSH to fix the problem

service rsyslog stop
sed -i -e 's/^\$ModLoad imklog/#\$ModLoad imklog/g' /etc/rsyslog.conf
service rsyslog start

Or, see here for a workaround.

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
Rajat Gupta
  • 301
  • 4
  • 17
  • For those interested - It comments out the line that supplied kernal logging support. The change adds the '#' `#$ModLoad imklog # provides kernel logging support (previously done by rklogd)` – notapatch May 31 '14 at 16:01