All of lore.kernel.org
 help / color / mirror / Atom feed
* how to capture kernel panics
@ 2005-02-24 23:35 shabanip
  2005-02-25  3:08 ` James Colannino
  2005-02-25 14:17 ` Christian Borntraeger
  0 siblings, 2 replies; 9+ messages in thread
From: shabanip @ 2005-02-24 23:35 UTC (permalink / raw)
  To: linux-kernel

is there any way to capture and log kernel panics on disk or ...?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to capture kernel panics
  2005-02-24 23:35 how to capture kernel panics shabanip
@ 2005-02-25  3:08 ` James Colannino
  2005-02-25 13:26   ` Trond Hasle Amundsen
  2005-02-25 14:17 ` Christian Borntraeger
  1 sibling, 1 reply; 9+ messages in thread
From: James Colannino @ 2005-02-25  3:08 UTC (permalink / raw)
  To: linux-kernel

shabanip wrote:

>is there any way to capture and log kernel panics on disk or ...?
>  
>

My guess would be, at the very least, it depends on what part of the 
kernel is causing the panic.  Most likely I would say no, although 
here's another question: if running a second kernel under user-mode 
Linux, can this be done?

James

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to capture kernel panics
  2005-02-25  3:08 ` James Colannino
@ 2005-02-25 13:26   ` Trond Hasle Amundsen
  0 siblings, 0 replies; 9+ messages in thread
From: Trond Hasle Amundsen @ 2005-02-25 13:26 UTC (permalink / raw)
  To: James Colannino; +Cc: linux-kernel

James Colannino <lkml@colannino.org> writes:

> shabanip wrote:
>
>>is there any way to capture and log kernel panics on disk or ...?
>
> My guess would be, at the very least, it depends on what part of the
> kernel is causing the panic.

A kernel panic means that the kernel no longer knows what it's doing,
and therefore stops doing anything immediately. Hence it won't use the
filesystems and cannot log the panic to anything but the console. I
would think the best solution to your problem is to set up a serial
console to another machine, and log everything to disk on that
machine. See Documentation/serial-console.txt for how to set up a
serial console.

Regards,

-- 
Trond Hasle Amundsen <t.h.amundsen@usit.uio.no>
Center for Information Technology Services, University of Oslo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to capture kernel panics
  2005-02-24 23:35 how to capture kernel panics shabanip
  2005-02-25  3:08 ` James Colannino
@ 2005-02-25 14:17 ` Christian Borntraeger
  2005-02-25 14:42   ` Jeff Moyer
  1 sibling, 1 reply; 9+ messages in thread
From: Christian Borntraeger @ 2005-02-25 14:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: shabanip

shabanip wrote:
> is there any way to capture and log kernel panics on disk or ...?

In former times, the Linux kernel tried to sync in the panic function. (If 
the panic did not happen in interrupt context) Unfortunately this had 
severe side effects in cases where the panic was triggered by file system 
block device code or any other part which is necessary for syncing. In most 
cases the call trace never made it onto disk anyway. So currently the 
kernel does not support saving a panic.

Apart from using a serial console, you might have a look at several 
kexec/kdump/lkcd tools where people are working on being able to dump the 
memory of a paniced kernel.

cheers

Christian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to capture kernel panics
  2005-02-25 14:17 ` Christian Borntraeger
@ 2005-02-25 14:42   ` Jeff Moyer
  2005-02-25 15:07     ` shabanip
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Moyer @ 2005-02-25 14:42 UTC (permalink / raw)
  To: Christian Borntraeger; +Cc: linux-kernel, shabanip

==> Regarding Re: how to capture kernel panics; Christian Borntraeger <linux-kernel@borntraeger.net> adds:

linux-kernel> shabanip wrote:
>> is there any way to capture and log kernel panics on disk or ...?

linux-kernel> In former times, the Linux kernel tried to sync in the panic
linux-kernel> function. (If the panic did not happen in interrupt context)
linux-kernel> Unfortunately this had severe side effects in cases where the
linux-kernel> panic was triggered by file system block device code or any
linux-kernel> other part which is necessary for syncing. In most cases the
linux-kernel> call trace never made it onto disk anyway. So currently the
linux-kernel> kernel does not support saving a panic.

linux-kernel> Apart from using a serial console, you might have a look at
linux-kernel> several kexec/kdump/lkcd tools where people are working on
linux-kernel> being able to dump the memory of a paniced kernel.

Or netconsole, which will dump printk's do the server:port of your
choosing.

-Jeff

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to capture kernel panics
  2005-02-25 14:42   ` Jeff Moyer
@ 2005-02-25 15:07     ` shabanip
  2005-02-25 15:28       ` Jeff Moyer
  0 siblings, 1 reply; 9+ messages in thread
