[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

beginner's question about KERN_ALERT (it does not work)



Hi all,

 

I am following  The Linux Kernel Module Programming Guide with the 1st example :

___________________________

int init_module(void)

{

   printk("<1>Hello world 1.\n");

       

      return 0;

}

 

 

void cleanup_module(void)

{

  printk(KERN_ALERT "Goodbye world 1.\n");

} 

 

________________________

 

I can load the file .o but all out the console are warnings (the messages like   Hello world “ are just printed in /var/log/messages).

The same thing happens when I do

Ø       echo 8 > /proc/sys/kernel/printk

The content of printk is as follows:

8          4          1          7

 

How can I print the messages to the console (I am using the RH 9 with kernel 2.4.20)

Please help me

Thanks a lot