docker下jstack文件分析

top

docker ps 

进入docker 

docker exec -it 2ba867d597b2 /bin/sh

top 

jps

把当前堆栈信息收集到当前文件夹的file.txt下

jstack -l pid >> file.txt

linux下创建文件夹   mkdir dumpFile

linux下创建或查看文件  touch tmp.txt

 

把docker里的文件拷贝到主机

模板:docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH

例子:docker cp 2ba867d597b2:/thread.txt /dumpFile/

然后就将thread.txt下载到本地的/dumpFile文件夹下

下载工具 IBM Thread and Monitor Dump Analyzer for Java (TMDA)

https://www.ibm.com/support/pages/ibm-thread-and-monitor-dump-analyzer-java-tmda下载jar包

按照步骤启动

====================================================================================

Steps

  1. Download jca*.jar: https://public.dhe.ibm.com/software/websphere/appserv/support/tools/jca/jca468.jar
  2. Open a terminal or command prompt and change directory to where you downloaded the JAR file.
  3. Ensure that Java is on your PATH to run the tool.
  4. Launch the tool: java -jar jca*.jar

====================================================================================

导入文件 点击

 

 

posted @ 2021-09-03 14:08  Jeessu  阅读(907)  评论(0编辑  收藏  举报