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
Great and informative post! Your explanation of the scripted thread dump process on WebLogic and photosweek above is very clear and helpful. It’s a lifesaver for troubleshooting performance issues. I appreciate the detailed steps and practical examples you shared. Definitely bookmarking this for future reference.
ReplyDelete