如何以编程方式获取jmap直方图? [英] How to get jmap histogram programmatically?

查看:156
本文介绍了如何以编程方式获取jmap直方图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从受监控的应用程序内部以编程方式获得 jmap -histo 的输出。我看到通过HotSpot诊断bean可以触发二进制堆转储,但我看不到如何获取直方图数据。有可能吗?

I would like to get the equivalent of the ouput of jmap -histo programmatically, from inside the monitored application. I see triggering a binary heap dump is possible through the HotSpot diagnostic bean, but I can't see how to get the histogram data. Is it possible ?

推荐答案

这可能不是最好的示例/代码,但看看

It may be not the best example/code, but have a look at this

(我认为它只适用于Hotspot JVM)

(I think it's only working on Hotspot JVMs)

这篇关于如何以编程方式获取jmap直方图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