一、windows环境下方法
1:cmd下找到运行服务器容器的PID
jps -v
例:
C:UsersAdministrator>jps -v
4856 Bootstrap -Djdk.tls.ephemeralDHKeySize=2048 -Djava.util.logging.config.file
=D:softapache-tomcat-7.0.69conflogging.properties -Djava.util.logging.manage
r=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=D:softapache-tomc
at-7.0.69endorsed -Dcatalina.base=D:softapache-tomcat-7.0.69 -Dcatalina.home=
D:softapache-tomcat-7.0.69 -Djava.io.tmpdir=D:softapache-tomcat-7.0.69 emp
2896 -Xmx768m -XX:MaxPermSize=320m -XX:ReservedCodeCacheSize=64m -Dosgi.nls.war
nings=ignore
4136 Jps -Denv.class.path=.;C:Program FilesJavajdk1.7.0_80libdt.jar;C:Prog
ram FilesJavajdk1.7.0_80lib ools.jar; -Dapplication.home=C:Program FilesJa
vajdk1.7.0_80 -Xms8m
2:输入信息到日志
jstack -l 4856 >stack.out
上述找到PID为4856.
3:运行IBM Thread and Monitor Dump Analyzer for Java分析