FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-04-2008, 10:57 PM
Peter F Bradshaw
 
Default Suppressing kernel 'printk's.

Hi;

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-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-04-2008, 11:19 PM
"Nelson Castillo"
 
Default Suppressing kernel 'printk's.

On Feb 4, 2008 6:57 PM, Peter F Bradshaw <pfb@exadios.com> wrote:
> Hi;
>
> 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?

I think there is a "quiet" option that you can pass in the kernel command line.

Regards,
N.-


--
http://arhuaco.org


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-04-2008, 11:41 PM
Nate Bargmann
 
Default Suppressing kernel 'printk's.

* Peter F Bradshaw <pfb@exadios.com> [2008 Feb 04 18:15 -0600]:
> Hi;
>
> 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?

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."


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2008, 12:06 AM
Nate Bargmann
 
Default Suppressing kernel 'printk's.

Further searching resulted in this message:

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 */


- Nate >>

--

"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2008, 07:23 AM
Tzafrir Cohen
 
Default Suppressing kernel 'printk's.

On Tue, Feb 05, 2008 at 08:57:32AM +0900, Peter F Bradshaw wrote:
> Hi;
>
> 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?

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 | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org