<html><body>
<p><tt>fastboot-bounces@lists.linux-foundation.org wrote on 06/15/2009 09:43:02 PM:<br>
<br>
> Dharmosoth Seetharam <dseetharam@inbox.com> </tt><br>
<tt>> <br>
> Hi,<br>
> <br>
> I have experimented few things and results are below.<br>
> <br>
> Case 1) echo 0 > /proc/sys/kernel/panic_on_oops<br>
> When BUG/oops occurred it is able to log the diagnostics to <br>
> /var/log/messages<br>
> and then continue(not switching to dump-saving kernel).<br>
> <br>
> What I am looking is - I want both the things to be happen.<br>
> that is - it should log the appropriate messages in /var/<br>
> log/messsages and<br>
> should be able to take kernel dump.</tt><br>
<br>
<tt>when panic_on_oops is not set, it does not call crash_kexec() - change in kexec_should_crash() in kernel/kexec.c</tt><br>
<tt><br>
> <br>
> case 2) In general, When panic has occurred we won't log any type of<br>
> messages in<br>
> /var/log/messages ... am I right ?<br>
> If KEXEC is enabled and dump-saving kernel is loaded then <br>
> will switch to it and save the kernel dump.<br>
> <br>
> I have added the dump_stack() function call in the panic() function <br>
> before calling crash_kexec with few seconds of delay. It is behaving <br>
> like randomly (ie. some time stack traces are logged in /<br>
> var/log/messages and <br>
> not for rest of the time)<br>
> <br>
> What I am looking is - I want to log the appropriate <br>
> messages in /var/log/messages<br>
> and then switch to dump-saving kernel.<br>
> </tt><br>
<br>
<tt>printk messages in /var/log/messages is depends on how fast klogd flushes printk buffer.</tt><br>
<tt><br>
> case 3) In general, When die/nmi_die called we used to log the <br>
> appropriate messages in /var/log/message<br>
> and then saving kernel dump will be depends on KEXEC enable <br>
> and loading dump-saving kernel.<br>
> --- am I right ?<br>
> <br>
> I have added the delay in die() function with few seconds <br>
> before calling crash_kexec()<br>
> But I never seen messages logged in /var/log/messages, I can<br>
> see those on serial console.<br>
> <br>
> Here also my intention is want both, ie. log the appropriate<br>
> messages in /var/log/messages<br>
> and then take the action as per KEXEC enabled.</tt><br>
<br>
<tt>printk write to the console and its buffer, As I said, depends on time for klogd flushes printk buffer.</tt><br>
<br>
<tt><br>
> <br>
> <br>
> <br>
> Please advice me, What we can do to achieve those things.<br>
> <br>
> Thanks for helping me here.<br>
> <br>
> <br>
> regards,<br>
> Seetharam<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> > -----Original Message-----<br>
> > From: nhorman@redhat.com<br>
> > Sent: Sat, 13 Jun 2009 14:07:36 -0400<br>
> > To: dseetharam@inbox.com<br>
> > Subject: Re: /var/log/messages doesn't have crash info when kernel gets<br>
> > panic/oops/crash<br>
> > <br>
> > On Fri, Jun 12, 2009 at 11:01:35PM -0800, Dharmosoth Seetharam wrote:<br>
> >> <br>
> >> Hi Neil,<br>
> >> <br>
> >> Thanks for your quick reply.<br>
> >> <br>
> >> What you have suggested is nice when we got/save crash dump (i.e vmcore)<br>
> >> What if we failed to save/capture vmcore info or vmcore is corrupted<br>
> >> etc. then we dont get any information<br>
> >> regarding the panic/crash/oops at anywhere?<br>
> >> <br>
> > If the vmcore is corrupted to the point where makedumpfile can't extract<br>
> > the<br>
> > dmesg log, then its certain that syslog wouldn't have been able to write<br>
> > anything to /var/log/messages either. As a last resort you can try run<br>
> > strings<br>
> > on the corrupted vmcore and see if the dmesg log is still in there<br>
> > somewhere.<br>
> > <br>
> > If you forgot to capture the vmcore, theres not much more help I can give<br>
> > you,<br>
> > Im afraid. You'll just have to make sure you capture it next time. If<br>
> > you only<br>
> > need the backtrace, and don't want the rest of the vmcore, you can make<br>
> > kdump<br>
> > just run makedumpfile --dump-dmesg /proc/vmcore /var/log/oops.txt<br>
> > <br>
> > Neil<br>
> > <br>
> <br>
> <br>
> >> <br>
> >> <br>
> >> <br>
> >> Thanks and Regards<br>
> >> <br>
> >> Seetharam<br>
> >> <br>
> >> <br>
> >>> -----Original Message-----<br>
> >>> From: nhorman@redhat.com<br>
> >>> Sent: Fri, 12 Jun 2009 16:05:13 -0400<br>
> >>> To: dseetharam@inbox.com<br>
> >>> Subject: Re: /var/log/messages doesn't have crash info when kernel gets<br>
> >>> panic/oops/crash<br>
> >>> <br>
> >>> On Fri, Jun 12, 2009 at 01:25:49AM -0800, Dharmosoth Seetharam wrote:<br>
> >>>> Hi,<br>
> >>>> <br>
> >>>> I have encounter a problem called /var/log/messages does not contain<br>
> >>>> any<br>
> >>>> information<br>
> >>>> on kernel crash dump.<br>
> >>>> <br>
> >>>> Prior to enabling KEXEC we saw stack traces and bug info etc in<br>
> >>>> /var/log/messages.<br>
> >>>> After enabling KEXEC feature those info was missed.<br>
> >>>> <br>
> >>>> How can we get those missed info in /var/log/messages even when KEXEC<br>
> >>>> feature is enabled.<br>
> >>>> <br>
> >>>> Any help will appreciate.<br>
> >>>> <br>
> >>> run crash on the resultant vmcore file that kexec can produce/save and<br>
> >>> get the<br>
> >>> dmesg log out of it.<br>
> >>> alternatively you can use makedumpfile with the --dump-dmesg log<br>
> >>> <br>
> >>> Neil<br>
> >>> <br>
> >>>> <br>
> >>>> Thanks and Regards<br>
> >>>> Seetharam<br>
> >>>> <br>
> >>>> ____________________________________________________________<br>
> >>>> Receive Notifications of Incoming Messages<br>
> >>>> Easily monitor multiple email accounts & access them with a click.<br>
> >>>> Visit <a href="http://www.inbox.com/notifier">http://www.inbox.com/notifier</a> and check it out!<br>
> >>>> <br>
> >>>> _______________________________________________<br>
> >>>> kexec mailing list<br>
> >>>> kexec@lists.infradead.org<br>
> >>>> <a href="http://lists.infradead.org/mailman/listinfo/kexec">http://lists.infradead.org/mailman/listinfo/kexec</a><br>
> >> <br>
> >> ____________________________________________________________<br>
> >> GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at<br>
> >> <a href="http://www.inbox.com/smileys">http://www.inbox.com/smileys</a><br>
> >> Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™<br>
> >> and most webmails<br>
> _______________________________________________<br>
> fastboot mailing list<br>
> fastboot@lists.linux-foundation.org<br>
> <a href="https://lists.linux-foundation.org/mailman/listinfo/fastboot">https://lists.linux-foundation.org/mailman/listinfo/fastboot</a></tt></body></html>