I have a Debian kernel in which some printks have been left. These make
a mess of the console and logs. Is there any way, other than recompiling
the kernel, of suppressing the printk output?
Thanks.
Cheers
--
Peter F Bradshaw: http://www.exadios.com (public keys avaliable there).
Personal site: http://personal.exadios.com
"I love truth, and the way the government still uses it occasionally to
keep us guessing." - Sam Kekovich.
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
I think there is a "quiet" option that you can pass in the kernel command line.
Regards,
N.-
Did you uncomment the following line in /etc/sysctl.conf:
# Uncomment the following to stop low-level messages on console
kernel.printk = 4 4 1 7
It works here. I suppose that there may be higher priority messages
you're seeing that I'm not. Somebody will probably chime in on the
significance of the numeric values and my Googler is broken ATM.
- Nate >>
--
"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."
http://lists.debian.org/debian-user/2007/03/msg01554.html
of which this snippet is key:
The settings in /etc/sysctl.conf take effect at the next reboot. You can
change the printk setting with immediate effect with
echo "4 1 1 7" > /proc/sys/kernel/printk
and you can check the setting with
cat /proc/sys/kernel/printk
Only root can change the setting but everyone can read it.
The files in /proc/ are pseudo-files which provide interfaces to kernel
data structures; see "man proc" for details.
===========
excerpt from
/usr/share/doc/linux-doc-2.6.20/Documentation/sysctl/kernel.txt.gz
follows:
==============================================================
printk:
The four values in printk denote: console_loglevel,
default_message_loglevel, minimum_console_loglevel and
default_console_loglevel respectively.
These values influence printk() behavior when printing or
logging error messages. See 'man 2 syslog' for more info on
the different loglevels.
- console_loglevel: messages with a higher priority than
this will be printed to the console
- default_message_level: messages without an explicit priority
will be printed with this priority
- minimum_console_loglevel: minimum (highest) value to which
console_loglevel can be set
- default_console_loglevel: default value for console_loglevel
==============================================================
For the numeric values the following from the syslog(2) manpage is
useful:
Every text line in a message has its own loglevel. This level is
DEFAULT_MESSAGE_LOGLEVEL - 1 (6) unless the line starts with <d> where
d is a digit in the range 1-7, in which case the level is d. The
conventional meaning of the loglevel is defined in <linux/kernel.h>
as follows:
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
#define KERN_ERR "<3>" /* error conditions */
#define KERN_WARNING "<4>" /* warning conditions */
#define KERN_NOTICE "<5>" /* normal but significant condition */
#define KERN_INFO "<6>" /* informational */
#define KERN_DEBUG "<7>" /* debug-level messages */
Another method, in case you just want to make the console usable again:
sysrq-NUM sets the console logging level to NUM .
try pressing alt-sysrq-1 in the console, or:
echo 1 >/proc/sysrq-trigger
In addition, what are those messages? Perhaps there is a specific way to
get rid of those messages.
--
Tzafrir Cohen | tza...@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tza...@cohens.org.il | | best
ICQ# 16849754 | | friend