* kernel space logging
@ 2011-03-22 17:13 Anand Arumugam
2011-03-23 9:42 ` sanjeev sharma
2011-03-24 21:47 ` Greg Freemyer
0 siblings, 2 replies; 9+ messages in thread
From: Anand Arumugam @ 2011-03-22 17:13 UTC (permalink / raw)
To: kernelnewbies
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* kernel space logging
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-24 21:47 ` Greg Freemyer
1 sibling, 1 reply; 9+ messages in thread
From: sanjeev sharma @ 2011-03-23 9:42 UTC (permalink / raw)
To: kernelnewbies
HI,
kernel daemon is responsible for kernel messages and can be found here.
http://linux.die.net/man/8/klogd
Thanks
Sanjeev Sharma
On Tue, Mar 22, 2011 at 10:43 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.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110323/7022c6d6/attachment.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* kernel space logging
2011-03-22 17:13 kernel space logging Anand Arumugam
2011-03-23 9:42 ` sanjeev sharma
@ 2011-03-24 21:47 ` Greg Freemyer
2011-03-25 17:43 ` Anand Arumugam
1 sibling, 1 reply; 9+ messages in thread
From: Greg Freemyer @ 2011-03-24 21:47 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* kernel space logging
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-25 18:04 ` Greg Freemyer
0 siblings, 2 replies; 9+ messages in thread
From: Anand Arumugam @ 2011-03-25 17:43 UTC (permalink / raw)
To: kernelnewbies
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* kernel space logging
2011-03-23 9:42 ` sanjeev sharma
@ 2011-03-25 17:47 ` Anand Arumugam
2011-03-25 17:59 ` Greg Freemyer
0 siblings, 1 reply; 9+ messages in thread
From: Anand Arumugam @ 2011-03-25 17:47 UTC (permalink / raw)
To: kernelnewbies
On Wed, Mar 23, 2011 at 5:42 AM, sanjeev sharma
<sanjeevsharmaengg@gmail.com> wrote:
> HI,
>
> kernel daemon is responsible for kernel messages and can be found here.
>
> http://linux.die.net/man/8/klogd
>
> Thanks
> Sanjeev Sharma
>
> On Tue, Mar 22, 2011 at 10:43 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.
>>
Do you know where I can find the source code for the klogd in the
kernel source tree?
^ permalink raw reply [flat|nested] 9+ messages in thread
* kernel space logging
2011-03-25 17:43 ` Anand Arumugam
@ 2011-03-25 17:50 ` Anuz Pratap Singh Tomar
2011-03-28 13:15 ` Anand Arumugam
2011-03-25 18:04 ` Greg Freemyer
1 sibling, 1 reply; 9+ messages in thread
From: Anuz Pratap Singh Tomar @ 2011-03-25 17:50 UTC (permalink / raw)
To: kernelnewbies
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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110325/d7025e08/attachment.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* kernel space logging
2011-03-25 17:47 ` Anand Arumugam
@ 2011-03-25 17:59 ` Greg Freemyer
0 siblings, 0 replies; 9+ messages in thread
From: Greg Freemyer @ 2011-03-25 17:59 UTC (permalink / raw)
To: kernelnewbies
On Fri, Mar 25, 2011 at 1:47 PM, Anand Arumugam <anand.arumug@gmail.com> wrote:
> On Wed, Mar 23, 2011 at 5:42 AM, sanjeev sharma
> <sanjeevsharmaengg@gmail.com> wrote:
>> HI,
>>
>> kernel daemon is responsible for kernel messages and can be found here.
>>
>> http://linux.die.net/man/8/klogd
>>
>> Thanks
>> Sanjeev Sharma
>>
>> On Tue, Mar 22, 2011 at 10:43 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.
>>>
>
>
> Do you know where I can find the source code for the klogd in the
> kernel source tree?
klogd is userspace.
It's not in the kernel source tree.
Greg
^ permalink raw reply [flat|nested] 9+ messages in thread
* kernel space logging
2011-03-25 17:43 ` Anand Arumugam
2011-03-25 17:50 ` Anuz Pratap Singh Tomar
@ 2011-03-25 18:04 ` Greg Freemyer
1 sibling, 0 replies; 9+ messages in thread
From: Greg Freemyer @ 2011-03-25 18:04 UTC (permalink / raw)
To: kernelnewbies
On Fri, Mar 25, 2011 at 1: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.
>
Most of its in kernel/printk.c and include/linux/printk.h
If you mean the API for the framework, it is most easily seen in the .h file:
http://lxr.linux.no/#linux+v2.6.38/include/linux/printk.h
For the guts, see vprintk in particular:
http://lxr.linux.no/#linux+v2.6.38/kernel/printk.c#L729
HTH
Greg
^ permalink raw reply [flat|nested] 9+ messages in thread
* kernel space logging
2011-03-25 17:50 ` Anuz Pratap Singh Tomar
@ 2011-03-28 13:15 ` Anand Arumugam
0 siblings, 0 replies; 9+ messages in thread
From: Anand Arumugam @ 2011-03-28 13:15 UTC (permalink / raw)
To: kernelnewbies
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...
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-03-28 13:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-03-25 18:04 ` Greg Freemyer
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).