Compressing the core files during core generation

前端 未结 3 1730
野性不改
野性不改 2021-02-07 22:01

Is there way to compress the core files during core dump generation?

If the storage space is limited in the system, is there a way of conserving it in case of need for c

3条回答
  •  无人共我
    2021-02-07 22:59

    The Linux kernel /proc/sys/kernel/core_pattern file will do what you want: http://www.mjmwired.net/kernel/Documentation/sysctl/kernel.txt#141

    Set the filename to something like |/bin/gzip -1 > /var/crash/core-%t-%p-%u.gz and your core files should be saved compressed for you.

提交回复
热议问题