Linux环境jcmd抓取进程信息及内存dump

YmdHMS="$(date +%Y%m%d-%H%M%S)"
#set filename="trace-$(date +%Y%m%d-%H%M%S)"
#echo $YmdHMS

./bin/jcmd /jstack/runtime/caf-bootstrap.jar VM.uptime >> trace-$YmdHMS.log;

./bin/jcmd /jstack/runtime/caf-bootstrap.jar VM.flags >> trace-$YmdHMS.log;

./bin/jcmd /jstack/runtime/caf-bootstrap.jar Thread.print >> trace-$YmdHMS.log;

./bin/jcmd /jstack/runtime/caf-bootstrap.jar GC.class_histogram >> trace-$YmdHMS.log;

./bin/jcmd /jstack/runtime/caf-bootstrap.jar GC.heap_info >> trace-$YmdHMS.log;

#jcmd 10576 GC.heap_dump d:\dump.bin
./bin/jcmd /jstack/runtime/caf-bootstrap.jar GC.heap_dump jstack/runtime/java/x86_64-linux/dump-$YmdHMS.bin;

你可能感兴趣的:(Linux环境jcmd抓取进程信息及内存dump)