0

I am trying to profile my web application on my local windows 7 PC visualVM.

I created a jstatd.all.policy file with below code under java's bin directory on my CENTOS 6.8 x86_64 server

grant codebase "file:${java.home}/../lib/tools.jar" {
   permission java.security.AllPermission;
};

and tried starting jstatd` with below command

jstatd -J-Djava.security.policy=jstatd.all.policy -p 1099

but when I try profiling on my local PC, I didn't see any process under jvisualvm remote host but just node

i also tried for a test purpose by starting jstatd with same approach on my window server R2 2008 PC and tried to profile with Windows 7 visualVM but still no result just a node with no process but i tried on same windows server pc by adding the remote host for same pc than it shows running processes.

Any suggestions.

buzz3791
  • 1,683
  • 2
  • 20
  • 38
Rawat
  • 461
  • 3
  • 6
  • 23

1 Answers1

0

Start jstatd by this command:

jstatd -J-Djava.security.policy=jstatd.all.policy -J-Djava.rmi.server.hostname={Your Ip address}
Nicomedes E.
  • 1,326
  • 5
  • 18
  • 27
  • An additional note is to make sure you start _VisualVM_ as a regular user i.e. do **NOT** use `psexec -s`. The feature in VisualVM is also called _Add jstatd Connection_ in the right-click menu on _Local_. – buzz3791 Jan 25 '18 at 22:43