Subhendu_Ghosh-KExecKDump.pdf
>>>설정법 참고
How do I use the diskdump utility to capture a vmcore in Red Hat Enterprise Linux 3 and 4?
http://kbase.redhat.com/faq/docs/DOC-7075
How do I configure kexec/kdump on Red Hat Enterprise Linux 5?
http://kbase.redhat.com/faq/docs/DOC-6039
How do I run commands using kdump, before vmcore is saved?
http://kbase.redhat.com/faq/docs/DOC-2164
How do I configure Xendump on Red Hat Enterprise Linux 5?
http://kbase.redhat.com/faq/docs/DOC-9864
Documentation for Kdump - The kexec-based Crash Dumping Solution
http://www.cyberciti.biz/files/linux-kernel/Documentation/kdump/kdump.txt
http://wiki.verwilst.be/howto:kdump
Debugging Linux 2.6 kernels with Kexec/Kdump
2G이상인 경우 256M로 권장합니다. 또한 crashkernel의 사이즈의 크기는 현재 사용중인 메모리와 거의 무관합니다.
kdump는 kexec의 사용으로 bios없이 crash capture kernel의 부팅으로 현재의 메모리를 덤프합니다.
Load the Dump-capture Kernel
============================
After booting to the system kernel, load the dump-capture kernel using
the following command:
kexec -p <dump-capture-kernel> \
--initrd=<initrd-for-dump-capture-kernel> --args-linux \
--append="root=<root-dev> init 1 irqpoll"
Notes on loading the dump-capture kernel:
* <dump-capture-kernel> must be a vmlinux image (that is, an
uncompressed ELF image). bzImage does not work at this time.
* By default, the ELF headers are stored in ELF64 format to support
systems with more than 4GB memory. The --elf32-core-headers option can
be used to force the generation of ELF32 headers. This is necessary
because GDB currently cannot open vmcore files with ELF64 headers on
32-bit systems. ELF32 headers can be used on non-PAE systems (that is,
less than 4GB of memory).
* The "irqpoll" boot parameter reduces driver initialization failures
due to shared interrupts in the dump-capture kernel.
* You must specify <root-dev> in the format corresponding to the root
device name in the output of mount command.
* "init 1" boots the dump-capture kernel into single-user mode without
networking. If you want networking, use "init 3."
Kernel Panic
============
After successfully loading the dump-capture kernel as previously
described, the system will reboot into the dump-capture kernel if a
system crash is triggered. Trigger points are located in panic(),
die(), die_nmi() and in the sysrq handler (ALT-SysRq-c).
The following conditions will execute a crash trigger point:
If a hard lockup is detected and "NMI watchdog" is configured, the system
will boot into the dump-capture kernel ( die_nmi() ).
If die() is called, and it happens to be a thread with pid 0 or 1, or die()
is called inside interrupt context or die() is called and panic_on_oops is set,
the system will boot into the dump-capture kernel.
On powererpc systems when a soft-reset is generated, die() is called by all cpus and the system system will boot into the dump-capture kernel.
For testing purposes, you can trigger a crash by using "ALT-SysRq-c",
"echo c > /proc/sysrq-trigger or write a module to force the panic.
Write Out the Dump File
=======================
After the dump-capture kernel is booted, write out the dump file with
the following command:
cp /proc/vmcore <dump-file>
You can also access dumped memory as a /dev/oldmem device for a linear
and raw view. To create the device, use the following command:
mknod /dev/oldmem c 1 12
Use the dd command with suitable options for count, bs, and skip to
access specific portions of the dump.
To see the entire memory, use the following command:
dd if=/dev/oldmem of=oldmem.001
2G이상인 경우 256M로 권장합니다.
이상입니다.