I have launched a java application with the following arguments :
java
-server
-Dcom.sun.management.jmxremote.port=6789
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dvisualvm.display.name=MyApp
-cp <classpath>
... application arguments ...
I can see my application in jvisualvm but the Profiler tab doesn't show up.
What arguments should I add to my application command line ?
JDK 1.6.0_24-b07
There are two ways to connect a remote JVM application to VisualVM: Either using jstatd or Java Management Extensions (JMX). The jstatd program is an RMI server that bundled with the JDK and monitors JVM and provides an interface to allow remote monitoring tools to attach to JVM running on the localhost.
The Profiler tab of an application enables you to start and stop the profiling session of a local application. Profiling results are displayed in the Profiler tab. You can use the toolbar to refresh the profiling results, invoke garbage collection and save the profiling data.
JConsole uses only JMX, but VisualVM uses other monitoring technologies like Jvmstat, Attach API and SA in addition to JMX. It can merge data from all those monitoring technologies in one place and the user does not need to think which technology he should use in particular situation.
How to Get and Run VisualVM. The good news here, you actually don't need to do anything, it is already available in the JDK bin directory. It's available after JDK 1.6 update 7. Once you are in the bin directory of JDK, you will find jVisualVM.exe; just click on it, and the application starts up.
This did not help me, I got the desired Profiler tab to appear after running my application under jdk6. The versions must agree, also check if one is 32-bit and the other 64-bit.
I faced the same problem once and in my scenario the user running my java program and the user used for the jvisualvm were different. Check if you are also running into the same issue.Here is the snippet from JVisualVM documentation.
The target application is running on the same host as Java VisualVM but was started by a different user than the one who started Java VisualVM. Java VisualVM discovers running applications using the jps tool, which can only discover Java applications started by the same user as the one who starts the Java VisualVM tool.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With