Summary: Monitoring JVM memory and threads in .Net Applications, when troubleshooting application memory and thread consumption.

Overview

In some cases, you might want to monitor the activity of the JVM running as part of your .NET application. The jconsole is a great tool that allows you to troubleshoot the JVM internals.

To view and monitor the JVM loaded into the .NET process memory address using jconsole:

  1. Have the following settings as part of your app.config file:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <configSections>
        <section name="GigaSpaces" type="GigaSpaces.Core.Configuration.GigaSpacesCoreConfiguration, GigaSpaces.Core"/>
      </configSections>
      <GigaSpaces>
        <JvmSettings>    
          <JvmCustomOptions IgnoreUnrecognized="false">
            <add Option="-Dcom.sun.management.jmxremote.port=5144"/>
            <add Option="-Dcom.sun.management.jmxremote.ssl=false"/>
            <add Option="-Dcom.sun.management.jmxremote.authenticate=false"/>
          </JvmCustomOptions>
        </JvmSettings>
      </GigaSpaces>
    </configuration>
  2. Start jconsole – jconsole is located under the bin directory of the Java home, by default it is under <Installation dir>\Runtime\java\bin
  3. Once the jconsole is started, select the Local tab:



  4. This shows the status of the JVM running in your .NET application:

For more details on JMX and jconsole, refer to:

GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence