All of lore.kernel.org
 help / color / mirror / Atom feed
* some questions about log level
@ 2011-12-12 14:18 loody
  2011-12-12 17:22 ` Mulyadi Santosa
  2011-12-12 18:08 ` Jonathan Neuschäfer
  0 siblings, 2 replies; 8+ messages in thread
From: loody @ 2011-12-12 14:18 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* some questions about log level
  2011-12-12 14:18 some questions about log level loody
@ 2011-12-12 17:22 ` Mulyadi Santosa
  2011-12-12 18:08 ` Jonathan Neuschäfer
  1 sibling, 0 replies; 8+ messages in thread
From: Mulyadi Santosa @ 2011-12-12 17:22 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Dec 12, 2011 at 21:18, loody <miloody@gmail.com> wrote:
> 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.

Perhaps this document could explain the basics better than me:
http://lxr.linux.no/#linux+v3.1.5/Documentation/sysctl/kernel.txt#L405

Hope that helps...


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* some questions about log level
  2011-12-12 14:18 some questions about log level loody
  2011-12-12 17:22 ` Mulyadi Santosa
@ 2011-12-12 18:08 ` Jonathan Neuschäfer
  2011-12-13  1:57   ` loody
  1 sibling, 1 reply; 8+ messages in thread
From: Jonathan Neuschäfer @ 2011-12-12 18:08 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Dec 12, 2011 at 10:18:20PM +0800, loody wrote:
> Then I purposely connect/disconnect USB, but my console keep quiet.

Which "console" are you looking at? It only works with the consoles
provided by the kernel (ttyN) on usual desktop distros, and not with
xterm-alikes.

HTH,
	Jonathan Neusch?fer

^ permalink raw reply	[flat|nested] 8+ messages in thread

* some questions about log level
  2011-12-12 18:08 ` Jonathan Neuschäfer
@ 2011-12-13  1:57   ` loody
  2011-12-13  4:28     ` Mulyadi Santosa
  0 siblings, 1 reply; 8+ messages in thread
From: loody @ 2011-12-13  1:57 UTC (permalink / raw)
  To: kernelnewbies

hi:

2011/12/13 Jonathan Neusch?fer <j.neuschaefer@gmx.net>:
> On Mon, Dec 12, 2011 at 10:18:20PM +0800, loody wrote:
>> Then I purposely connect/disconnect USB, but my console keep quiet.
>
> Which "console" are you looking at? It only works with the consoles
> provided by the kernel (ttyN) on usual desktop distros, and not with
> xterm-alikes.
I use ubuntu 11.04 and I use gnome terminal.
so you mean what I saw in gonme terminal may not be the ttyN that
enabled by kernel?
if that is the root cause, is it possible for me to switch my gonme
terminal to ttyN you mentioned?

Appreciate your help,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* some questions about log level
  2011-12-13  1:57   ` loody
@ 2011-12-13  4:28     ` Mulyadi Santosa
  2011-12-15  6:50       ` loody
  2012-06-29  3:05       ` loody
  0 siblings, 2 replies; 8+ messages in thread
From: Mulyadi Santosa @ 2011-12-13  4:28 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Dec 13, 2011 at 08:57, loody <miloody@gmail.com> wrote:
> hi:
>
> 2011/12/13 Jonathan Neusch?fer <j.neuschaefer@gmx.net>:
>> On Mon, Dec 12, 2011 at 10:18:20PM +0800, loody wrote:
>>> Then I purposely connect/disconnect USB, but my console keep quiet.
>>
>> Which "console" are you looking at? It only works with the consoles
>> provided by the kernel (ttyN) on usual desktop distros, and not with
>> xterm-alikes.
> I use ubuntu 11.04 and I use gnome terminal.
> so you mean what I saw in gonme terminal may not be the ttyN that
> enabled by kernel?
> if that is the root cause, is it possible for me to switch my gonme
> terminal to ttyN you mentioned?
>
> Appreciate your help,

