jps
获取java进程的pid
jmap -dump:file=heap.dump.hprof <pid>
heap dump
jmap -dump:live,file=heap.dump.hprof <pid>
only the live objects in the heap are dumped
jstack <pid> > thrad.dump.tdump
thrad dump
jps
获取java进程的pid
jmap -dump:file=heap.dump.hprof <pid>
heap dump
jmap -dump:live,file=heap.dump.hprof <pid>
only the live objects in the heap are dumped
jstack <pid> > thrad.dump.tdump
thrad dump