From Fedora Project Wiki
Description
Setup
- Prepare a NFS server, edit /etc/exports, append this line:
/mnt/testarea/nfs *(rw,no_root_squash,sync)
Restart NFS service:service nfs restart
- Install Fedora on your machine
- After system installed, check if kexec-tools kernel-debuginfo and crash is installed via
rpm -q kexec-tools kernel-debuginfo crash
Or 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 my.server.com:/mnt/testarea/nfs
core_collector makedumpfile -c -d 31
- Apply changes and start kdump via
service kdump restart
How to test
- Trigger crash via:
echo c > /proc/sysrq-trigger
- 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 NFS server
- No warning or error should be should found on crash output