about printk and console_loglevel

Siddu siddu.sjce at gmail.com
Sun Mar 6 03:25:02 EST 2011


Thank you ... I guess that answers :)

On Sun, Mar 6, 2011 at 3:52 AM, Andrzej Kardas <andrzej-kardas at o2.pl> wrote:

>
>
> 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
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
Regards,
~Sid~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110306/d1102cb3/attachment.html 


More information about the Kernelnewbies mailing list