All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrzej-kardas@o2.pl (Andrzej Kardas)
To: kernelnewbies@lists.kernelnewbies.org
Subject: about printk and console_loglevel
Date: Sat, 05 Mar 2011 23:22:28 +0100	[thread overview]
Message-ID: <4D72B7A4.4090406@o2.pl> (raw)
In-Reply-To: <AANLkTik2VRKccsidQZzFG0EzSET=YBruhaKceEfZ0bGi@mail.gmail.com>



On 05.03.2011 19:42, Siddu wrote:
> Hi all,
> Hi all,
>
> I am little stuck understanding this piece of code below and the way 
> its been working
>
> Question: since KERN_INFO = 6 # which is msg_log_level
> and as per code
> *msg_log_level < console_loglevel*
>
>  this line of printk is not supposed to show up in the dmesg log ? but 
> it is showing up . Why

console_loglevel concern messages that should display on the CONSOLE not 
"dmesg" and controls if message is enough important (read: have prioryty 
below *console_loglevel) *to display it on the console. You must know 
that, kernel logs its messages into buffer (into the RAM) which have 
constant size, when you type dmesg, you simply read messages from that 
buffer (ring-buffer), so that why you see your line in dmesg.

What is more, there is deamon called syslog (rsyslog) which reads this 
buffer periodically and saves messages in appropriate log file on the 
hard drive e.g. /var/log/kern.log or /var/log/messages etc. You can 
configure rsyslog as you wish, to log certain types messages into logfiles.


--
regards
Andrzej Kardas
http://www.linux.mynotes.pl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110305/0eb6069f/attachment.html 

  parent reply	other threads:[~2011-03-05 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05 18:42 about printk and console_loglevel Siddu
2011-03-05 20:08 ` Михаил Кринкин
2011-03-05 22:22 ` Andrzej Kardas [this message]
2011-03-06  8:25   ` Siddu

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=4D72B7A4.4090406@o2.pl \
    --to=andrzej-kardas@o2.pl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.