如何监控Glassfish内存使用情况?

时间:2010-12-13 01:19:13

标签: glassfish

有没有办法监控Glassfish(开源)服务器的内存使用情况? (最好以图形形式)

4 个答案:

答案 0 :(得分:4)

https://visualvm.dev.java.net/download.html

下载可视化VM的副本

然后安装Glassfish plungin。像冠军一样工作,完全符合你的要求。

答案 1 :(得分:1)

一个简单的解决方案是连接到jvm w / Jconsole的服务器。有一些说明here,我没有使用它们,但它应该是直截了当的。

答案 2 :(得分:1)

您可以使用名为Munin的工具以图形方式监控资源或按照https://blogs.oracle.com/meenap/entry/monitoring_memory_growth_in_glassfish中的步骤进行操作。

答案 3 :(得分:1)

在Windows启动选项中键入jconsole。

当你想出jconsole.exe时,点击它。

然后在本地进程中选择与正在运行的glassfish域相关的进程。

您可以从任务管理器获取进程ID。

当jconsole面板打开时,您将在Memory选项卡中看到以下内容:

1.  Heap Memory Usage
Java takes memory from the OS. Part of this memory is called Java Heap Memory. Whenever an object is newly created it  is allocated memory from the Java Heap space and when it is garbage collected the memory occupied by this object is returned back to the OS.

2.Non Heap Memory Usage
3.Memory Pool Eden Space
4.Memory Pool Survivor Space
5.Memory Pool Tenured Gen
6.Memory Pool Code Cache
7.Memory Pool Code Gen

与其解释的良好联系在这里: How is the java memory pool divided?