如何以编程方式获得jmap直方图?

时间:2022-12-25 17:19:18

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 ?

我希望从被监视的应用程序中获得与jmap -histo编程相同的输出。我看到通过HotSpot诊断bean触发二进制堆转储是可能的,但是我看不到如何获得直方图数据。是可能的吗?

1 个解决方案

#1


2  

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

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

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

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

#1


2  

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

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

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

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