开发者

How to monitor Glassfish memory usage?

Are there any way to monitor the memory usage of Glassfish (open source) server over time? (preferably in a开发者_运维知识库 graphical form)


Download a copy of visual VM here https://visualvm.dev.java.net/download.html

Then install the Glassfish plungin. Works like a champ and does exactly what you want.


A simple solution would be to connect to the servers jvm w/ Jconsole. There are some instructions here, I haven't used them but it should be straightforward.


You could use a tool called Munin to graphically monitor resources or follow the steps in https://blogs.oracle.com/meenap/entry/monitoring_memory_growth_in_glassfish .


Type jconsole in your windows start option.

When you come up with the jconsole.exe click on it.

Then in local processes select the process relevant to the running glassfish domain.

You can get the process id from the task manager.

When the jconsole panel opens you will see the following in the Memory tab:

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

Good link with its explanation is here : How is the java memory pool divided?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