<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-09-09 13:24 GMT+02:00 Jacek Konieczny <span dir="ltr"><<a target="_blank" href="mailto:jajcus@jajcus.net">jajcus@jajcus.net</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-">On 2016-09-09 11:34, Olivier wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
Adding an /etc/sysctl.d/foobar.conf file with the bellow content allowed<br>
me to at last produce core dump files (in /var/tmp directory), even if<br>
asterisk is run by asterisk user (and by root).<br>
I choosed this /var/tmp directory to make sure core dumps are not erased<br>
after a reboot and because this directory is "world-writable".<br>
To trigger core dumping, previously recommended "pkill -SEGV asterisk"<br>
was used.<br>
<br>
/etc/sysctl.d/foobar.conf content is simply:<br>
kernel.core_pattern=/var/tmp/c<wbr>ore.%e.%t<br>
<br>
Maybe taming systemd to consider /var/lib/asterisk as a current<br>
directory when running asterisk daemon would be a better solution ?<br>
<br>
Maybe Asterisk or more generally long running daemons, should warn when<br>
they are run with "-g option" and from a current directory where it<br>
can't write any file (or any file matching core pattern) ?<br>
Maybe this is already done but I overlooked it or looked in the wrong<br>
place ?<br>
</blockquote>
<br>
<br></span>
Why not just use the systemd journal and coredumpctl for core files management?  systemd solves that quite well.<span class="gmail-HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>Do you have any pointer showing how systemd journal or coredumpctl can help ?<br></div><div>How can any of those help to specify the where core files are dumped ?<br><br></div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-HOEnZb"><font color="#888888">
<br>
Jacek</font></span><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
-- <br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a target="_blank" rel="noreferrer" href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>
<br>
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016<br>
     <a target="_blank" rel="noreferrer" href="http://www.asterisk.org/community/astricon-user-conference">http://www.asterisk.org/commu<wbr>nity/astricon-user-conference</a><br>
<br>
New to Asterisk? Start here:<br>
     <a target="_blank" rel="noreferrer" href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started">https://wiki.asterisk.org/wik<wbr>i/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
  <a target="_blank" rel="noreferrer" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailma<wbr>n/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div></div>