LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   "Hello world message is not printing" while loading the modules inside kernel (http://www.linuxquestions.org/questions/linux-kernel-70/hello-world-message-is-not-printing-while-loading-the-modules-inside-kernel-513533/)

Nishant Desai 12-25-2006 04:49 AM

"Hello world message is not printing" while loading the modules inside kernel
 
Dear All,

I want to insert the module inside the kernel and to print the message hello world inside that module, i am able to load the module inside the kernel through insmod command, but when it loads inside the kernel it is not printing the message on the console, can anybody tell me what the wrong thing i have done in this, or what are the other methods to see the message?

I think there is a command regarding grep also to see the kernel messages but i couldnt remember actually what is the command to do so? pls.. help me tho know this, and please tell me what is the error because of which message is not printing on the console while loading the modules inside the kernel?

Thanks,
Nishant

hiren_bhatt 12-25-2006 08:25 AM

The loglevel should be equal to the loglevel of console.

To see the Hello World message do cat /var/log/messages

Nishant Desai 12-26-2006 12:31 AM

Quote:

Originally Posted by hiren_bhatt
The loglevel should be equal to the loglevel of console.

To see the Hello World message do cat /var/log/messages

Hiii, Hiren

Thanks for the reply, i know this method to see the mesasge from /var/log/messages, but this message should also been print on the screen while i run the command insmod with the module name... that is what not happening and i dont know why? that is what i am trying to find.

Thanks anyays.

Thanks,
Nishant

hiren_bhatt 12-26-2006 09:17 AM

Go to any of the virtual console using Cltr+Alt+F1-F6, and then insert your module there, you will see the massages

Nishant Desai 01-05-2007 02:48 AM

Quote:

Originally Posted by hiren_bhatt
Go to any of the virtual console using Cltr+Alt+F1-F6, and then insert your module there, you will see the massages

Dear Hiren,

Thanks, yes that method is working for go to the virtual console and to inserting the module will print the message, but as we go to the virtual console through Ctrl+Alt+F1-F6, what is the method to come out of that console and back to the GUI? i can only come out of this by rebooting the PC, but i dont think this is the right method, there must be the method for that, pls tell me what to do to come out of that?

Thanks,
Nishant

hiren_bhatt 01-05-2007 01:00 PM

You were just very near!!! Ctrl+Alt+F7 will bring you the GUI console.

Nishant Desai 01-06-2007 05:39 AM

Quote:

Originally Posted by hiren_bhatt
You were just very near!!! Ctrl+Alt+F7 will bring you the GUI console.

Thanks for the reply...by d way are you from india? if yes then from where?, because Bhatt seems to be gujarati.

hiren_bhatt 01-06-2007 09:45 PM

Yes Nishant you are right I am a gujarati, and I am based at ahmedabad, and I think you are also gujarati.

Nishant Desai 01-07-2007 10:56 PM

Quote:

Originally Posted by hiren_bhatt
Yes Nishant you are right I am a gujarati, and I am based at ahmedabad, and I think you are also gujarati.

Yes, You are right, I am also gujarati and staying in Ahmedabad, but as I am doing job at Gandhinagar making up-down, in which company you are working?

Thanks,
Nishant

lqu 08-31-2009 02:38 PM

are you using printk()? maybe it's because your message doesn't have enough priority to be displayed on console. Try to raise your message's level, or lower the console_loglevel. Anyways, you can see the message by 'dmesg' or 'cat /proc/kmsg.


All times are GMT -5. The time now is 02:43 PM.