将Jcmd或Jstack打印的内容保存到文件

jcmd <pid | main class> <command ...|PerfCounter.print|-f file> >> LogFileName.txt

jstack [-options] <pid> >>LogFileName.txt

./jcmd 51746 GC.class_histogram >> /root/1.txt

Jstack -l PID >> threads.txt

猜你喜欢

转载自www.cnblogs.com/wang-xiaohui/p/12131671.html