jdk, the not so hidden treasures
TRANSCRIPT
JDK not so hidden treasuresAndrzej Grzesik
@javazone @ags313please tweet!
questions?just ask!
java
$JAVA_HOME/bin
tl;dr: log gc please
log gc :-)
when things go…
does it run?
top // htop
every known problem becomes completely new
when you add “in Java”
stolen from: @mryapee
jpsinstead of ps
jpsinstead of ps
jps -lvmJava ProcesseS LoVe Memory
jar
jar -tf
jinfo
demo
javac
javacjust the compiler
javap
jmapinstead of pmap
and jhat
demo
stacktraces :)
kill -3 <pid>
demo
caveat ;-)
caveat ;-)prints to STDOUT of the running process
jstack
caveatsonly at safepoints, one thread at a time
demo
jstat
jstat <metric> <options> PID <interval> <count>
demo
custom optionshttp://hg.openjdk.java.net/jdk9/jdk9/jdk/file/d49e247dade6/src/jdk.jcmd/share/
classes/sun/tools/jstat/resources/jstat_options
jstatd
jstatdexposes your processes
jcmd
jvisualvm
jmxsh
jmxtermhttp://wiki.cyclopsgroup.org/jmxterm
http://code.google.com/p/jmxsh/
and more
questions?just shoot!
Thank you!