klogd using high CPU
One of my servers has a process running called klogd which is running at 99.9% CPU according to top (output from top below)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3932 klog 25 0 5932 2220 16 R 99.7 0.1 162333:28 klogd
1 root 15 0 4100 584 300 S 0.0 0.0 6:10.66 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.33 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root 10 -5 0 0 0 S 0.0 0.0 0:03.63 events/0
6 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper
7 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
29 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
30 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
31 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kacpi_notify
Iv had a Google and this seems to be a standard process for handling logging. None of the log files seem to be really big and there's not too much else happening on the server.
The operating system is Ubuntu 9.04
I've seen this a lot in version 2.6.32
run /etc/init.d/klogd restart
to fix the 99% cpu.
The real fix is to update your kernel.
There was a bug when reading /proc/kmsg pseudo file. Hopefully this bug is fixed by now. Here is Linus' take on the problem (quite funny)