4

I have a machine running a custom build of Linux kernel 3.2.12-rt based on Debian Squeeze.

I'm getting kernel messages printed to the console. I don't want it to do that. I know why it's doing that:

# cat /proc/sys/kernel/printk
8     4     1     3

But I don't know how that first value is getting set to 8, and I want whatever is doing it to stop.

I've looked in the kernel config; it has CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 and no built-in command line.

I've looked in the boot command line; it has quiet. I've tried changing it to quiet loglevel=4, but this hasn't helped.

/etc/sysctl.conf has kernel.printk = 3 4 1 3 (and it's not commented out).

I tried grepping for anything else that might have set printk, but I couldn't find anything useful. (That may just mean that I didn't look in the right places or for the right things though.)

$ grep console /etc/rsyslog.conf
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
# you must invoke `xconsole' with the `-file' option:
#    $ xconsole -file /dev/xconsole [...]
         *.notice;*.warn       |/dev/xconsole

Where else can I look? (Granted, I could probably rewrite /proc/sys/kernel/printk in some boot script, but there has to be a better way.)

5
  • 1
    Check your syslog config.
    – Jenny D
    May 7, 2014 at 9:22
  • I looked in /etc/rsyslog.conf; there's something at the bottom about logging to /dev/xconsole but I don't think that's related. I couldn't see anything else that could make it log to the console.
    – Miral
    May 7, 2014 at 9:24
  • What's the output of grep console /etc/rsyslog.conf? Also check in /etc/rsyslog.d/* .
    – Jenny D
    May 7, 2014 at 9:37
  • /etc/rsyslog.d is empty. I've added the results of the grep to my question. I really think the syslog is a red herring -- as I said, the problem is that /proc/sys/kernel/printk has the wrong value, not that something else is printing log messages to the console.
    – Miral
    May 8, 2014 at 4:42
  • do you have the kmsg package installed?
    – GnP
    May 12, 2014 at 21:09

1 Answer 1

0

I found the problem. /etc/rc.local had the following line:

dmesg -n 8

Removing this returned logging to normal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .