[asterisk-bugs] [Asterisk 0016213]: [patch] Script to automatically email backtrace to admin

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 21 15:53:50 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16213 
====================================================================== 
Reported By:                atis
Assigned To:                pabelanger
====================================================================== 
Project:                    Asterisk
Issue ID:                   16213
Category:                   Utilities/NewFeature
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
JIRA:                       SWP-1498 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-11-10 05:51 CST
Last Modified:              2010-05-21 15:53 CDT
====================================================================== 
Summary:                    [patch] Script to automatically email backtrace to
admin
Description: 
Attached asterisk_mail_backtrace.sh

It can be added in safe_asterisk with the following lines:

PID=`cat ${ASTPIDFILE}`
nice -n 10 /usr/share/asterisk/asterisk_mail_backtrace.sh $PID & 

So after asterisk crashes it's executed in background while new instance
of asterisk starts.

I'm still uncertain what's the best place to put this script and both GDB
scripts. 

====================================================================== 

---------------------------------------------------------------------- 
 (0122266) amilcar (reporter) - 2010-05-21 15:53
 https://issues.asterisk.org/view.php?id=16213#c122266 
---------------------------------------------------------------------- 
Why do you use "grep -A200"? Almost all my backtraces have more than 200
lines, and using a limit like that will cut valuable information of the
backtrace. Why not using awk to filter out symbol loading without cutting
the end of the file?

Instead of:
grep -A200 "Core was generated by" $BACKTRACE

Use:
awk '/Core was generated by/,0' $BACKTRACE

Other than this, great patch. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-21 15:53 amilcar        Note Added: 0122266                          
======================================================================




More information about the asterisk-bugs mailing list