On 2016-09-09 11:34, Olivier wrote:
Adding an /etc/sysctl.d/foobar.conf file with the bellow content allowed
me to at last produce core dump files (in /var/tmp directory), even if
asterisk is run by asterisk user (and by root).
I choosed this /var/tmp directory to make sure core dumps are not erased
after a reboot and because this directory is "world-writable".
To trigger core dumping, previously recommended "pkill -SEGV asterisk"
was used.
/etc/sysctl.d/foobar.conf content is simply:
kernel.core_pattern=/var/tmp/core.%e.%t
Maybe taming systemd to consider /var/lib/asterisk as a current
directory when running asterisk daemon would be a better solution ?
Maybe Asterisk or more generally long running daemons, should warn when
they are run with "-g option" and from a current directory where it
can't write any file (or any file matching core pattern) ?
Maybe this is already done but I overlooked it or looked in the wrong
place ?
Why not just use the systemd journal and coredumpctl for core files
management? systemd solves that quite well.
Jacek
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
http://www.asterisk.org/community/astricon-user-conference
New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users