(Optional) Kdump Configuration
Kdump is enabled by default, and the default setting is crashkernel=auto.
Verify the kdump configuration as follows:
- Run the following command to check whether the Kdump service is running:
- Run the following commands to make the Linux kernel break down:
- After the OS is restarted, check whether the address-YYYY-MM-DD-HH:MM:SS/vmcore and vmcore-dmesg.txt files are generated in /var/crash/. If yes, the kdump configuration is correct.
To manually adjust the reserved memory size, perform the following steps:
(The following describes how to set the size of crashkernel to 512 MB.)
- Run the vi /etc/default/grub command, set crashkernel to 512M, save the configuration, and exit.
- Run the following command to synchronize the modification to grub.cfg:
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
- Run the reboot command to restart the OS for the configuration to take effect.
- Perform a kdump test to ensure that the kdump function is normal.