Re: What is kernel ring buffer

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

 



On Fri, 15 Oct 2004 15:42:02 +0100 (BST), Dinesh Ahuja
<mdlinux7@xxxxxxxxxxx> wrote:
> I need to clear my concept related with loglevels
> associated with printk statement.
> 
> When I say
> 
> printk("<1> Hello World");
> 
> The output is not flushed to my console and I have to
> explicitly execute dmesg to see the printk output.
> WHat is a reason that the output is not coming
> directly to console.

you should look at the source code of kernel/printk.c. printk will put
the string in to the kernel bufffer, and will pass it to all console
devices if the priority (1 in your example above) is less than
console_level (which can be configured by modifying
/proc/sys/kernel/printk). That is why printk doesnt always output to
the console. But you can always see its output from the kernel buffer,
and dmesg is the way to see the content of kernel buffer.

> 
> From where dmesg reads its input and how dmesg and
> klogd are associated ?
> 
dmesg uses syslog syscall to get data from kernel buffer.

"man klogctl" for further detail.

regards,
AQ

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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