HEX
Server: Apache/2.4.25
System: Linux webserver1.dinartechshare-e.com 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User: smkmuhsayung (1029)
PHP: 8.0.3
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/sbin/btraceback
#!/bin/sh
#
#   Bacula(R) - The Network Backup Solution
#
#   Copyright (C) 2000-2016 Kern Sibbald
#   Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
#
#   The original author of Bacula is Kern Sibbald, with contributions
#   from many others, a complete list can be found in the file AUTHORS.
#
#   You may use this file and others of this release according to the
#   license defined in the LICENSE file, which includes the Affero General
#   Public License, v3.0 ("AGPLv3") and some additional permissions and
#   terms pursuant to its AGPLv3 Section 7.
#
#   This notice must be preserved when any source code is 
#   conveyed and/or propagated.
#
#   Bacula(R) is a registered trademark of Kern Sibbald.
#
# Script to do a stackdump of a Bacula daemon/program.
#
# We attempt to attach to running program
#
# Arguments to this script are
#  $1 = path to executable
#  $2 = main pid of running program to be traced back.
#  $3 = working directory
#
PNAME=`basename $1`
WD="$3"
case `uname -s` in
SunOS)
   #
   # See what debuggers are available on this platform.
   # We need to to some tricks to find out as a which on
   # a non existing binary gives:
   #
   # no <debugger> in <PATH>
   #
   # So we use the return code which is 0 when it finds
   # somethings and 1 if not.
   #
   which gdb > /dev/null 2>&1 && GDB=`which gdb` || GDB=''
   which dbx > /dev/null 2>&1 && DBX=`which dbx` || DBX=''
   which mdb > /dev/null 2>&1 && MDB=`which mdb` || MDB=''
   gcore -o ${WD}/${PNAME} $2
   if [ ! -z "${DBX}" ]; then
      ${DBX} $1 $2 < /etc/bacula/scripts/btraceback.dbx > ${WD}/bacula.$2.traceback 2>&1
   elif [ ! -z "${GDB}" ]; then
      ${GDB} -quiet -batch -x /etc/bacula/scripts/btraceback.gdb $1 $2 > ${WD}/bacula.$2.traceback 2>&1
   elif [ ! -z "${MDB}" ]; then
      ${MDB} -u -p $2 < /etc/bacula/scripts/btraceback.mdb > ${WD}/bacula.$2.traceback 2>&1
   fi
   PNAME="${PNAME} on `hostname`"
   cat ${WD}/bacula.$2.traceback \
    | /usr/sbin/bsmtp -h localhost -f root -s "Bacula DBX traceback of ${PNAME}" root
   ;;
*)
   gdb -quiet -batch -x /etc/bacula/scripts/btraceback.gdb $1 $2 >${WD}/bacula.$2.traceback 2>&1
   PNAME="${PNAME} on `hostname`"
   cat ${WD}/bacula.$2.traceback \
    | /usr/sbin/bsmtp -h localhost -f root -s "Bacula GDB traceback of ${PNAME}" root
   ;;
esac