Delay in Printk Messages.
mhornung.linux at gmail.com
mhornung.linux at gmail.com
Sat Jun 28 17:58:16 EDT 2014
Hello Arun Kumar,
On Sat, 28. Jun 23:03, Arun Kumar wrote:
> I am able to read my printk messages in the kernel buffer only after
> unloading the module..
> Is there some reason or configuration behind this.
>
> I used a simple kernel module with only init and exit functions, and
> after loading the module i cannot see the message printed by the
> "module_init" function in the output given by "dmesg -c" I can see them
> only after i unload the module.
>
Since you do not provide your code I have to guess that your print
statement looks like this:
pr_debug("Hello World!");
Please notice that printk doesn't flush until a trailing newline is
provided (Linux Device Drivers Chapter 4). So maybe this is what you want:
pr_debug("Hello World!\n");
> i wait for around 15-20 seconds for the init message but it only shows
> up on removing the module.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
With best regards
Michael Hornung
More information about the Kernelnewbies
mailing list