获取java应用程序内存快照

来源:互联网 发布:知乎 徐沪生 编辑:程序博客网 时间:2024/05/16 06:13

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:/Documents and Settings/chen56>jmap
Usage:
    jmap -histo <pid>
      (to connect to running process and print histogram of java object heap
    jmap -dump:<dump-options> <pid>
      (to connect to running process and dump java heap)

    dump-options:
      format=b     binary default
      file=<file>  dump heap to <file>

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

C:/Documents and Settings/chen56>jps
6888 FtpServer
7500 BoostMain
5876 BoostMain
6780 Jps
6264 BootMain

C:/Documents and Settings/chen56>jps
6888 FtpServer
5876 BoostMain
6264 BootMain
3124 Jps

C:/Documents and Settings/chen56>jmap -dump:format=b,file=e:/um2010121
61643.bin 5876
Dumping heap to E:/um201012161643.bin ...
Heap dump file created

C:/Documents and Settings/chen56>

原创粉丝点击