sudo apt-get install kdump-tools linux-image-$(uname -r)-dbgsym
/etc/default/kdump-tools
,设置USE_KDUMP=1
:sudo nano /etc/default/kdump-tools
/etc/default/grub
,添加内核参数crashkernel=128M
:sudo nano /etc/default/grub
在GRUB_CMDLINE_LINUX_DEFAULT
中添加crashkernel=128M
,示例:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash crashkernel=128M"
sudo update-grub
sudo reboot
sudo systemctl status kdump-tools
sudo echo c > /proc/sysrq-trigger
ls /var/crash
/var/crash
目录下。