From: shabanip @ 2005-02-25 15:07 UTC (permalink / raw)
  To: linux-kernel

as i see netconsole is a kernel module.
so i just need to load netconsole module with server:port parameters.
am i right?

Payam Shabanian
shabanip -at- avapajoohesh.com

> ==> Regarding Re: how to capture kernel panics; Christian Borntraeger
> <linux-kernel@borntraeger.net> adds:
>
> linux-kernel> shabanip wrote:
>>> is there any way to capture and log kernel panics on disk or ...?
>
> linux-kernel> In former times, the Linux kernel tried to sync in the panic
> linux-kernel> function. (If the panic did not happen in interrupt context)
> linux-kernel> Unfortunately this had severe side effects in cases where
> the
> linux-kernel> panic was triggered by file system block device code or any
> linux-kernel> other part which is necessary for syncing. In most cases the
> linux-kernel> call trace never made it onto disk anyway. So currently the
> linux-kernel> kernel does not support saving a panic.
>
> linux-kernel> Apart from using a serial console, you might have a look at
> linux-kernel> several kexec/kdump/lkcd tools where people are working on
> linux-kernel> being able to dump the memory of a paniced kernel.
>
> Or netconsole, which will dump printk's do the server:port of your
> choosing.
>
> -Jeff
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to capture kernel panics
  2005-02-25 15:07     ` shabanip
@ 2005-02-25 15:28       ` Jeff Moyer
  2005-02-25 15:51         ` shabanip
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Moyer @ 2005-02-25 15:28 UTC (permalink / raw)
  To: shabanip; +Cc: linux-kernel

==> Regarding Re: how to capture kernel panics; "shabanip" <shabanip@avapajoohesh.com> adds:

shabanip> as i see netconsole is a kernel module.  so i just need to load
shabanip> netconsole module with server:port parameters.  am i right?

MODULE_PARM_DESC(netconsole, " netconsole=[src-port]@[src-ip]/[dev],[tgt-port]@<tgt-ip>/[tgt-macaddr]\n");

So, for example:

modprobe netconsole netconsole=6666@192.168.1.1/eth0,6666@192.168.1.100/00:40:95:9A:12:34

-Jeff


shabanip> Payam Shabanian shabanip -at- avapajoohesh.com

>> ==> Regarding Re: how to capture kernel panics; Christian Borntraeger
>> <linux-kernel@borntraeger.net> adds:
>> 
linux-kernel> shabanip wrote:
>>>> is there any way to capture and log kernel panics on disk or ...?
>>
linux-kernel> In former times, the Linux kernel tried to sync in the panic
linux-kernel> function. (If the panic did not happen in interrupt context)
linux-kernel> Unfortunately this had severe side effects in cases where
>> the
linux-kernel> panic was triggered by file system block device code or any
linux-kernel> other part which is necessary for syncing. In most cases the
linux-kernel> call trace never made it onto disk anyway. So currently the
linux-kernel> kernel does not support saving a panic.
>>
linux-kernel> Apart from using a serial console, you might have a look at
linux-kernel> several kexec/kdump/lkcd tools where people are working on
linux-kernel> being able to dump the memory of a paniced kernel.
>> Or netconsole, which will dump printk's do the server:port of your
>> choosing.
>> 
>> -Jeff
>> 

shabanip> - To unsubscribe from this list: send the line "unsubscribe
shabanip> linux-kernel" in the body of a message to
shabanip> majordomo@vger.kernel.org More majordomo info at
shabanip> http://vger.kernel.org/majordomo-info.html Please read the FAQ at
shabanip> http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to capture kernel panics
  2005-02-25 15:51         ` shabanip
