kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: anand.arumug@gmail.com (Anand Arumugam)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kernel space logging
Date: Mon, 28 Mar 2011 09:15:18 -0400	[thread overview]
Message-ID: <AANLkTi==88B58bxfSPWX+nm5jpgBK1d4XitZ53ATkJgN@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimsTS=2mCcJGxzVVyT5gGJf_7tcZNdCrgjS1mm0@mail.gmail.com>

On Fri, Mar 25, 2011 at 1:50 PM, Anuz Pratap Singh Tomar
<chambilkethakur@gmail.com> wrote:
>
>
> On Fri, Mar 25, 2011 at 5:43 PM, Anand Arumugam <anand.arumug@gmail.com>
> wrote:
>>
>> On Thu, Mar 24, 2011 at 5:47 PM, Greg Freemyer <greg.freemyer@gmail.com>
>> wrote:
>> > On Tue, Mar 22, 2011 at 1:13 PM, Anand Arumugam <anand.arumug@gmail.com>
>> > 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
>> >
>>
>> I was looking for the logging framework used by the kernel developers.
>> Not just the dmesg logs.
>>
>
> hope this helps:
> http://www.ibm.com/developerworks/linux/library/l-kernel-logging-apis/?ca=drs-
>
> this is a tool and good read otherwise:
>
> http://www.cs.huji.ac.il/~etsman/klogger/
>

@Greg-Freemyer and @Anuz: Thank you so much for the references and
clarifications.

cheers...

  reply	other threads:[~2011-03-28 13:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 17:13 kernel space logging Anand Arumugam
2011-03-23  9:42 ` sanjeev sharma
2011-03-25 17:47   ` Anand Arumugam
2011-03-25 17:59     ` Greg Freemyer
2011-03-24 21:47 ` Greg Freemyer
2011-03-25 17:43   ` Anand Arumugam
2011-03-25 17:50     ` Anuz Pratap Singh Tomar
2011-03-28 13:15       ` Anand Arumugam [this message]
2011-03-25 18:04     ` Greg Freemyer

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='AANLkTi==88B58bxfSPWX+nm5jpgBK1d4XitZ53ATkJgN@mail.gmail.com' \
    --to=anand.arumug@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).