How To Configure kdump


STEP 1: Prerequisites

– Access to server over NFS or ssh is required for dumping cores to a network target.


– A device or directory with enough free disk space is needed to hold the core.

STEP 2: Install It

1. Install/Verify kdump, 
            # rpm -ivh kexec-tools

            # rpm -q kexec-tools

STEP 3: Adding Boot Parameters

1. Add “crashkernel” to the kernel command line parameters in “/etc/grub.conf“, to reserve memory for the kdump kernel.
                        —————————————————————————————–
                        title Red Hat Enterprise Linux Client (2.6.17-1.2519.4.21.el5)
                                root (hd0,0)
                                kernel /boot/vmlinuz-2.6.17-1.2519.4.21.el5 ro root=LABEL=/ rhgb quiet                                                                       crashkernel=128M@16M
                                initrd /boot/initrd-2.6.17-1.2519.4.21.el5.img
                        —————————————————————————————–


Note: After adding, the system must be rebooted, for the crashkernel memory to be reserved for use by kdump. 

STEP 4: Specifying Kdump Location

– Specify the location of kdump vmcore in /etc/kdump.conf.

– Keep free space on disk equal to RAM

STEP 5: Testing

– Reboot the system after making the changes. 
            # init 6


– Now the 128M of memory is left reserved for the capture kernel. Memory will shown less by that amount
            # free -m


Now that the reserved memory region is set up, turn on the kdump init script and start the service:
            #  chkconfig kdump on
            #  service kdump start


Note: This will create a /boot/initrd-kdump.img, leaving the system ready to capture a vmcore upon crashing.

  

Leave a Reply

Your email address will not be published. Required fields are marked *