Now Reading: Configure Kdump output location in CentOS/RHEL 9 – Ranjan.info

Loading
svg
Open

Configure Kdump output location in CentOS/RHEL 9 – Ranjan.info

February 8, 20243 min read

Kernel crashes are inevitable in any computing environment, and it is important to have a reliable mechanism for obtaining diagnostic information for effective troubleshooting and system recovery. In Red Hat Enterprise Linux (RHEL) 9, the Kdump utility provides a powerful solution for capturing kernel crash data. While Kdump is installed by default in RHEL 9, configuring the output location ensures that crash dumps are stored in the location that best suits the needs of your environment.

By default, Kdump files are stored in the /var/crash directory in RHEL 9. However, administrators may want to save the crash dump to other locations, such as an NFS mount, an externally mounted drive, or a remote file server. This can be achieved by editing the /etc/kdump.conf file.

To configure Kdump output location in RHEL 9, follow these steps:

1. Edit kdump.conf file,
open /etc/kdump.conf Open the file in a text editor and remove the # comment character at the beginning of each line you want to enable. It allows you to specify an alternative output location for Kdump files.

2. Define output locations,
Use the PATH keyword to specify a new directory location to store the kdump files. For example, to save a crash dump to the /usr/local/cores directory, add the following line to the kdump.conf file:

Additionally, you can use the raw keyword to output directly to a specific device in the /dev directory. You can also specify the output file system using the label, name, or UUID of a particular device.

For example:

ext4 UUID=5b065be6-9ce0-4154-8bf3-b7c4c7dc7365

3. Transfer kdump files over SSH,
Kdump files can also be transferred over a secure shell (SSH) connection. To configure it, specify the SSH connection details and the SSH key in the kdump.conf file.

For example:

$ ssh [email protected]
$ sshkey /root/.ssh/mykey

4. Export kdump files to network share,
Another option is to export the Kdump files to a compatible network share. This can be achieved by specifying the NFS server and directory in the kdump.conf file.

5. Enable Kdump Service,
After configuring the output location for kdump, enable the kdump service to apply the changes.

$ sudo systemctl enable --now kdump.service

By following these steps, administrators can customize the Kdump output location in RHEL 9 to best suit the needs of their environment. Whether saving the crash dump locally, on a remote server, or on a network share, configuring the Kdump output location ensures that critical diagnostic information is readily available for troubleshooting kernel crashes.

How do you vote?

0 People voted this article. 0 Upvotes - 0 Downvotes.
svg

What do you think?

Show comments / Leave a comment

Leave a reply

You may like
Loading
svg