From: mhornung.linux@gmail.com (mhornung.linux at gmail.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Delay in Printk Messages.
Date: Sat, 28 Jun 2014 23:58:16 +0200 [thread overview]
Message-ID: <20140628215814.GA28057@googlemail.com> (raw)
In-Reply-To: <53AEFC79.2020308@gmail.com>
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
prev parent reply other threads:[~2014-06-28 21:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-28 17:33 Delay in Printk Messages Arun Kumar
2014-06-28 17:39 ` Kristofer Hallin
2014-06-28 17:43 ` Aruna Hewapathirane
2014-06-28 21:58 ` mhornung.linux at gmail.com [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140628215814.GA28057@googlemail.com \
--to=mhornung.linux@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).