From: Marco van Wieringen Date: Thu, 8 Apr 2010 16:50:51 +0000 (+0200) Subject: First attempt at using mdb on Solaris instead of dbx which isn't standard on most... X-Git-Tag: Release-7.0.0~1980 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4d6d40a274e09c300d5c695081f980a45e2a5745;p=bacula%2Fbacula First attempt at using mdb on Solaris instead of dbx which isn't standard on most current Solaris versions. --- diff --git a/bacula/scripts/btraceback.in b/bacula/scripts/btraceback.in index 1e7ae9e988..9b9a4882c7 100755 --- a/bacula/scripts/btraceback.in +++ b/bacula/scripts/btraceback.in @@ -14,7 +14,11 @@ PNAME="${PNAME} on `hostname`" WD="$3" if test `uname -s` = SunOS ; then gcore -o ${WD}/${PNAME} $2 - dbx $1 $2 <@scriptdir@/btraceback.dbx >${WD}/bacula.$2.traceback 2>&1 + if [ -x /usr/bin/mdb ]; then + mdb -u -p $2 <@scriptdir@/btraceback.mdb >${WD}/bacula.$2.traceback 2>&1 + else + dbx $1 $2 <@scriptdir@/btraceback.dbx >${WD}/bacula.$2.traceback 2>&1 + fi cat ${WD}/bacula.$2.traceback \ | @sbindir@/bsmtp -h @smtp_host@ -f @dump_email@ -s "Bacula DBX traceback of ${PNAME}" @dump_email@ else diff --git a/bacula/scripts/btraceback.mdb b/bacula/scripts/btraceback.mdb new file mode 100644 index 0000000000..1e3f9aa4ca --- /dev/null +++ b/bacula/scripts/btraceback.mdb @@ -0,0 +1,24 @@ +# btraceback.mdb + +$G +::echo "******** RUNNING LWPS/THREADS:" +::echo +::walk thread + +::echo +::echo +::echo "******** STACK TRACE OF CURRENT LWP:" +::echo +$C + +::echo +::echo +::echo "******** VARIABLES DUMP OF CURRENT LWP:" +::echo + +::echo "******** STACK TRACE OF LWPS:" +::walk thread | ::findstack + +::echo "******** VARIABLES DUMP OF LWPS:" + +::quit