# mkdir -p /tmp/cores
# chmod a+rwx /tmp/cores
# echo "/tmp/cores/%e.%p.%h.%t.core" > /proc/sys/kernel/core_pattern

------------------------
%p: pid
%: '%' is dropped
%%: output one '%'
%u: uid
%g: gid
%s: signal number
%t: UNIX time of dump
%h: hostname
%e: executable filename
------------------------

# ulimit -c unlimited
# kill -s SIGSEGV $$

Reference: https://sigquit.wordpress.com/2009/03/13/the-core-pattern/

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()