Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] astmanproxy and core dump


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
asterisk at dotr.com
Guest





PostPosted: Tue Mar 04, 2008 8:53 am    Post subject: [asterisk-users] astmanproxy and core dump Reply with quote

Does any one know how to change astmanproxy to be able to

a) compile without optimisations
b) dump a core

I've had it crash several times over the past couple of months, but
there is no way to debug what's going on.

I like the way a core is produced when (if!) * crashes, and would like
to have the same thing on astmanproxy.

Thanks

Julian
Back to top
tzafrir.cohen at xorco...
Guest





PostPosted: Tue Mar 04, 2008 9:10 am    Post subject: [asterisk-users] astmanproxy and core dump Reply with quote

On Tue, Mar 04, 2008 at 01:53:07PM +0000, Julian Lyndon-Smith wrote:
Quote:
Does any one know how to change astmanproxy to be able to

a) compile without optimisations
b) dump a core

I've had it crash several times over the past couple of months, but
there is no way to debug what's going on.

I like the way a core is produced when (if!) * crashes, and would like
to have the same thing on astmanproxy.

astmanproxy's code is much simpler, and hence much more chances for it
not to crash.

However, here's an interesting feature for you:

custom location for core dumps:

echo '/tmp/core.%e.%t' >/proc/sys/kernel/core_pattern

But you can take this a step further (the following is completely
untested)

echo '| /usr/local/sbin/core_handler "%e"' >/proc/sys/kernel/core_pattern

cat <<EOF >/usr/local/sbin/core_handler
#!/bin/sh -e
# core_handler: handle dumped process cores.

# input: $1: process name, stdin: core file.

logger "Got a core file for "$1"

case "$1" in
astmanproxy) : ;;
*) exit 0;;
esac

core_file=`mktemp /tmp/core.$1.XXXXXX`
cat >$core_file

# add here lines to restart process

# add here lines to generate a trace and mail it to you
EOF

chmod +x /usr/local/sbin/core_handler
No change to the invocation of the daemon if it actually works well.

--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services