From Fedora Project Wiki
Description
Setup
- Prepare a server, no matter RHEL5/RHEL6/Fedora
- Install Fedora 17 on your machine
- After system installed, check if kexec-tools kernel-debuginfo and crash is installed via
rpm -q kexec-tools kernel-debuginfo crash
If not, you can install via yumyum install kexec-tools kernel-debuginfo crash
- Reserve crashkernel for kdump by grubby
grubby --args="crashkernl=128M" --update-kernel=$(grubby --default-kernel)
Reboot system and check /proc/cmdlinecat /proc/cmdline | grep "crashkernel"
- Edit /etc/kdump.conf, add this line:
net root@my.server.com path /var/crash core_collector makedumpfile -E -d 31 link_delay 60
- Apply changes and start kdump via
/usr/bin/kdumpctl propagate /usr/bin/kdumpctl restart
How to test
- Trigger crash via:
echo c > /proc/sysrq-trigger
- Copy vmcore from server:
scp -r root@my.server.com:/var/crash/ /var/crash
- Analyse vmcore:
readelf -a /var/crash/xxx/vmcore
- Use crash to analyse vmcore:
mount -t nfs my.server.com:/mnt/testarea/nfs /var/crash/ crash -i crash-simple.cmd /usr/lib/debug/lib/modules/xxx/vmlinux /var/crash/xxx/vmcore crash -i crash.cmd /usr/lib/debug/lib/modules/xxx/vmlinux /var/crash/xxx/vmcore
Expected Results
- Dump process could be monitered if console is connected
- System reboot successfully after dump vmcore finshed
- vmcore was found on server
- No "warning" "warnings" found on readelf output
- No warning or error should be should found on crash output