jstack.1 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. '\" t
  2. .\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  3. .\" Arch: generic
  4. .\" Software: JDK 8
  5. .\" Date: 21 November 2013
  6. .\" SectDesc: Troubleshooting Tools
  7. .\" Title: jstack.1
  8. .\"
  9. .if n .pl 99999
  10. .TH jstack 1 "21 November 2013" "JDK 8" "Troubleshooting Tools"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH NAME
  31. jstack \- Prints Java thread stack traces for a Java process, core file, or remote debug server\&. This command is experimental and unsupported\&.
  32. .SH SYNOPSIS
  33. .sp
  34. .nf
  35. \fBjstack\fR [ \fIoptions\fR ] \fIpid\fR
  36. .fi
  37. .nf
  38. \fBjstack\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR
  39. .fi
  40. .nf
  41. \fBjstack\fR [ \fIoptions\fR ] [ \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR
  42. .fi
  43. .sp
  44. .TP
  45. \fIoptions\fR
  46. The command-line options\&. See Options\&.
  47. .TP
  48. \fIpid\fR
  49. The process ID for which the stack trace is printed\&. The process must be a Java process\&. To get a list of Java processes running on a machine, use the jps(1) command\&.
  50. .TP
  51. \fIexecutable\fR
  52. The Java executable from which the core dump was produced\&.
  53. .TP
  54. \fIcore\fR
  55. The core file for which the stack trace is to be printed\&.
  56. .TP
  57. \fIremote-hostname-or-IP\fR
  58. The remote debug server \f3hostname\fR or \f3IP\fR address\&. See jsadebugd(1)\&.
  59. .TP
  60. \fIserver-id\fR
  61. An optional unique ID to use when multiple debug servers are running on the same remote host\&.
  62. .SH DESCRIPTION
  63. The \f3jstack\fR command prints Java stack traces of Java threads for a specified Java process, core file, or remote debug server\&. For each Java frame, the full class name, method name, byte code index (BCI), and line number, when available, are printed\&. With the \f3-m\fR option, the \f3jstack\fR command prints both Java and native frames of all threads with the program counter (PC)\&. For each native frame, the closest native symbol to PC, when available, is printed\&. C++ mangled names are not demangled\&. To demangle C++ names, the output of this command can be piped to \f3c++filt\fR\&. When the specified process is running on a 64-bit Java Virtual Machine, you might need to specify the \f3-J-d64\fR option, for example: \f3jstack -J-d64 -m pid\fR\&.
  64. .PP
  65. \fINote:\fR This utility is unsupported and might not be available in future release of the JDK\&. In Windows Systems where the dbgeng\&.dll file is not present, Debugging Tools For Windows must be installed so these tools work\&. The \f3PATH\fR environment variable needs to contain the location of the jvm\&.dll that is used by the target process, or the location from which the crash dump file was produced\&. For example:
  66. .sp
  67. .nf
  68. \f3set PATH=<jdk>\ejre\ebin\eclient;%PATH%\fP
  69. .fi
  70. .nf
  71. \f3\fP
  72. .fi
  73. .sp
  74. .SH OPTIONS
  75. .TP
  76. -F
  77. .br
  78. Force a stack dump when \f3jstack\fR [\f3-l\fR] \f3pid\fR does not respond\&.
  79. .TP
  80. -l
  81. .br
  82. Long listing\&. Prints additional information about locks such as a list of owned \f3java\&.util\&.concurrent\fR ownable synchronizers\&. See the \f3AbstractOwnableSynchronizer\fR class description at http://docs\&.oracle\&.com/javase/8/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer\&.html
  83. .TP
  84. -m
  85. .br
  86. Prints a mixed mode stack trace that has both Java and native C/C++ frames\&.
  87. .TP
  88. -h
  89. .br
  90. Prints a help message\&.
  91. .TP
  92. -help
  93. .br
  94. Prints a help message\&.
  95. .SH KNOWN\ BUGS
  96. In mixed mode stack trace, the \f3-m\fR option does not work with the remote debug server\&.
  97. .SH SEE\ ALSO
  98. .TP 0.2i
  99. \(bu
  100. pstack(1)
  101. .TP 0.2i
  102. \(bu
  103. C++filt(1)
  104. .TP 0.2i
  105. \(bu
  106. jps(1)
  107. .TP 0.2i
  108. \(bu
  109. jsadebugd(1)
  110. .RE
  111. .br
  112. 'pl 8.5i
  113. 'bp