users@glassfish.java.net

Re: How to get a memory snapshot

From: Peter Williams <Pete.Williams_at_Sun.COM>
Date: Mon, 10 Nov 2008 13:49:37 -0800

Ryan de Laplante wrote:
> I'm trying to use NetBeans to compare two heap dumps taken seconds
> apart to help me find a memory leak. The heapdumps are of GlassFish
> with my app running inside. I took them using VisualVM.
> VisualVM did not detect the GlassFish running as a windows service, so
> I had to connect to it using JMX.
Odd. Are you running GlassFish on JDK 5 or JDK 6? You'll get better
results if running on JDK 6 as VisualVM will use the profiler api's
available in that version. IIRC, what you describe is what will happen
if you are running on JDK 5.
> I think I lose a lot of VisualVM features when doing that.
I don't think this is necessarily true. But see above, re: JDK 5.

-Peter
>
> Anyway, NetBeans doesn't seem to let me compare two heap dumps, it
> wants Profiler Snapshots (.nps files). Any idea how I can do this
> with GlassFish running as a Windows service? Maybe I need to stop the
> server and start it from the command prompt so that Visual VM can
> attach to it.
>
>
> Thanks,
> Ryan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>