服务器core文件

什么是core文件程序员

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

 

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

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

    %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文件大小限制it

# ulimit -c
unlimitedtable

ulimit -cfilesizesed

ulimit -cunlimitedfile

相关文章
相关标签/搜索