From Fedora Project Wiki

No edit summary
No edit summary
Line 6: Line 6:
#After system installed, check if kexec-tools kernel-debuginfo and crash is installed via <pre>rpm -q kexec-tools kernel-debuginfo crash</pre>Or via yum <pre>yum install kexec-tools kernel-debuginfo crash</pre>
#After system installed, check if kexec-tools kernel-debuginfo and crash is installed via <pre>rpm -q kexec-tools kernel-debuginfo crash</pre>Or via yum <pre>yum install kexec-tools kernel-debuginfo crash</pre>
#Reserve crashkernel for kdump by grubby<pre>rubby --args="crashkernl=128M" --update-kernel=$(grubby --default-kernel)</pre>Reboot system and check /proc/cmdline <pre>cat /proc/cmdline | grep "crashkernel"</pre>
#Reserve crashkernel for kdump by grubby<pre>rubby --args="crashkernl=128M" --update-kernel=$(grubby --default-kernel)</pre>Reboot system and check /proc/cmdline <pre>cat /proc/cmdline | grep "crashkernel"</pre>
#Edit /etc/kdump.conf, add this line:
#Edit /etc/kdump.conf, add this line:<pre>net my.server.com:/mnt/testarea/nfs</pre><pre>core_collector makedumpfile -c -d 31</pre>
    <pre>net my.server.com:/mnt/testarea/nfs
    core_collector makedumpfile -c -d 31</pre>
#Apply changes and start kdump via <pre>ervice kdump restart</pre>
#Apply changes and start kdump via <pre>ervice kdump restart</pre>



Revision as of 08:17, 22 March 2012

Description

Setup

  1. Prepare a NFS server, edit /etc/exports, append this line:
    /mnt/testarea/nfs *(rw,no_root_squash,sync)
    Restart NFS service:
     service nfs restart 
  2. Install Fedora on your machine
  3. After system installed, check if kexec-tools kernel-debuginfo and crash is installed via
    rpm -q kexec-tools kernel-debuginfo crash
    Or via yum
    yum install kexec-tools kernel-debuginfo crash
  4. Reserve crashkernel for kdump by grubby
    rubby --args="crashkernl=128M" --update-kernel=$(grubby --default-kernel)
    Reboot system and check /proc/cmdline
    cat /proc/cmdline | grep "crashkernel"
  5. Edit /etc/kdump.conf, add this line:
    net my.server.com:/mnt/testarea/nfs
    core_collector makedumpfile -c -d 31
  6. Apply changes and start kdump via
    ervice kdump restart

How to test

  1. Trigger crash via:
    echo c > /proc/sysrq-trigger
  2. 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

  1. Dump process could be monitered if console is connected
  2. System reboot successfully after dump vmcore finshed
  3. vmcore was found on NFS server
  4. No warning or error should be should found on crash output