I'm using Centos 6, rsyslog logging. Console is flooded with kernel messages.

  • Klogd is not running (I'm using rsyslog)
  • Rsyslog config does not direct anything to the console
  • Even tried stopping rsyslog altogether

Still something is flooding my console with kernel log messages. What it is and how do I make it stop?

Update: These are the messages generated by the kernel (hardware, iptables, etc.), stuff that goes out of /proc/kmsg, like this:

Shorewall:pub2loc:DROP:IN=br0 OUT= MAC=xxx SRC=xxx DST=xxx LEN=60 TOS=0x00 PREC=0x00 TTL=128 ID=15731 DF PROTO=TCP SPT=63767 DPT=3493 WINDOW=8192 RES=0x00 SYN URGP=0

link|improve this question

What do the messages look like? (Personally, I generally work in an xterm window, so if the console is flooded it doesn't bother me.) – Keith Thompson Oct 27 '11 at 23:15
At the risk of stating the obvious, the messages are coming from Shorewall (which I've never used, so I can't help much). Adding a shorewall or firewall tag might get more useful attention. – Keith Thompson Oct 28 '11 at 0:10
@KeithThompson: the messages are coming through the kernel logging mechanism. Shorewall is just one producer of these messages (via iptables kernel modules), the most annoying one, but all kernel-generated messages are shown there. – haimg Oct 28 '11 at 0:20
feedback

2 Answers

up vote 1 down vote accepted

I suggest you alter your /etc/sysctl.conf. Specifcally, you want to tweak the kernel.printk line.

# Uncomment the following to stop low-level messages on console
kernel.printk = 3 4 1 3

I am not sure what the centos default settings are, but I seems likely that have things set more verbose then you need.

Also do see the shorewall section on logging. You don't have to use the LOG target for logging, you can use other tools, or adjust the log severity, and tweak things to control where you messages go.

link|improve this answer
feedback

Here is the "official" way to do it, according to RedHat:

To set the console loglevel in Red Hat Enterprise Linux 6, pass loglevel=' as a boot time parameter.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.