In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article, the editor introduces in detail "how to correctly capture kernel crash information by Linux". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to correctly capture kernel crash information by Linux" can help you solve your doubts.
First install the required package: apt-get-y install aptitude kdump-tools crash kexec-tools makedumpfile linux-image- `kernel-r`-dbgaptitude full-upgrade # avoid running the kernel version that is inconsistent with the debug version, resulting in unable to debug the Kdump configuration file / etc/default/kdump-tools key part USE_KDUMP=1KDUMP_SYSCTL= "kernel.panic_on_oops=1" KDUMP_KERNEL=/boot/vmlinuz-3.16.0-4-amd64KDUMP_INITRD=/boot/initrd.img-3 .16.0-4 DEBUG_KERNEL=/usr/lib/debug/vmlinux-3.16.0 amd64KDUMPP COREDIR = "/ data/crash" KDUMP_FAIL_CMD= "reboot-f" DEBUG_KERNEL=/usr/lib/debug/vmlinux-3.16.0-4Muamd64MAKEDUMPP ARGSs = "- c-d 31" KDUMP_CMDLINE= "crashkernel=512M" crashkernel size ratio It will restart automatically about 1 minute after the normal crash, and incorrect configuration will cause the restart to get stuck on the black screen. Memory size crashkernel=0-12G 128M13-48G 256M49-128g 512M129-256g 1G * (896m, 768m or 512m) Grub configuration file / etc/default/grub key section
GRUB_CMDLINE_LINUX_DEFAULT= "nmi_watchdog=1 crashkernel=512M"
Sysctl configuration file / etc/sysctl.conf key part kernel.sysrq = 1kernel.watchdog = 1kernel.nmi_watchdog = 1kernel.panic_on_oops = 1kernel.softlockup_panic = 1kernel.watchdog_thresh = 10 restart to make the configuration effective update-grubreboot-fkdump-config loadkdump-config show check # cat / proc/cmdlineBOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 root=UUID=a58ab901-00aa-4f8b-b3eb-d352fc72233 ro net.ifnames=0 thash_entries=1048576 rhash_entries=1048576 biosdevname=0 nohz=off enforcing=0 ipv6.disable_ipv6=1 nmi _ watchdog=1 selinux=0 transparent_hugepage=never cgroup_enable=memory swapaccount=1 vga=771 crashkernel=512M# kdump-config testUSE_KDUMP: 1KDUMP_SYSCTL: kernel.panic_on_oops=1KDUMP_COREDIR: / data/crashcrashkernel addr: 0x2e000000kdump kernel addr:kdump kernel: / boot/vmlinuz-3.16.0-4-amd64kdump initrd: / boot/initrd.img-3.16.0-4-amd64debug kernel: / usr/lib/debug/vmlinux-3.16.0-4-amd64kexec command to be used: / Sbin/kexec-p-- command-line= "BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64 root=UUID=a58ab901-00aa-4f8b-b3eb-d352fc7f6acb ro net.ifnames=0 thash_entries=1048576 rhash_entries=1048576 biosdevname=0 nohz=off enforcing=0 ipv6.disable_ipv6=1 nmi_watchdog=1 selinux=0 transparent_hugepage=never cgroup_enable=memory swapaccount=1 vga=771 irqpoll maxcpus=1 nousb systemd.unit=kdump-tools.service crashkernel=512M"-- initrd=/boot/initrd.img-3.16.0-4-amd64 / boot/vmlinuz-3.16.0-4-amd64 Test echo c > / proc / sysrq-trigger analysis crash/ data/crash/201609010252/dump.201609012233 / usr/lib/debug/lib/modules/3.16.0-4-amd64/vmlinux
Start a happy debugging journey.
Common error: WARNING: kernel version inconsistency between vmlinux and dumpfile # version is inconsistent, full-upgrade. The system does not restart after a crash. # Please check the settings of sysctl, crashkernel and nmi_watchdog! After reading this, the article "how to correctly capture kernel crash information by Linux" has been introduced. If you want to grasp the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.