some questions about log level

loody miloody at gmail.com
Mon Dec 12 09:18:20 EST 2011


hi all:
my questions are below:
1. Can I temporarily let kernel message show in stdout?
    I google some key word as "console_loglevel" and I found following methods:
     a. echo 8 > /proc/sys/kernel/printk
     b. write a simple program which calling "klogctl(8, NULL, level)"
Then I purposely connect/disconnect USB, but my console keep quiet.
But dmesg shows connect/disconnect messages.

2. what is differences between above a and b methods?
    Are they not to used to change console_loglevel?

3. is it possible the max level of "console_loglevel" doesn't mean it
will show on stdout?




-- 
Thanks for your help



More information about the Kernelnewbies mailing list