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.

  1. Make sure /var/crash has space for vmcores.  You need to have enough space for an entire dump of RAM just to be safe.
  2. Add crashkernel=128M to your kernel command line in /boot/grub/grub.conf
  3. Setup /etc/kdump.conf to save vmcores to the right place.  I normally have /var in 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
    
  4. Make sure the kdump service is set to start on boot and restart the system.

  5. Check that there is an initrd in /boot created for kdump.  It will have “kdump” in the file name.

  6. Test your configuration.

    # echo 1 > /proc/sys/kernel/sysrq
    # echo c > /proc/sysrq-trigger
    
  7. 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.conf and then run sysctl -p as root.

    kernel.panic_on_oops = 1
    kernel.unknown_nmi_panic=1
    kernel.panic_on_unrecovered_nmi=1
    

Previous | Back | Next


comments powered by Disqus