jmap功能!

来源:互联网 发布:淘宝6s特价1380能买吗 编辑:程序博客网 时间:2024/05/29 19:35

  6. jmap把虚拟机里运行着的所有文件都down下来,相当于快照

  C:\Users\WILL>jmap

  Usage:

  jmap -histo

  (to connect to running process and print histogram of java object heap

  jmap -dump:

  (to connect to running process and dump java heap)

  dump-options:

  format=b binary default

  file= dump heap to

  Example: jmap -dump:format=b,file=heap.bin

  7. jhat 对jmap下来的文件进行分析,多个角度

  Usage: jhat [-stack ] [-refs ] [-port ] [-baseline ] [-

  debug ] [-version] [-h|-help]

  -J Pass directly to the runtime system. For

  example, -J-mx512m to use a maximum heap size of 512MB

  -stack false: Turn off tracking object allocation call stack.

  -refs false: Turn off tracking of references to objects

  -port : Set the port for the HTTP server. Defaults to 7000

  -exclude : Specify a file that lists data members that should

  be excluded from the reachableFrom query.

  -baseline : Specify a baseline object dump. Objects in

  both heap dumps with the same ID and same class will

  be marked as not being "new".

  -debug : Set debug level.

  0: No debug output

  1: Debug hprof file parsing

  2: Debug hprof file parsing, no server

  -version Report version number

  -h|-help Print this help and exit

   The file to read

  For a dump file that contains multiple heap dumps,

  you may specify which dump in the file

  by appending "#" to the file name, i.e. "foo.hprof#3".

  All boolean options default to "true"

  图片又不能上传…就打印出这些帮助参数来,能看懂得了。

0 0
原创粉丝点击