Using kdump and SysRq

The kdump mechanism is a Linux kernel feature, which allows you to create dumps if your kernel crashes. It produces an exact copy of the memory, which can be analyzed for the root cause of the crash.

SysRq is a feature supported by the Linux kernel, which allows you to send key combinations to it even when your system becomes unresponsive.

How to do it…

First, we'll set up kdump and SysRq, and afterwards, I'll show you how to use it to debug a dump.

Installing and configuring kdump and SysRq

Let's take a look at how this is installed and configured:

  1. Install the necessary packages for kdump by executing the following command:
    ~]# yum install -y kexec-tools
    
  2. Ensure that crashkernel=auto is present in the GRUB_CMDLINE_LINUX variable ...

Get Linux: Powerful Server Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.