users@glassfish.java.net

Re: GlassFish REST Interface - monitoring/domain/server/jvm/memory

From: Jennifer Chou <jennifer.chou_at_oracle.com>
Date: Thu, 08 Sep 2011 09:58:57 -0400

Hi Markus,

I tried to follow the Heap Memory Usage Chart in jconsole as closely as
I could, while simultaneously using asadmin get -m
"server.jvm.memory.usedheapsize*". The times were not exactly the
same, but the used heap seem to follow each other, going up and down
from 30-40MB. What's shown in jconsole and asadmin will be data
collected at different times, so that could be why your values are
different?






3.0.1 does have a bug which affects the memory value. This was fixed in
3.1.
http://java.net/jira/browse/GLASSFISH-12490

GlassFish gets the memory data from java, so they should be getting the
same data.
ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed()

Thanks,
Jennifer

On 9/7/2011 6:34 AM, forums_at_java.net wrote:
> Hi,
>
> I'm seriously looking at the GlassFish REST monitoring interface at the
> moment.
> It seems as if the resources view does work and provide the right
> statistics.
>
> Looking at the monitoring/domain/server/jvm memory statistics it seems
> as if
> there is nothing understandable there.
>
> If I connect via JConsole I see roughly 356MB used Heap Memory. The
>
> asadmin get --monitor=true "*server*jvm*memory*usedheapsize*" --port
> 26058
> shows:
>
> server.jvm.memory.dotted-name = server.jvm.memory
> server.jvm.memory.usedheapsize-count-count = *225252320*
> server.jvm.memory.usedheapsize-count-description = Amount of used
> memory in
> bytes
> server.jvm.memory.usedheapsize-count-name = UsedHeapSize
> That should be ~214MB, right?
> According to the documentation (which is basically the same for 3.0
> and 3.1
> .. this should be the:
> http://download.oracle.com/docs/cd/E18930_01/html/821-2416/ghmct.html#ablvm
>
> S
> ize of the heap currently in use.
>
> What am I missing?
>
> I tried this with: GF OSS 3.0.1 and even the latest 3.1.1 build
> happens to
> show the same.
>
> Thanks,
>
> Markus
>
>
> --
>
> [Message sent by forum member 'myfear']
>
> View Post: http://forums.java.net/node/840593
>
>