Home  >  Article  >  Operation and Maintenance  >  What folder is linux crash?

What folder is linux crash?

藏色散人
藏色散人Original
2023-03-06 09:31:413289browse

Linux crash is a folder used to store the generated crash. The folder is stored in "/var/crash" by default, and the file that controls the storage location is the "/var/sysconfig/kdump" file. Users can view crashes by installing the kdump tool.

What folder is linux crash?

The operating environment of this tutorial: linux5.9.8 system, DELL G3 computer

What is the folder of linux crash?

/var/crash directory analysis

#1: The generated crash is stored in:/var/crash by default, and the file that controls the storage location is:/ var/sysconfig/kdump file. If you want to view the crash, you need to install the kdump tool first before there will be a kdump file. It is not installed by default in opensuse.

2: There are four files in the crash directory:

linux:/var/crash/2015-01-04-14:37 # ll
total 3084144
-rw-r--r-- 1 root root                   187 Jan  4 14:40 README.txt
-rw-r--r-- 1 root root          1626134 Jan  4 14:40 System.map-2.6.32.59-0.7-default
-rw------- 1 root root   3149631649 Jan  4 14:40 vmcore
-rw-r--r-- 1 root root          3801265 Jan  4 14:40 vmlinux-2.6.32.59-0.7-default.gz
linux:/var/crash/2015-01-04-14:37 #

vmcore is the crash file; vmlinux-2.6.32.59-0.7-default.gz is the compressed bootable kernel (should be ), the decompression method of gz is: gunzip vmlinux-2.6.32.59-0.7-default.gz

3: Download the corresponding version of the code. Compile the corresponding version of the debugging kernel with the -g option. Adding the -g option can turn on the debugging information through make menuconfig (when I compile, I can directly make the debugging kernel without doing this process).

Check the kernel version command of your own system: uname -r

The vmlinux in the package after make is the compiled kernel with debugging. You can copy vmlinx to the crash directory, and then Enter crash vmcore vmlinux in this directory. This means using the compiled kernel to parse the vmcore file.

4: Then use the bt command to view the register mod command to load the debugging symbol struct and parse out an address structure

Recommended study: "Linux Video Tutorial"

The above is the detailed content of What folder is linux crash?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn