什麼是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