@ 2005-02-25 15:48           ` Jeff Moyer
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Moyer @ 2005-02-25 15:48 UTC (permalink / raw)
  To: shabanip; +Cc: linux-kernel

==> Regarding Re: how to capture kernel panics; "shabanip" <shabanip@avapajoohesh.com> adds:

shabanip> thanks for the help.  does anything else left to configure?

On the log target system, you will probably want to run something similar
to netcat to capture the logs.  To simply output to a terminal, you could
do something like this:

nc -l -p 6666 -u

-Jeff

shabanip> Payam Shabanian shabanip -at- avapajoohesh.com


>> ==> Regarding Re: how to capture kernel panics; "shabanip"
>> <shabanip@avapajoohesh.com> adds:
>> 
shabanip> as i see netconsole is a kernel module.  so i just need to load
shabanip> netconsole module with server:port parameters.  am i right?
>> MODULE_PARM_DESC(netconsole, "
>> netconsole=[src-port]@[src-ip]/[dev],[tgt-port]@<tgt-ip>/[tgt-macaddr]\n");
>> 
>> So, for example:
>> 
>> modprobe netconsole
>> netconsole=6666@192.168.1.1/eth0,6666@192.168.1.100/00:40:95:9A:12:34
>> 
>> -Jeff
>> 
>> 
shabanip> Payam Shabanian shabanip -at- avapajoohesh.com
>>
>>>> ==> Regarding Re: how to capture kernel panics; Christian Borntraeger
>>>> <linux-kernel@borntraeger.net> adds:
>>>> 
linux-kernel> shabanip wrote:
>>>>>> is there any way to capture and log kernel panics on disk or ...?
>>>>
linux-kernel> In former times, the Linux kernel tried to sync in the panic
linux-kernel> function. (If the panic did not happen in interrupt context)
linux-kernel> Unfortunately this had severe side effects in cases where
>>>> the
linux-kernel> panic was triggered by file system block device code or any
linux-kernel> other part which is necessary for syncing. In most cases the
linux-kernel> call trace never made it onto disk anyway. So currently the
linux-kernel> kernel does not support saving a panic.
>>>>
linux-kernel> Apart from using a serial console, you might have a look at
linux-kernel> several kexec/kdump/lkcd tools where people are working on
linux-kernel> being able to dump the memory of a paniced kernel.
>>>> Or netconsole, which will dump printk's do the server:port of your
>>>> choosing.
>>>> 
>>>> -Jeff
>>>> 
>>
shabanip> - To unsubscribe from this list: send the line "unsubscribe
shabanip> linux-kernel" in the body of a message to
shabanip> majordomo@vger.kernel.org More majordomo info at
shabanip> http://vger.kernel.org/majordomo-info.html Please read the FAQ
>> at
shabanip> http://www.tux.org/lkml/
>>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to capture kernel panics
  2005-02-25 15:28       ` Jeff Moyer
@ 2005-02-25 15:51         ` shabanip
  2005-02-25 15:48           ` Jeff Moyer
  0 siblings, 1 reply; 9+ messages in thread
From: shabanip @ 2005-02-25 15:51 UTC (permalink / raw)
  To: jmoyer; +Cc: shabanip, linux-kernel

thanks for the help.
does anything else left to configure?

Payam Shabanian
shabanip -at- avapajoohesh.com


> ==> Regarding Re: how to capture kernel panics; "shabanip"
> <shabanip@avapajoohesh.com> adds:
>
> shabanip> as i see netconsole is a kernel module.  so i just need to load
> shabanip> netconsole module with server:port parameters.  am i right?
>
> MODULE_PARM_DESC(netconsole, "
> netconsole=[src-port]@[src-ip]/[dev],[tgt-port]@<tgt-ip>/[tgt-macaddr]\n");
>
> So, for example:
>
> modprobe netconsole
> netconsole=6666@192.168.1.1/eth0,6666@192.168.1.100/00:40:95:9A:12:34
>
> -Jeff
>
>
> shabanip> Payam Shabanian shabanip -at- avapajoohesh.com
>
>>> ==> Regarding Re: how to capture kernel panics; Christian Borntraeger
>>> <linux-kernel@borntraeger.net> adds:
>>>
> linux-kernel> shabanip wrote:
>>>>> is there any way to capture and log kernel panics on disk or ...?
>>>
> linux-kernel> In former times, the Linux kernel tried to sync in the panic
> linux-kernel> function. (If the panic did not happen in interrupt context)
> linux-kernel> Unfortunately this had severe side effects in cases where
>>> the
> linux-kernel> panic was triggered by file system block device code or any
> linux-kernel> other part which is necessary for syncing. In most cases the
> linux-kernel> call trace never made it onto disk anyway. So currently the
> linux-kernel> kernel does not support saving a panic.
>>>
> linux-kernel> Apart from using a serial console, you might have a look at
> linux-kernel> several kexec/kdump/lkcd tools where people are working on
> linux-kernel> being able to dump the memory of a paniced kernel.
>>> Or netconsole, which will dump printk's do the server:port of your
>>> choosing.
>>>
>>> -Jeff
>>>
>
> shabanip> - To unsubscribe from this list: send the line "unsubscribe
> shabanip> linux-kernel" in the body of a message to
> shabanip> majordomo@vger.kernel.org More majordomo info at
> shabanip> http://vger.kernel.org/majordomo-info.html Please read the FAQ
> at
> shabanip> http://www.tux.org/lkml/
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-02-25 15:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-24 23:35 how to capture kernel panics shabanip
2005-02-25  3:08 ` James Colannino
2005-02-25 13:26   ` Trond Hasle Amundsen
2005-02-25 14:17 ` Christian Borntraeger
2005-02-25 14:42   ` Jeff Moyer
2005-02-25 15:07     ` shabanip
2005-02-25 15:28       ` Jeff Moyer
2005-02-25 15:51         ` shabanip
2005-02-25 15:48           ` Jeff Moyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.