Re: about printk and console_loglevel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you ... I guess that answers :)

On Sun, Mar 6, 2011 at 3:52 AM, Andrzej Kardas <andrzej-kardas@xxxxx> 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@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




--
Regards,
~Sid~



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux