7

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.
valiano
  • 16,433
  • 7
  • 64
  • 79
Vivek Dhiman
  • 1,967
  • 6
  • 46
  • 82

4 Answers4

2
  1. Use Mobaxterm tool to connect to Linux box.
  2. set display variable as: setenv DISPLAY :0.0
  3. go to /bin
  4. Launch as: ./jvisualvm

I hope this works

Manoj
  • 21
  • 3
1

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.

Mateusz Dymczyk
  • 14,969
  • 10
  • 59
  • 94
1

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

G.S
  • 10,413
  • 7
  • 36
  • 52
  • I did try but getting below exception: java.lang.InternalError: Can't connect to X11 window server using 'xxx.xxx.xx.xx:0.0' as the value of the DISPLAY variable. – Vivek Dhiman Oct 23 '13 at 07:28
  • Probably the firewall issue... I am not aware how to fix the firewall – G.S Oct 23 '13 at 07:40
0

Goto the JDK bin folder and run the jvisualvm binary by typing jvisualvm and pressing enter.

Thihara
  • 7,031
  • 2
  • 29
  • 56
  • yes I am using : [server-name bin]$/Prj/tools/java/bin/jvisualvm &enter. It stops for 3-4 sec then nothing happens. prompt comes to next line. – Vivek Dhiman Oct 23 '13 at 07:01