<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:10pt"><div>hi,<br><br>the -g option is right.
<br> make sure that the system allows core files (ulimit -a).
<br><br>Regards<br><br>--<br>Marcus<br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 10pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">De:</span></b> Gustavo A Gonzalez <ggonzalez@despegar.com><br><b><span style="font-weight: bold;">Para:</span></b> asterisk-users@lists.digium.com<br><b><span style="font-weight: bold;">Enviadas:</span></b> Quinta-feira, 30 de Julho de 2009 11:17:50<br><b><span style="font-weight: bold;">Assunto:</span></b> Re: [asterisk-users] Asterisk core dumps files<br></font><br>
<style>
<!--
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;color:windowtext;}
_filtered {margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">Thanks Tzafrir for your answer. Because I had some problems
running safe_asterisk script to restart asterisk automatically in our
callcenter , I’ve developed a simple script that runs from a schedule
task and check if asterisk is running each minute. This is not the best
solution yet but it works properly when asterisk shutdown. However it not let
asterisk generate core dumps files. Is there an error in this script or what I
have to change to get core dumps files from this script. </span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR">#!/bin/sh</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR">#</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR">#Script para levantar el asterisk automaticamente</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR">#programado por WL</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR"> </span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">echo “Checking if asterisk is running”</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR">a=`pidof asterisk`</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR"> </span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">if [ "$a" != "" ]; then</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> echo "Everything is OK, Asterisk is UP and
running";</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR">else</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> echo "Asterisk Error: NOT RUNNING trying to
restart it in 5 </span></font><span class="q">attempt</span>s<font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">!!!";</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> for ((i=1; i<=5; i+=1)); do</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> /usr/sbin/asterisk -g</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal" style="margin-left: 0.5in;"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> b=`pidof asterisk`</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> if [ "$b" != "" ]; then</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> exit</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> fi</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;"> done</span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="ES-AR">fi</span></font></p>
<p class="MsoNormal"><b><font color="navy" size="3" face="Times New Roman"><span style="font-size: 12pt; color: navy; font-weight: bold;" lang="ES-AR"> </span></font></b></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;">G.A.G.</span></font><span lang="ES-AR"></span></p>
</div>
</div></div></div><br>
<hr size=1>Veja quais são os assuntos do momento no Yahoo! + Buscados: <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/">Top 10</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/celebridades/">Celebridades</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/m%C3%BAsica/">Música</a> - <a href="http://br.rd.yahoo.com/mail/taglines/mail/*http://br.maisbuscados.yahoo.com/esportes/">Esportes</a></body></html>