Probs in printk

Probs in printk

Post by _VJ » Tue, 01 Apr 2003 12:20:04



Hi,

I'm using printk for the device driver I'm writing.It doesn't give the
output to my console and the only way I can get those is just using
cat  /proc/kmsg.But what I want is to get console prints while I'm
running .Then I put the kernel image of the remote system where it used
to give console output.Still I'm not getting any output to the screen.I
tried to use console_print ....not giving any result to the console.So I
would like to know what can I do about this

Thanx in advance.

Vj

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Probs in printk

Post by Randy.Dunla » Tue, 01 Apr 2003 17:50:06



| Hi,
|
| I'm using printk for the device driver I'm writing.It doesn't give the
| output to my console and the only way I can get those is just using
| cat  /proc/kmsg.But what I want is to get console prints while I'm
| running .Then I put the kernel image of the remote system where it used
| to give console output.Still I'm not getting any output to the screen.I
| tried to use console_print ....not giving any result to the console.So I
| would like to know what can I do about this

The only time that I've had this kind of problem (that I recall),
I just had to use a KERN_printklevel attribute to print the message.
E.g.,
        printk(KERN_CRIT "where does this message go\n");

It can also help to change the console loglevel (Alt-SysRq-N, where
N is 1 digit, higher prints more messages [try 9]).

and what kernel version?  You should always give that info,
even when it's useless.  :)

--
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

Probs in printk

Post by anan » Tue, 01 Apr 2003 20:24:23



> Hi,

> I'm using printk for the device driver I'm writing.It doesn't give the
> output to my console and the only way I can get those is just using
> cat  /proc/kmsg.But what I want is to get console prints while I'm
> running .Then I put the kernel image of the remote system where it used
> to give console output.Still I'm not getting any output to the screen.I
> tried to use console_print ....not giving any result to the console.So I
> would like to know what can I do about this

> Thanx in advance.

> Vj

may be you should give a prioroty to the printk statement:
        printk("<1>hello world\n");

where <1> is the priority and will not get printed. '1' gives the
statement the highest priority. get more info in printk.c .

        saha.