0

我正在考虑从 JVM 中捕获一些指标,例如最大/最小/已用内存、cpu 消耗以及以后可能更多。

我做了一些研究,但找不到任何合适的东西。

有人可以指导我正确阅读,从哪里开始?

请注意,我不是在寻找市场上的任何类型的软件,而是关于阅读材料如何通过 JMX 以编程方式获取指标,因此,我可以将这些存储在数据库或文件中。

4

2 回答 2

2

IBM 有一篇非常好的文章:http ://www.ibm.com/developerworks/library/j-rtm1/index.html?ca=dgr-jw22javaruntime1&S_TACT=105AGX59&S_CMP=GR

它分为三个部分,包含详细信息和解释。

Part 1:

Explores attributes of application performance management (APM) systems
Describes common antipatterns for system monitoring
Presents methods for monitoring the performance of JVMs
Offers techniques for efficiently instrumenting application source code

Part 2 will focus on methods of instrumenting Java classes and resources without modification of the originating source code. 
Part 3 will address methods for monitoring resources outside the JVM, including hosts and their operating systems and remote services such as databases and messaging systems. It will conclude with a discussion of additional APM issues such as data management, data visualization, reporting, and alerting.
于 2012-11-14T13:56:39.297 回答
1

查看可用的JMX 统计信息以及如何使用JConsole监控它们。默认情况下可以使用很多统计信息(垃圾收集信息、内存池、线程统计信息)。CPU 有点棘手,但请查看这个 SO question了解更多详细信息。

请注意,您不必只使用 JConsole。您可以轻松编写自己的监视器来整理这些统计信息。

于 2012-11-14T13:49:04.267 回答