首页 > 编程 > Java > 正文

论持久战之Java性能监控工具(jmap)

2019-11-06 07:48:25
字体:
来源:转载
供稿:网友

首先看一下java官方提供的参数示例:

Paste_Image.png

下面介绍三个常用参数(heap、dump、histo)

-heap(to PRint java heap summary)

①堆配置信息

Paste_Image.png

②堆使用信息

Paste_Image.png

-dump:(to dump java heap in hprof binary format)

dump-options: live dump only live objects; if not specified, all objects in the heap are dumped. format=b binary format file=<file> dump heap to <file>

中文意思:把进程内存使用情况dump到文件中(使用jhat工具分析查看) jmap -dump:format=b,file=文件名

-histo[:live](to print histogram of java object heap; if the “live”suboption is specified, only count live objects)

中文意思:查看堆内存中的对象数目、大小统计直方图,如果带上live则只统计活对象 jmap -histo:live

Paste_Image.png


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表