ubuntu开启coredump并设置core文件的产生位置

1、sudo su
2、vim /etc/profile
   添加 ulimit -c unlimited
3、在你的主目录下创建core文件夹,比如我在/home/ji下创建core文件夹
4、vim /etc/sysctl.conf
   添加
       kernel.core_pattern=/home/houdar/core/core_%e_%p_%t
       kernel.core_uses_pid=0
   说明:
    %e 文件名
    %p 进程pid
    %t 时间
5、reboot 重启电脑

猜你喜欢

转载自www.cnblogs.com/hysea2019/p/10983629.html
今日推荐