[daemon] Enabling Native Memory Tracking while starting tomcat using jsvc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[daemon] Enabling Native Memory Tracking while starting tomcat using jsvc

కృష్ణ చైతన్య
Hi,

We are trying to enable Native Memory Tracking by setting the flags "-XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=detail -XX:+PrintNMTStatistics" during startup.  We use jsvc to fire up tomcat and it fails to turn on Native Memory Tracking.  In Catalina.out we see the following error during startup.

Java HotSpot(TM) 64-Bit Server VM warning: Native Memory Tracking did not setup properly, using wrong launcher?
Java HotSpot(TM) 64-Bit Server VM warning: PrintNMTStatistics is disabled, because native memory tracking is not enabled

The below link from the tomcat users mailer list, indicates that we can’t enable Native Memory Tracking while using jsvc.  Is there a way to have this turned on while using jsvc to start tomcat.

http://mail-archives.apache.org/mod_mbox/tomcat-users/201703.mbox/%3cCAP-JJ3o-nZO3RgKQzVHBf8zxBngwRcdmeM9WaWoxNkD5iSBoKw@...%3e <http://mail-archives.apache.org/mod_mbox/tomcat-users/201703.mbox/%3CCAP-JJ3o-nZO3RgKQzVHBf8zxBngwRcdmeM9WaWoxNkD5iSBoKw@...%3E>

Regards,
Krishna Chaitanya.
Reply | Threaded
Open this post in threaded view
|

Re: [daemon] Enabling Native Memory Tracking while starting tomcat using jsvc

Mark Thomas
On 30/07/2019 11:18, కృష్ణ చైతన్య wrote:
> Hi,
>
> We are trying to enable Native Memory Tracking by setting the flags "-XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=detail -XX:+PrintNMTStatistics" during startup.  We use jsvc to fire up tomcat and it fails to turn on Native Memory Tracking.  In Catalina.out we see the following error during startup.
>
> Java HotSpot(TM) 64-Bit Server VM warning: Native Memory Tracking did not setup properly, using wrong launcher?
> Java HotSpot(TM) 64-Bit Server VM warning: PrintNMTStatistics is disabled, because native memory tracking is not enabled
>
> The below link from the tomcat users mailer list, indicates that we can’t enable Native Memory Tracking while using jsvc.  Is there a way to have this turned on while using jsvc to start tomcat.

That would require code changes to the jsvc code to configure the
environment variable as described in:
https://blogs.oracle.com/poonam/using-nmt-with-custom-jvm-launcher

Mark

>
> http://mail-archives.apache.org/mod_mbox/tomcat-users/201703.mbox/%3cCAP-JJ3o-nZO3RgKQzVHBf8zxBngwRcdmeM9WaWoxNkD5iSBoKw@...%3e <http://mail-archives.apache.org/mod_mbox/tomcat-users/201703.mbox/%3CCAP-JJ3o-nZO3RgKQzVHBf8zxBngwRcdmeM9WaWoxNkD5iSBoKw@...%3E>
>
> Regards,
> Krishna Chaitanya.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]