How to generate A core dump file in linux and set the concept of core dump: a core dump is the recorded state of the working memory of a computer program at A specific time, generally when the program has terminated abnormally (crashed ). in practice, other key pieces of program state are usually dumped at the same time, including the processor registers, which may include the program counter and stack pointer, memory management informa Tion, and other processor and operating system flags and information. the name comes from the once-standard memory technology core memory. core dumps are often used to diagnose or debug errors in computer programs. on your operating systems, a fatal error in a program automatically triggers a core dump, and by extension the phrase "to dump core" has come to mean, in your cases, fatany Al error, reg Ardless of whether a record of the program memory is created. on linux, set the core dump file generation method: 1) Enter ulimit-c in the terminal. If the result is 0, the system cannot generate a core dump when the program crashes. 2) use the ulimit-c unlimited command to enable the core dump function without limiting the size of the generated core dump file. If you need to limit the number, add a number limit. Ulimit-c 1024 3) by default, the file name generated by core dump is core, and it is in the current directory of the program. The new core overwrites the existing core. By modifying the/proc/sys/kernel/core_uses_pid file, you can use the pid of the process as the extension. The generated core file format is core. xxx, where xxx is pid 4) You can modify/proc/sys/kernel/core_pattern to control the location and format of the core file. For example, to generate all core files to the/corefile directory, the file name format is core-command name-pid-timestamp. echo "/corefile/core-% e-% p-% t">/proc/sys/kernel/core_pattern