Updated: 30 September 2026 · Applies to: kdump on AlmaLinux and Rocky Linux 9 (kexec-tools) and 10 (kdump-utils), RHEL 9 and 10

kdump saves the memory of a crashed kernel to disk (a "vmcore"), so the cause of a kernel panic can be analysed later. On CentOS 7 (end of life) there was a graphical tool, system-config-kdump, to set it up. That tool is not available on AlmaLinux, Rocky Linux or RHEL 9 and 10; kdump is configured with a few files and the kdumpctl command instead, which works the same with or without a desktop. For how kdump works, see understanding kexec and kdump on Linux.

1. Install and reserve memory

dnf install kexec-tools          # version 9
dnf install kdump-utils          # version 10 (kdumpctl moved to this package)
kdumpctl reset-crashkernel --kernel=ALL
reboot

reset-crashkernel sets the recommended crashkernel= reservation for all installed kernels. The memory is reserved at boot, so a reboot is needed. Check afterwards with cat /proc/cmdline and kdumpctl showmem.

2. Choose where dumps go

By default, dumps are saved to /var/crash/ on the local disk. To change it, edit /etc/kdump.conf, for example:

path /var/crash
core_collector makedumpfile -l --message-level 7 -d 31

-d 31 leaves out free, cache and user pages, which keeps the dump small. Dumps can also go to another disk, an NFS share or a server over SSH (nfs and ssh options in the same file). Make sure the target has free space of at least the size of the RAM in use.

3. Enable and check the service

systemctl enable --now kdump
kdumpctl status

The status should say Kdump is operational. After changing /etc/kdump.conf, run kdumpctl restart.

4. Test it (only on a test system)

This crashes the kernel on purpose and reboots the machine. kdumpctl test does it after asking for confirmation; the manual way is:

echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger

After the reboot, a folder with a vmcore file should appear in /var/crash/.

Official documentation: RHEL 10: enabling kdump.

Esta resposta foi útil?

Ainda com problemas? Abra um ticket