Scripted THREAD
DUMP in Weblogic 12.2.1 and Above.
export DOMAIN_NAME=<DOMAINNAME>
export PID=`ps -ef | grep -iE "[D]weblogic\.Name=${MSERVER}.*${DOMAIN_NAME}" | cut -c10-15`
export JAVA_HOME=<JAVAHOME (path path of jdk1.8 >
export TD_FILE=/tmp/threaddump_${MSERVER}_`date +%Y%m%dT%H%M%S%Z`.out
echo "Thread dump file generation (`date`)" > ${TD_FILE}
for i in {1..10}; do echo "`date +%s.%N` - Thread dump $i"; $JAVA_HOME/bin/jstack -l $PID >> ${TD_FILE} 2>&1; echo "`date +%s.%N` - Done dump $i"; sleep 10; done
zip -9mj ${TD_FILE}.zip ${TD_FILE} # this will move the file to inside zip