Re: kernel space logging

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

 



On Tue, Mar 22, 2011 at 1:13 PM, Anand Arumugam <anand.arumug@xxxxxxxxx> wrote:
> Hello all!
>
> I would like to know how logging is done while the kernel is booting
> up. More importantly I am looking for those files in the kernel source
> that handles the logging part. Also I would like to know what gets
> logged after the kernel is up and running.
>
> Thanks for your time.
>
> cheers,
> -anand.

Are you talking about the logs you see when you run dmesg?

You are aware the kernel maintains a ring buffer that all printk's go into.

Then there are API's that let userspace track the buffer and put the
messages into on disk logs.

dmesg just dumps out the ring buffer queue.

The userspace API to the ring buffer is syslog().

So during bootup I _assume_ the kernel is just logging to the ring
buffer, and then when the system is operational enough, userspace gets
all the boot messages out of the kernel via syslog() and puts them to
on disk log files.

It's not too magic.

Greg

_______________________________________________
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