服务器core文件

寵の児 提交于 2019-12-21 23:42:03

【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>

什么是core文件

程序崩溃时保留现场,将内存信息映射到core文件中,便于程序员进行调试

 

查看core文件存储地址以及命名规则

# cat /proc/sys/kernel/core_pattern 
/home/coresave/bak/core.%e.%p.%t

    %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 添加命令名

 

core文件生成大小限制

查看当前core文件大小限制

# ulimit -c
unlimited

ulimit -cfilesize

ulimit -cunlimited

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!