mirror of https://github.com/CrimsonTome/tldr.git
Merge pull request #774 from notpeter/java-tools
Java debug tools. Jstack, jmap and jhat.waldyrious/alt-syntax
commit
5cc4eb6415
|
@ -0,0 +1,11 @@
|
|||
# jhat
|
||||
|
||||
> Java Heap Analysis Tool.
|
||||
|
||||
- Analyze a heap dump (from jmap), view via http on port 7000:
|
||||
|
||||
`jhat {{dump_file.bin}}`
|
||||
|
||||
- Analyze a heap dump, specifying an alternate port for the http server:
|
||||
|
||||
`jhat -p {{port}} {{dump_file.bin}}`
|
|
@ -0,0 +1,19 @@
|
|||
# jmap
|
||||
|
||||
> Java Memory Map Tool.
|
||||
|
||||
- Print shared object mappings for a java process (output like pmap):
|
||||
|
||||
`jmap {{java_pid}}`
|
||||
|
||||
- Print heap summary information:
|
||||
|
||||
`jmap -heap {{filename.jar}} {{java_pid}}`
|
||||
|
||||
- Print histogram of heap usage by type:
|
||||
|
||||
`jmap -histo {{java_pid}}`
|
||||
|
||||
- Dump contents of the heap into a binary file for analysis with jhat:
|
||||
|
||||
`jmap -dump:format=b,file={{filename}} {{java_pid}}`
|
|
@ -0,0 +1,15 @@
|
|||
# jstack
|
||||
|
||||
> Java Stack Trace Tool.
|
||||
|
||||
- Print java stack traces for all threads in a java process:
|
||||
|
||||
`jstack {{java_pid}}`
|
||||
|
||||
- Print mixed mode (java/c++) stack traces for all threads in a java process:
|
||||
|
||||
`jstack -m {{java_pid}}`
|
||||
|
||||
- Print stack traces from java core dump:
|
||||
|
||||
`jstack {{/usr/bin/java}} {{file.core}}`
|
Loading…
Reference in New Issue