1. Home
  2. Enabling Kdump (RHEL/CentOS)

Enabling Kdump (RHEL/CentOS)

You can use the below instructions to configure kdump on a Bright managed cluster. These instructions should work on RHEL/CentOS 7 and 8.

1. Install required packages

Install the kexec-tools in the software image:
# yum install kexec-tools --installroot=/cm/images/<image-name>

2. Modify the software image

Configure the software image to allow crashkernel memory and update the exclude list to avoid wiping out the crash path:

# cmsh
% softwareimage use <image-name>
% append kernelparameters " crashkernel=128M" # please make sure that the append starts with a blank space
% commit
% category use <category-name>
% set excludelistsyncinstall
(add the following lines to exclude; save changes and exit)
- /var/crash/*

no-new-files: - /var/crash/*

% commit

3. Enable the kdump service in the software image:

# chroot /cm/images/<image name>
# chkconfig kdump on

4. Confirm kdump is configured correctly

Make sure that the kdump service is active when the node comes up after reboot.
[root@node001 ~]# cat /proc/cmdline
BOOT_IMAGE=images/default-image/vmlinuz
initrd=images/default-image/initrd crashkernel=128M
ip=10.141.0.1:10.141.255.254:10.141.255.254:255.255.0.0
BOOTIF=01-08-00-27-0c-4c-ca

[root@node001 ~]# service kdump status
Kdump is operational

5. Generated a kernel panic to test.

You can then try to generate a kernel panic with "echo c > /proc/sysrq-trigger" and see if the crash report will be generated successfully "WARNING this will crash the node and cause a kernel panic":

Updated on September 13, 2022

Leave a Comment