Home > Article > Operation and Maintenance > What is the use of linux kdump?
The function of linux kdump is to dump memory operating parameters when the system crashes, deadlocks or freezes; for example, once the system crashes, the normal kernel will no longer be able to work. At this time, kdump will Generate a kernel for capturing current running information. This kernel will collect all running status and data information in the memory at this time into a dump core file to facilitate Red Hat engineers to analyze the cause of the crash. Once the memory information collection is completed, the system will automatically restart.
#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
What is the use of linux kdump?
kdump is a tool and service used to dump memory operating parameters when the system crashes, deadlocks or freezes.
For example, if the system crashes, the normal kernel will not be able to work. At this time, kdump will generate a kernel for capturing the current running information. The kernel will capture the current running information in the memory. All running status and data information are collected into a dump core file to facilitate Red Hat engineers to analyze the cause of the crash. Once the memory information collection is completed, the system will automatically restart. This is the same as the previous diskdump and netdump. It’s just that kdump is unique to RHEL6.
Check whether kdump is turned on in the Linux system:
Execute the command: ulimit -c If the output is 0, it means it is not turned on. If it is unlimited, it is already open.
Temporarily open/close Linux kdump method:
ulimit -c unlimited opens;
ulimit -c 0 closes;
Modify the configuration file to open /Close kdump method:
vi /etc/profile file Add a new line at the end of the file, ulimit -S -c unlimited> /dev/null 2>&1
Save and exit: wq!
Execute source /etc/profile to make the current settings take effect
View through ulimit -c Check whether it has been opened successfully.
The kdump file location and viewing method when the system crashes:
Modify the path of the generated log file to /var/log
echo “/ var/log” > /proc/sys/kernel/core_pattern
The kdump file name is core.xxxx
Execute gdb core.xxx for debugging.
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of What is the use of linux kdump?. For more information, please follow other related articles on the PHP Chinese website!