Jonathan refer to consoles you usually get when pressing Ctrl-Alt-F1
throught Ctrl-Alt-F6.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* some questions about log level
  2011-12-13  4:28     ` Mulyadi Santosa
@ 2011-12-15  6:50       ` loody
  2012-06-29  3:05       ` loody
  1 sibling, 0 replies; 8+ messages in thread
From: loody @ 2011-12-15  6:50 UTC (permalink / raw)
  To: kernelnewbies

hi all:
I can see the message, right now.
2011/12/13 Mulyadi Santosa <mulyadi.santosa@gmail.com>:
> On Tue, Dec 13, 2011 at 08:57, loody <miloody@gmail.com> wrote:
>> hi:
>>
>> 2011/12/13 Jonathan Neusch?fer <j.neuschaefer@gmx.net>:
>>> On Mon, Dec 12, 2011 at 10:18:20PM +0800, loody wrote:
>>>> Then I purposely connect/disconnect USB, but my console keep quiet.
>>>
>>> Which "console" are you looking at? It only works with the consoles
>>> provided by the kernel (ttyN) on usual desktop distros, and not with
>>> xterm-alikes.
>> I use ubuntu 11.04 and I use gnome terminal.
>> so you mean what I saw in gonme terminal may not be the ttyN that
>> enabled by kernel?
>> if that is the root cause, is it possible for me to switch my gonme
>> terminal to ttyN you mentioned?
>>
>> Appreciate your help,
>
> Jonathan refer to consoles you usually get when pressing Ctrl-Alt-F1
> throught Ctrl-Alt-F6.
>
BTW, is there any api I can flush all the messages in kernel buffer
ring before when I jump to BUG(), kernel checking MACRO?
my problem is:
1. I put more detail messages in the level 8, usually it will shows up
if I change console_loglevel or type dmesg.
2. I don't want it to show in normal operation.
3. but I want to see them before my driver jump to BUG() check point.
Thanks for your help,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* some questions about log level
  2011-12-13  4:28     ` Mulyadi Santosa
  2011-12-15  6:50       ` loody
@ 2012-06-29  3:05       ` loody
  2012-06-29  3:59         ` Mulyadi Santosa
  1 sibling, 1 reply; 8+ messages in thread
From: loody @ 2012-06-29  3:05 UTC (permalink / raw)
  To: kernelnewbies

hi all:
>
> Jonathan refer to consoles you usually get when pressing Ctrl-Alt-F1
> throught Ctrl-Alt-F6.
is it possible to direct kernel log to xterm-alikes console?
Thanks for your help in advance,

^ permalink raw reply	[flat|nested] 8+ messages in thread

* some questions about log level
  2012-06-29  3:05       ` loody
@ 2012-06-29  3:59         ` Mulyadi Santosa
  0 siblings, 0 replies; 8+ messages in thread
From: Mulyadi Santosa @ 2012-06-29  3:59 UTC (permalink / raw)
  To: kernelnewbies

Hi...

On Fri, Jun 29, 2012 at 10:05 AM, loody <miloody@gmail.com> wrote:
> is it possible to direct kernel log to xterm-alikes console?
> Thanks for your help in advance,

it depends on your syslog daemon setting. Assuming you're using plain
old syslogd, perhaps you need to adjust /etc/syslog.conf to contain:
kern.*                                                 /dev/console

IIRC, desktop environment such KDE (I only check it on KDE 3.5.x) will
catch such message which is thrown to console and display it in a pop
up.

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-29  3:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12 14:18 some questions about log level loody
2011-12-12 17:22 ` Mulyadi Santosa
2011-12-12 18:08 ` Jonathan Neuschäfer
2011-12-13  1:57   ` loody
2011-12-13  4:28     ` Mulyadi Santosa
2011-12-15  6:50       ` loody
2012-06-29  3:05       ` loody
2012-06-29  3:59         ` Mulyadi Santosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.