- mac查看jdk安装目录
/usr/libexec/java_home -- V
- 查看java进程
jps
- 查看java进程的jvm参数
jinfo pid
- thread dump
jstack pid > /pid.txt
- heap dump
jmap -histo:live pid
jmap -dump:live,format=b,file=heap.bin pid
- 查看heap dump内容
jhat heap.bin
- jvm信息统计
jstat -gcutil pid 1s 5
jstat -gccapacity pid 1s 5
- 查看字节码
javap -c User.class