我在ramnode.com上的VPS上,使用OpenVZ虚拟化,安装的操作系统是Ubuntu12.10,但我运行do-release-upgrade将其升级到13.04。
rsyslogd消耗了150%的CPU,我真的不太了解Linux,但我接受了关于strace -c -p `pidof rsyslogd`的建议,结果如下:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 37.912236 9478059 4 select
0.00 0.001000 500 2 write
0.00 0.000000 0 14 gettimeofday
0.00 0.000000 0 4 futex
------ ----------- ----------- --------- --------- ----------------
100.00 37.913236 24 total所以看起来它花时间在选择的syscall上,但我不知道这意味着什么:
运行strace -p `pidof rsyslogd`只给出一行,直到我打断它:
select(1, NULL, NULL, NULL, {22, 56702}^C <unfinished ...>是什么导致了这一切?我能做些什么来解决这个问题?
编辑:tail /var/log/kern.log给了我这个:
Jun 7 21:42:26 camilo kernel: last message repeated 14010362 times
Jun 7 21:43:26 camilo kernel: last message repeated 13755525 times
Jun 7 21:44:26 camilo kernel: last message repeated 13745228 times
Jun 7 22:03:44 camilo kernel: imklog 5.8.11, log source = /proc/kmsg started.
Jun 7 22:03:44 camilo kernel: Cannot read proc file system: 1 - Operation not permitted.
Jun 7 22:04:14 camilo kernel: last message repeated 6927277 times
Jun 7 22:05:14 camilo kernel: last message repeated 13931106 times
Jun 7 22:06:14 camilo kernel: last message repeated 13864233 times
Jun 7 22:09:46 camilo kernel: imklog 5.8.11, log source = /proc/kmsg started.
Jun 7 22:09:46 camilo kernel: Cannot read proc file system: 1 - Operation not permitted.这听起来不太好:(内核是2.6.32-042stab076.8,我不认为我能摆弄它。
发布于 2014-02-11 11:54:36
这是https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/523610的一个例子。这个错误是用最近的发行版内核修复的,但这并不能帮助那些运行VM的主机选择内核的人。我没有办法,抱歉。
https://askubuntu.com/questions/305495
复制相似问题