RHEL 5 Linux : configure Kdump on Red Hat Enterprise Linux 5
Other Learning Articles that you may like to read
Free Courses We Offer
Paid Training Courses we Offer
Installing required packages
RHEL 5 has the Kdump packages installed by default. If for any reason they are not installed, you need to install the packages “kexec-tools-.rpm” and “system-config-kdump-.rpm” with the following commands:
# rpm -ivh kexec-tools-.rpm system-config-kdump-.rpm
or, if your system is registered at the Red Hat Network, by running
# yum install kexec-tools system-config-kdump
Configuration of Kdump
First you need to enable Kdump. There is a configuration dialog available which can be started under a graphical environment by using:
Please check the option box “Enable kdump” at the top of the Dialog.
Next, you have to define the memory to reserve for Kdump In the dialog you see the memory information for your system and the usable memory for Kdump. On most systems a value of “128MB” Kdump memory should be enough.
Finally, you need to define a location where to store the dump file. You have the choice between “file”, “nfs”, “ssh”, “raw”, “ext2”, and “ext3”. This setup is straight forward, please configure the kdump as it fit’s best into your environment. The simplest configuration for the location is “file:///var/crash“.
You need to take care that you have enough disk space on the configured location, at least the physically memory of the system which is expected to dumped.
After you have configured kdump, you need to reboot the system to activate the settings.
More information about the configuration can be found in the file “/usr/share/doc/kexec-tools-*/kexec-kdump-howto.txt“
Checking the configuration
To make sure that the configuration is working, you can test by using the magic SysRq feature of the kernel.
WARNING: Please make sure that no other users are logged into the system and that all work is saved before following the next steps, otherwise this may lead to data loss.
First you need to enable it with the following command:
# echo 1 > /proc/sys/kerne/sysrq
Next you should sync the data of your hard disks to minimize the risk of lost data by
# echo s > /proc/sysrq-trigger
And finally you can force the system to “crash” by
# echo c > /proc/sysrq-trigger
You should see some panic output and the system will restart into the kdump kernel to save the crash dump data. This will take some time depending on the amount of memory of your system and the speed of the device the dump is written to. After the dump is finished the system will reboot back to the normal service.
If you follow the example above you should now find the core file at “/var/crash//vmcore” which indicating the the setup is working.