All Products
Search
Document Center

Elastic Compute Service:Enable or disable the kernel crash dump service for an instance

Last Updated:Apr 11, 2025

The kernel crash dump service captures kernel errors and dumps memory information to disks for analysis of kernel crash issues. This topic describes how to use Cloud Assistant to enable or disable the kernel crash dump service for an Elastic Compute Service (ECS) instance.

Background information

When an ECS instance crashes, you must collect kernel error logs and the memory snapshots generated by the kernel crash dump service to analyze and locate issues. This helps you identify the cause of the crash.

Enable or disable the kernel crash dump service

Alibaba Cloud Cloud Assistant provides plug-ins that can be used to manage the kernel crash dump service, such as enabling and disabling the service. The following sections describe how to use Cloud Assistant plug-ins to enable and disable the kernel crash dump service.

Warning

If you want to analyze the cause of a kernel crash on an ECS instance by using the kernel crash dump service, we recommend that you create snapshots for the instance in advance to ensure data security.

Linux instance

In Linux instances, the kernel crash dump mechanism is provided by the Kdump service. Perform the following steps to enable or disable the Kdump service for a Linux instance by using Cloud Assistant:

  1. Use Workbench to connect to a Linux instance over SSH.

  2. Run the following command to enable the Kdump service for the Linux instance:

    acs-plugin-manager --exec --plugin ecs_dump_config --params --enable

    The following command output indicates that the service is enabled:

    [INFO] start enable kdump
    [INFO] Detected kdump service installed in your system
    [INFO] to enable  kdump service
    [INFO] execute command: systemctl enable kdump-tools
    Synchronizing state of kdump-tools.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
    Executing: /usr/lib/systemd/systemd-sysv-install enable kdump-tools
    Created symlink /etc/systemd/system/basic.target.wants/kdump-tools.service → /usr/lib/systemd/system/kdump-tools.service.
    [INFO] execute command: systemctl start kdump-tools
    [INFO] now kdump-tools service's status is: active
    [INFO] kdump status is: current state   : ready to kdump
    [INFO] successful enable kdump
  3. Run the following command to check the status of the Kdump service:

    acs-plugin-manager --exec --plugin ecs_dump_config --params --status

    The following command output indicates that the Kdump service is enabled:

    [INFO] query kdump status
    [INFO] Detected kdump service installed in your system
    [INFO] now kdump-tools service's status is: active
    [INFO] kdump status is: current state   : ready to kdump
  4. (Optional) Run the following command to disable the Kdump service for the Linux instance:

    acs-plugin-manager --exec --plugin ecs_dump_config --params  --disable

    The following command output indicates that the Kdump service is disabled:

    [INFO] disable kdump
    [INFO] Detected kdump service installed in your system
    [INFO] execute command: systemctl stop kdump-tools
    [INFO] execute command: systemctl disable kdump-tools
    Synchronizing state of kdump-tools.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
    Executing: /usr/lib/systemd/systemd-sysv-install disable kdump-tools
    Removed "/etc/systemd/system/basic.target.wants/kdump-tools.service".
    [INFO] disable kdump finished

Windows Server instance

  1. Use Workbench to connect to a Windows instance over RDP.

  2. Click the Start icon, enter Windows PowerShell in the search box, and then press the Enter key.

  3. Run the following command to go to the Cloud Assistant installation directory and list the files and folders under the directory:

    cd C:\ProgramData\aliyun\assist\ ; dir

    Based on the output of the preceding command, run the following command to switch to the folder named after the Cloud Assistant version number, such as 2.1.3.857. In actual operations, replace the folder name with the actual value.

    cd 2.1.3.857
  4. Run the following command to enable the kernel crash dump service for the Windows Server instance:

    .\acs-plugin-manager.exe --exec --plugin ecs_dump_config_win --params --enable

    The following command output indicates that the service is enabled:

    [03/19/2025 10:38:03] [info] Set crash dump success.
  5. Run the following command to check the status of the kernel crash dump service:

    .\acs-plugin-manager.exe --exec --plugin ecs_dump_config_win --params --status

    The following command output indicates that the service is enabled:

    [03/19/2025 10:36:11] [info] Crash status is ON.
  6. (Optional) Run the following command to disable the kernel crash dump service for the Windows Server instance:

    .\acs-plugin-manager.exe --exec --plugin ecs_dump_config_win --params  --disable

    The following command output indicates that the service is disabled:

    [03/19/2025 10:36:25] [info] Set crash dump success.

References