Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
/bin/ksh
# @(#) 2002/03/27 Get shared libraries with executable and core for dbx analysis
###################################################################################
export LANG=C
Usage()
{
print -- "\
Usage : $CN executable_fullpath core \n\
\texecutable_fullpath : executable which generated core. Full path must be
specified. \n\
\tcore : core file \n\
\n\
Sample : $CN /usr/WebSphere/AppServer/java/jre/bin/java core\n\n\
This tool collects all of shared libraries for target core files.\n\
After this tool, each files with core and executable are archived into $TAR.Z\n\
"
}
Msg()
{
print ">> $@"
}
if [[ -s $MAP ]] then
I=0
for F in $(awk -F ":" '$1 ~ /Object name/ {print $2}' $MAP)
do
LIB[$I]=$((( I == 0 )) && echo .$EXE || echo .$F)
(( I += 1 ))
done
fi
TAR="$CWD/$TAR"
cd /
Msg "Archive library files into $TAR ..." ; tar -h -cvf $TAR $LIB
Msg "Done."
cd $CWD
#Msg "Adding $MAP and $CORE into $TAR ..."; tar -rvf $TAR $MAP $CORE
Msg "Adding $MAP into $TAR ..."; tar -rvf $TAR $MAP
Msg "Done."
Msg "Compressing $TAR" ; compress $TAR
Msg "Done."