0

I want a gui tool to monitor each java process its memory, cpu usage and others.

so can anyone suggest me some tools?

3 Answers 3

2

You might find VisualVM fits your requirements, especially with some of the plugins (Visual GC in particular).

VisualVM can monitor CPU and memory use, and can also profile code running on the JVM. With Visual GC you also get detailed GC monitoring.

To download and start VisualVM, on distributions where it isn’t packaged:

wget https://github.com/visualvm/visualvm.src/releases/download/1.3.9/visualvm_139.zip
unzip visualvm_139.zip
cd visualvm_139
./bin/visualvm

On Debian and derivatives, where it is packaged:

apt install visualvm
visualvm

If you want to monitor a JVM running on a remote system, there is a better approach than trying to run a GUI on the remote system: you can start jstatd on the remote system, run VisualVM on your local system and connect to the remote system’s jstatd instance. See Working with remote applications in the VisualVM documentation for details. Be aware that jstatd isn’t secure, so you should be careful (read its documentation for some workarounds).

7
  • yes I have followed the steps and when I run visualvm it says "/visualvm_139/platform/lib/nbexec: WARNING: environment variable DISPLAY is not set" and shell terminates
    – wazza
    Jun 22, 2017 at 10:00
  • You need to actually be running in a GUI for this to work, or if you’re connecting using SSH, forward the display (ssh -Y or ssh -X). Jun 22, 2017 at 10:11
  • how to use this command I have tried with ssh -X xx.xx.xx.xx but it is not working
    – wazza
    Jun 22, 2017 at 10:28
  • You’ll have to bit a bit more specific — what exactly isn’t working? Jun 22, 2017 at 12:07
  • I have updated "/etc/ssh/ssh_config file" and I have set yes to ForwardX11 and then I tried to open this server using putty and I have enabled X11 forwarding and I set X display location as localhost:0.0. After that I launch visualvm it says "error can't open display"
    – wazza
    Jun 22, 2017 at 12:11
0

You can use JConsole for getting GUI interface of java process internals.

JConsole is part of Java JDK package/kit and it's located in JAVA_HOME/bin

2
  • Thanks is gui available for jconsole in linux environment
    – wazza
    Jun 22, 2017 at 7:32
  • @wazza, check my updated answer Jun 22, 2017 at 7:41
0

You can also use Java Mission Control: jmc commnad , one of the best feature is Flight Recoder which can profile your application nearly without an overhead.

1
  • Watch out for the license requirements on JMC and FR... Jun 22, 2017 at 12:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .