[asterisk-dev] Asterisk coredump

Shaun Ruffell sruffell at digium.com
Tue Apr 26 09:25:41 CDT 2011


On Tue, Apr 26, 2011 at 02:47:05PM +0200, Walter Doekes wrote:
>> Slightly off-topic, but is there a way to change the core dump path per
>> process?
>
> I --chdir to the path I want my dumps in. That has worked fine for me so  
> far.
>
> start-stop-daemon --start --oknodo --chdir /var/spool/asterisk --exec  
> /usr/local/sbin/asterisk -- $ASTARGS
>
>
> Changing it while running is probably up there with changing ulimit -n  
> while running. Non-existent as far as I know.

Another option (if running on a newer kernel) is to use some of the formatting
strings in /proc/sys/kernel/core_pattern

for example: 
$ sysctl -w kernel.core_pattern=/tmp/%e.%p

will result in core files places in tmp, with the executable name, and an
extension of the PID.

Other format specifiers are listed in Documentation/sysctl/kernel.txt [1]

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/sysctl/kernel.txt

-- 
Shaun Ruffell
Digium, Inc. | Linux Kernel Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list