mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-21 00:38:17 +03:00
Java debug tools. Jstack, jmap and jhat.
This commit is contained in:
parent
8991253b8d
commit
67e2c723af
11
pages/common/jhat.md
Normal file
11
pages/common/jhat.md
Normal file
@ -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}}`
|
19
pages/common/jmap.md
Normal file
19
pages/common/jmap.md
Normal file
@ -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:
|
||||
|
||||
`java -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}}`
|
15
pages/common/jstack.md
Normal file
15
pages/common/jstack.md
Normal file
@ -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 {{java_pid}}`
|
||||
|
||||
- Print stack traces from java core dump:
|
||||
|
||||
`jstack {{/usr/bin/java}} {{file.core}}`
|
Loading…
Reference in New Issue
Block a user