Ubuntu20.04出现段错误核心已转储问题解决方案
//控制core文件的文件名中是否添加pid作为扩展echo "1" > /proc/sys/kernel/core_uses_pid//设置core文件的输出路径和输出文件名,这里我的路径是/home/boy/corefile,文件名就是后面的部分
echo "/home/boy/corefile/core-%e-%p-%t"> /proc/sys/kernel/core_pattern
//参数说明
%p - insert pid into filename 添加pid
%u - insert current uid into filename 添加当前uid
%g - insert current gid into filename 添加当前gid
%s - insert signal that caused the coredump into the filename 添加导致产生core的信号
%t - insert UNIX time that the coredump occurred into filename 添加core文件生成时的unix时间
%h - insert hostname where the coredump happened into filename 添加主机名
%e - insert coredumping executable name into filename 添加程序名
http://blog.itpub.net/70003733/viewspace-2907470/
页:
[1]