Atlas 800 Inference Server Ubuntu 20.04 Installation Guide (Model 3010) 01

Installing, Configuring, and Testing Kdump

Installing, Configuring, and Testing Kdump

Installing Kdump

The kdump software package does not exist in the local DVD-ROM drive source. You need to install Kdump by using an external network source.

Prerequisites: The OS has network configuration and can access the network source.

Run the sudo -s command to switch the execution permission and perform the following steps:

  1. Run the apt depends linux-crashdump command to query the dependency package and run the apt install linux-crashdump command to install it.

  2. In the dialog box that is displayed, select Yes and press Enter.

  3. Select Yes and press Enter.

    Note: If you do not select Yes, you can run the dpkg-reconfigure kdump-tools command and enter Yes, or set USE_KDUMP to 1 in /etc/default/kdump-tools to enable kdump-tools.

    If the following information is displayed, Kdump has been installed.

Configuring Kdump

Kdump configuration syntax: crashkernel=384M-:128M (default value)

Syntax meaning: If the server memory is less than 384 MB, the memory is not reserved. If the server memory is greater than or equal to 384 MB, reserve 128 MB.

The size of the reserved memory depends on the physical memory size of the server.

Configuration:

  1. Run the sudo -s command to switch the execution permission. Run the vi command to edit the /etc/default/grub.d/kdump-tools.cfg file and set the size to be greater than the reserved memory size to 512 MB.

    GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT crashkernel=384M-:512M"

  2. Run the update-grub command to update the GRUB configuration.

  3. Run the poweroff command to power off the OS (the reboot operation will quickly start the kernel by using kexec, and the latest grub.cfg configuration information cannot be read), and then run the poweron command on the iBMC to power on the OS.
  4. After the system is powered on and started up, run the cat /proc/cmdline command to check whether the configuration takes effect. Run the kdump-config show command to check whether Kdump is in the ready to kdump state. Run the systemctl status kdump-tools command to check whether Kdump is activated. If the Kdump status is abnormal, to check and modify the configuration, you need to power off and then power on the server for the modification to take effect.

Testing Kdump

  1. Run the following commands to force the kernel to crash:

    sudo -s

    sudo sysctl -w kernel.sysrq=1

    echo c > /proc/sysrq-trigger

  2. After the OS is restarted, check whether the linux-image-xxxx.crash file is generated in /var/crash/. If the file is generated, Kdump can be used properly.