Wednesday, May 30, 2012

Linux and Core dumps

I thought I'd just drop a little snippet on this.  Read a bit about trying to get my Linux to dump cores and saw two tips on it that I thought I'd easily forget.

First is to define the core pattern at /proc/sys/kernel/core_pattern.  This defines how the core_pattern is being generated and what the core file will look like.  By default it dumps it on the current working directory of the application but the core_pattern should allow you to play around with that.

Second is to change ulimit.  ulimit -a will show you what the settings are for core file size.  Change it to impose a maximum file size by invoking ulimit -c .  You can also invoke ulimit -c unlimited.

No comments: