zoukankan      html  css  js  c++  java
  • coredump位置修改

    To change the location of the newly created core files, you have to change the content of /proc/sys/kernel/core_pattern:

    Code:
    sudo echo /tmp/core > /proc/sys/kernel/core_pattern

    this will put the core dumps in /tmp, naming them "core". You can also add some modifiers to the content of the above, to customize the name of the core file, for example:

    Code:
    sudo echo /tmp/core.%u.%p > /proc/sys/kernel/core_pattern

    will add the user ID of the owner of the process and the PID of the process itself. Other modifiers are available. See man 5 core for details.

    Ah, just forgotten... by modifying a value under /proc you will lost changes upon reboot. To make them permanent, you can edit the file /etc/sysctl.conf, for example by adding the following lines

    Code:
    # Setup a directory to save core files into
    kernel.core_pattern = /tmp/core
    I've had a few core dumps since I made these changes, and they don't seem to be effecting the placement of core files.

    I have "kernel.core_pattern = /tmp/core" in /etc/sysctl.conf, /proc/sys/kernel/core_pattern is: "|/usr/share/apport/apport "

    I would really like to get these buggers in /tmp, as they are quite large.
    Strange. If you did not reboot the machine after the modification of /etc/sysctl.conf, the change has not been applied. Have you manually modified the content of /proc/sys/kernel/core_pattern using the echo command?
    Code:
    sudo echo /tmp/core > /proc/sys/kernel/core_pattern
    
    yes this command does the trick (well, I have to su in, it doesn't work with sudo because of the > redirection thing), but as you said, it does not stick after a reboot.

    "kernel.core_pattern = /tmp/core" doesn't seem to change this.
     
  • 相关阅读:
    HTTPS之acme.sh申请证书
    GoAccess日志分析工具
    KVM之CPU虚拟化
    自动化运维之PSSH
    Hadoop+HBase 集群搭建
    SSH + Google Authenticator 安全加固
    查看数据的类型(python)
    在word中,替换多个词语。正则表达式中 [] {} 是可以连用的(python)
    方差分析的前提,与检验,以及球形检验
    清屏处理(汇编)
  • 原文地址:https://www.cnblogs.com/SophiaTang/p/3020145.html
Copyright © 2011-2022 走看看