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
- Download jca*.jar: https://public.dhe.ibm.com/software/websphere/appserv/support/tools/jca/jca468.jar
- Open a terminal or command prompt and change directory to where you downloaded the JAR file.
- Ensure that Java is on your PATH to run the tool.
- Launch the tool: java -jar jca*.jar
====================================================================================
导入文件 点击