Difference between revisions of "Core dump"

From Useful Things
Jump to: navigation, search
(Created page with "= Enabling core dumps = The core file size is 0 by default, which results in no core being generated: <pre> sh# ulimit -a core file size (blocks, -c) 0 ... ... ... </...")
 
(No difference)

Latest revision as of 14:27, 17 October 2014

Enabling core dumps

The core file size is 0 by default, which results in no core being generated:

sh# ulimit -a
core file size          (blocks, -c) 0
...
...
...

Set it to unlimited:

sh# ulimit -c unlimited
sh# ulimit -a
core file size          (blocks, -c) unlimited
...
...
...

Ensure that the core is written to a writeable area of the system, such as /tmp, by modifying the value of /proc/sys/kernel/core_pattern:

echo "/tmp/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern

%e program name
%p pid
%h hostname
%t timestamp