Damitha Dayananda
Damitha Dayananda

Reputation: 493

VisualVm : cpu graph pannel show "Not supported for this JVM"

I'm going to debug springBoot application using visualvm. In local environment I could monitor,

  1. heap
  2. class
  3. cpu
  4. thread

But when I trying to monitor application instance running in remote server All grapg pannels works except cpu graph. cpu graph pannel show "Not supported for this JVM".

I have started jstatd deamon in remote server using following command

jstatd -p 1099 -J-Djava.security.policy=<(echo 'grant codebase "file:${java.home}/../lib/tools.jar" {permission java.security.AllPermission;};')

Any help to enable cpu matrics is highly appreciate

Upvotes: 4

Views: 689

Answers (1)

Damitha Dayananda
Damitha Dayananda

Reputation: 493

As I mentioned in my answer I have run jstatd deamon to collection and expose metrics.I couldn't recover cpu graph with this approach. Finally I decided to take another approach with jmx,

  1. Run the application.jar with following command
java -Dcom.sun.management.jmxremote.port=15000  -Dcom.sun.management.jmxremote.authenticate=false  -Dcom.sun.management.jmxremote.ssl=false  -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.rmi.port=15001  -jar application.jar
  1. Add jmx connection to remote visualVm jmx configuring window

then I could get all the metrics

Upvotes: 3

Related Questions