3.2. Using kdump and kexec with the Red Hat Enterprise Linux for Real Time Kernel
kexecto boot into a second kernel whenever the system crashes. This second kernel, often called the crash kernel, boots with very little memory and captures the dump image.
kdumpkernel into the reserved space. When a kernel panic or other fatal error occurs,
kexecis used to boot into the kdump kernel without going through BIOS. The system reboots to the kdump kernel that is confined to the memory space reserved by the standard boot kernel, and this kernel writes a copy or image of the system memory to the storage mechanism defined in the configuration files. Because
kexecdoes not go through the BIOS, the memory of the original boot is retained, and the crash dump is much more detailed. Once this is done, the kernel reboots, which resets the machine and brings the boot kernel back up.
rt-setup-kdumptool. Third, use a graphical system configuration tool called
system-config-kdumpto create and enable a detailed kdump configuration.
Installing Required kdump PackagesThe
rt-setup-kdumptool is part of the rt-setup package. You also need kexec-tools and system-config-kdump:
yum install rt-setup kexec-tools system-config-kdump
Creating a Basic kdump Kernel with
- Run the
--grubparameter adds the necessary changes to all the real-time kernel entries listed in the GRUB configuration.
- Restart the system to set up the reserved memory space. You can then turn on the kdump init script and start the kdump service:
systemctl enable kdump~]#
systemctl start kdump
Enabling kdump with
- Select thesystem tool from the → menu, or use the following command at the shell prompt:
- The Kernel Dump Configuration window displays. On the toolbar, click the button labeled . The Red Hat Enterprise Linux for Real Time kernel supports the
crashkernel=autoparameter which automatically calculates the amount of memory necessary to accommodate the kdump kernel.By design, on Red Hat Enterprise Linux 7 systems with less than 4GB of RAM, the
crashkernel=autodoes not reserve any memory for the kdump kernel. In this case, it is necessary to manually set the amount of memory required. You can do so by entering your required value in the New kdump memory field on the Basic Settings tab:
NoteAn alternative way of allocating memory for the kdump kernel is by manually setting the
crashkernel=<value>parameter in the GRUB configuration.
- Click the Target Settings tab, and specify the target location for your dump file. It can be either stored as a file in a local file system, written directly to a device, or sent over a network using the NFS (Network File System) or SSH (Secure Shell) protocol.To save your settings, click thebutton on the toolbar.
- Reboot the system to ensure that kdump is properly started. If you want to check that the kdump is working correctly, you can simulate a panic using
echo c > /proc/sysrq-triggerThis will cause the kernel to panic, and the system will boot into the kdump kernel. Once your system has been brought back up, you can check the log file at the specified location.
/etc/sysconfig/kdumpfile and add
irq 9: nobody cared (try booting with the "irqpoll" option) handlers: [<ffffffff811660a0>] (acpi_irq+0x0/0x1b) turning off IO-APIC fast mode.
acpi=noirqas a boot parameter to the kdump kernel. Only add this line if this error occurs as it can cause boot problems on machines not affected by this issue.
For more information, or for further reading, the following man page is related to the information given in this section.