首页 > 代码库 > java jstack命令详解

java jstack命令详解

名称jstackstack trace

摘要:

      jstack [ option ] pid

       jstack [ option ] executable core

       jstack [ option ] [server-id@]remote-hostname-or-IP

功能:

    jstack 打印出指定的java进程、core文件或远程调试服务的调用栈信息。包括类全面,方法名称,byte code index和代码行号。指定-m参数还可以打印出本地方法调用栈.  可以快速定位程序问题.

参数说明:

pid   process  id  for  which  the stacktrace is to be printed.  The process must be a Java process. To get a list of Java processes running on a machine, jps may be used.

executable     Java executable from which the core dump was produced.

core     core file for which the stack trace is to be printed.

remote-hostname-or-IP  remote debug server‘s (see jsadebugd) hostname or IP address.

 server-id      optional unique id, if multiple debug servers are running on the same remote host.

OPTION 选项:

-m 打印java和本地混合调用栈.

-h -help打印帮助信息

 

示例:

 

 

 

 

java jstack命令详解