Skip to content

Instantly share code, notes, and snippets.

@gbraccialli
Last active March 16, 2016 20:21
Show Gist options
  • Save gbraccialli/1343af45848412bc72f7 to your computer and use it in GitHub Desktop.
Save gbraccialli/1343af45848412bc72f7 to your computer and use it in GitHub Desktop.
http://docs.oracle.com/javase/7/docs/technotes/tools/index.html#monitor
[terminal]
jps
[xterminal]
jconsole
[terminal]
jmap -dump:format=b,file=/tmp/dump.hprof 2133
[osx client]
jvisualvm + open dump file
[webserver]
jhat /tmp/dump.hprof
[terminal]
cat /tmp/policy.txt
grant codebase "file:///usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64/lib/tools.jar" {
permission java.security.AllPermission;
};
jstatd -J-Djava.security.policy=/tmp/policy.txt
[osx client]
jvisualvm + connect
[terminal]
jmap -heap 90244
jmap -permstat 90244
jmap -F -histo 90244
jinfo 90244
jinfo -J-d64 -sysprops 90244
jstat -gc 90244 1000 1000
jstat -gccapacity 90244 1000 1000
jstat -gcutil 90244 1000 1000
jstack -F 90244
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment