...
./jattach <pid> threaddump
若需要生成文件到指定路径,可输入./jattach <pid> threaddump >> /路径/文件名.txt
四、打印堆栈
./jattach <pid> dumpheap ./test.hprof
...
...
./jattach <pid> threaddump
若需要生成文件到指定路径,可输入./jattach <pid> threaddump >> /路径/文件名.txt
./jattach <pid> dumpheap ./test.hprof
...