我有一台机器运行基于Debian Squeeze的Linux内核3.2.12-rt的定制版本。
我正在将内核消息打印到控制台。 我不希望这样做。 我知道为什么这样做:
# cat /proc/sys/kernel/printk 8 4 1 3
但是我不知道第一个价值是如何被设定为8,我想要什么是停止。
我已经看了内核configuration; 它有CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 ,没有内置的命令行。
我已经看了启动命令行; 它已经quiet 。 我试着改变它以quiet loglevel=4 ,但这并没有帮助。
/etc/sysctl.conf有kernel.printk = 3 4 1 3 (它没有被注释掉)。
我尝试了其他可能已经设置了printk的东西,但我找不到任何有用的东西。 (这可能意味着我没有看正确的地方或正确的东西。)
$ 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
我还能在哪里看? (当然,我可以在一些启动脚本中重写/proc/sys/kernel/printk ,但是必须有更好的方法。)
我发现了这个问题。 /etc/rc.local有以下行:
dmesg -n 8
删除这个返回的日志logging正常。