Core files in Linux

Source: Internet
Author: User

In Linux, the core file is related to the linux platform. Set the method for generating the core dump file: 1) Enter ulimit-c in the terminal. If the result is 0, it means that when the program crashes, the system cannot generate core dump. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.