3 # Script to do a stackdump of a Bacula daemon/program.
5 # We attempt to attach to running program
7 # Arguments to this script are
8 # $1 = path to executable
9 # $2 = main pid of running program to be traced back.
12 if test `uname -s` = SunOS ; then
13 gcore -o @working_dir@/${PNAME} $2
14 dbx $1 $2 <@scriptdir@/btraceback.dbx 2>&1 \
15 | @sbindir@/bsmtp -h @smtp_host@ -s "Bacula DBX traceback of ${PNAME}" @dump_email@
17 gdb -quiet -batch -x @scriptdir@/btraceback.gdb $1 $2 2>&1 \
18 | @sbindir@/bsmtp -h @smtp_host@ -s "Bacula GDB traceback of ${PNAME}" @dump_email@