Some quick notes for configuring kdump on RHEL 6. Kdump produces a vmcore on a kernel panic, oops, or other condition that our friends a Red Hat support can use to debug kernel level issues.
- Make sure
/var/crashhas space for vmcores. You need to have enough space for an entire dump of RAM just to be safe.
crashkernel=128Mto your kernel command line in
/etc/kdump.confto save vmcores to the right place. I normally have
/varin a separate logical volume so I need to change the default location. We also setup what memory pages to leave out and to use compression.
# cat /etc/kdump.conf ext4 /dev/mapper/Volume00-var path /crash core_collector makedumpfile -c --message-level 1 -d 31
Make sure the kdump service is set to start on boot and restart the system.
Check that there is an initrd in /boot created for kdump. It will have “kdump” in the file name.
Test your configuration.
# echo 1 > /proc/sys/kernel/sysrq # echo c > /proc/sysrq-trigger
Configure the system to kernel panic on oops or NMI depending on the problem you are attempting to capture. Add these lines to
/etc/sysctl.confand then run
sysctl -pas root.
kernel.panic_on_oops = 1 kernel.unknown_nmi_panic=1 kernel.panic_on_unrecovered_nmi=1