Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show profiler tab in Java VisualVM? [duplicate]

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

like image 234
Stephan Avatar asked May 07 '13 14:05

Stephan


People also ask

How do I monitor remote JVM using VisualVM?

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.

What is Profiler in VisualVM?

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.

What is difference between JConsole and VisualVM?

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.

Where can I find VisualVM in JDK?

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.


2 Answers

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.

like image 199
Stefanos T. Avatar answered Oct 05 '22 23:10

Stefanos T.


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.

like image 45
Juned Ahsan Avatar answered Oct 06 '22 00:10

Juned Ahsan