tools to identify linux kernel panics and system hangs
Dave Hylands
dhylands at gmail.com
Sun Jun 19 13:46:03 EDT 2011
Hi Amit,
On Sun, Jun 19, 2011 at 8:22 AM, Amit Nagal <helloin.amit at gmail.com> wrote:
> On Sun, Jun 19, 2011 at 5:31 PM, Metin KAYA <kayameti at gmail.com> wrote:
>> - Enable CONFIG_KALLSYMS in kernel configuration.
>> - And the rest is here: http://www.xml.com/ldd/chapter/book/ch04.html
>> Regards.
>>
>
> Thanx for all the replies and facts . Actually my main concern is
> regarding identifying kernel panics and system hangs
> on embedded arm targets where i have access to only one serial port
> used primarily for reporting debug messages .
>
> Also wrt x86 , i tried to use gdb - kgdb interface using 2 PCs , but
> communication used to break too often .
>
> Then i tried ftrace which i found quite convinient to use on x86 till
> now except sometimes when ftrace takes too much time to print
> complete trace on console in case of crash .
>
> Can crash utility be used for arm targets as well ?
The magic-SysRq stuff works on the ARM. You need to enable it (as
Mulyadi mentions).
You initiate the SysRq through your serial terminal by sending a BREAK
followed by a single character.
How you send a break will depend on the terminal emulator software you're using.
I normally do BREAK-Space which prints a little help menu to show the
other single character codes which are available.
The SysRq stuff works as long as interrupts are still enabled. If
they're not enabled, then the serial port driver never gets notified
of the BREAK and can't initiate the processing. So it doesn't work
100% of the time, but often enough to still be useful.
Also, if you have klogd/syslogd running, they'll mess up some of the
output (like SySRq-T which does a stack crawl for every task in the
system). I find I tend to run with klogd/syslogd disabled when I'm
working at that level. If you're in a situation where they are
running, you may need to tweak the printk level (using SysRq-0 to 9)
in order to see all of your output.
--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
More information about the Kernelnewbies
mailing list