Lokvin Wiki
Tag: sourceedit
Tag: sourceedit
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
jmap -dump:format=b,file=name.bin <process-id>
 
jmap -dump:format=b,file=name.bin <process-id>
   
* open dump file (*.bin, *.hprof) with jvisualvn or Eclipse MAT
+
* open dump file (*.bin, *.hprof) with jvisualvm or Eclipse MAT
   
 
* pgrep - find process by name.
 
* pgrep - find process by name.
 
# -f , match against full argument list, default against process name.
 
# -f , match against full argument list, default against process name.
 
pgrep -f java
 
pgrep -f java
  +
  +
* jstat 统计 GC
  +
jstat -gcutil -t 11 2000
  +
  +
== jstat 分析内存使用 ==
  +
  +
* https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html
  +
* http://www.cnblogs.com/mazj611/p/3481610.html
  +
* http://www.importnew.com/14933.html

Latest revision as of 02:48, 19 July 2017

jmap dump memory heap[]

  • jmap dump memory heap
 jmap -dump:format=b,file=name.bin  <process-id>
  • open dump file (*.bin, *.hprof) with jvisualvm or Eclipse MAT
  • pgrep - find process by name.
 # -f , match against full argument list, default against process name. 
pgrep -f java
  • jstat 统计 GC

jstat -gcutil -t 11 2000

jstat 分析内存使用[]