将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

 

posted on 2020-01-02 09:59  王.小辉  阅读(2249)  评论(0编辑  收藏  举报

导航