You can add your SAP JVM to the VM Explorer view of the SAP JVM Profiler.
-
Download and Install the Cloud Foundry Command Line Interface
-
Log On to the Cloud Foundry Environment Using the Cloud Foundry Command Line Interface
From the VM Explorer, you can debug, monitor or profile your SAP JVM. For more information about the VM Explorer, see the SAP JVM Profiler documentation in the Eclipse Help.
You need to use the jvmmond tool, which is included in the SAP Java Buildpack.
-
From the cf CLI, execute:
cf ssh app name -c "app/META-INF/.sap_java_buildpack/sapjvm/bin/jvmmond -port 50003 -J-Dcom.sap.jvm.tools.portRange=50004-50005 -J-Djava.rmi.server.hostname=127.0.0.1"
This starts the
jvmmond
service on your Cloud Foundry container. It is listening to port 50003. This command also specifies a port range of 50004-50005 in case additional ports need to be opened. -
To enable an SSH tunnel for these ports, execute:
cf ssh <app name> -N -T -L 50003:127.0.0.1:50003 -L 50004:127.0.0.1:50004 -L 50005:127.0.0.1:50005
-
In your Eclipse IDE, open the Profiling perspective, and from the VM Explorer view choose Manage Hosts.
-
Choose Add and enter the following host name and port number: localhost:50003
Your application is added to the VM Explorer.