Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jvisualvm in Unix

We started to check the performance of my application as its getting slow after some time. I am using jvisualvm to observe the cause. Can anyone tell how can i use jvisualvm in Unix as in Windows we can check it through UI. Can we have the same view in Unix also.

Lets my path to jvisualvm is /Prj/tools/java/bin/jvisualvm

When i use help,

Usage: /Prj/tools/java/bin/../lib/visualvm//platform7/lib/nbexec {options} arguments  

General options:  
  --help                show this help  
  --jdkhome <path>      path to Java(TM) 2 SDK, Standard Edition  
  -J<jvm_option>        pass <jvm_option> to JVM  

  --cp:p <classpath>    prepend <classpath> to classpath  
  --cp:a <classpath>    append <classpath> to classpath  
Core options:  
  --laf <LaF classname> use given LookAndFeel class instead of the default  
  --fontsize <size>     set the base font size of the user interface, in points  
  --locale <language[:country[:variant]]> use specified locale  
  --userdir <path>      use specified directory to store user settings  

Module reload options:  
  --reload /path/to/module.jar  Installs or reinstalls a module JAR file.
like image 704
Vivek Dhiman Avatar asked Oct 23 '13 06:10

Vivek Dhiman


People also ask

What is the use of Jvisualvm?

VisualVM is a powerful tool that provides a visual interface to see deep and detailed information about local and remote Java applications while they are running on a Java Virtual Machine (JVM).

How do I run Jvisualvm?

On a Windows system, start VisualVM by double-clicking jvisualvm.exe. You can also select VisualVM from the Start menu (if Windchill shortcuts are installed). On other systems, start VisualVM by invoking the jvisualvm script.

What is difference between JConsole and VisualVM?

VisualVM takes application monitoring one level deeper than JConsole by allowing the user to analyze thread execution as well as the ability to profile CPU and memory usage of JVM requests, both of which are triggered manually by the user.


2 Answers

Just type in your terminal:

/Prj/tools/java/bin/jvisualvm

And hit enter. If you want to pass some arguments or options (like JDK home) put it after "jvisualvm" in the command above using the format provided by help.

like image 96
Mateusz Dymczyk Avatar answered Oct 21 '22 09:10

Mateusz Dymczyk


You can setup the remote connectivity to the unix box from the jvisualvm.

Else, you can set the DISPLAY parameter of the unix to your desktop IP [like DISPLAY=<your IP>:0.0;export DISPLAY] Note: Use the unix command according to your SHELL

like image 32
G.S Avatar answered Oct 21 '22 07:10

G.S