Skip to content

Instantly share code, notes, and snippets.

@uarun
Last active April 26, 2016 04:39
Show Gist options
  • Save uarun/e4577c2c1137ec7dbc05 to your computer and use it in GitHub Desktop.
Save uarun/e4577c2c1137ec7dbc05 to your computer and use it in GitHub Desktop.

Revisions

  1. uarun revised this gist Apr 15, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions visualvm.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    ## Start RMI registry

    $ $JAVA_HOME/bin/rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar
    $ rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar

    ## Create Policy file for jstatd

    @@ -13,10 +13,10 @@

    ## Start jstatd

    $ $JAVA_HOME/bin/jstatd -J-Djava.security.policy=/home/arun/jstatd.all.policy
    $ jstatd -J-Djava.security.policy=/home/arun/jstatd.all.policy &

    ## Launch VisualVM on the remote host

    $ $JAVA_HOME/bin/jvisualvm
    $ jvisualvm

    After VisualVM is launched, select `"Remote" > "Add Remote Host.."` and enter the hostname where `jstatd` is running.
  2. uarun revised this gist Apr 15, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions visualvm.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    ## Start RMI registry

    $ rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar
    $ $JAVA_HOME/bin/rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar

    ## Create Policy file for jstatd

    @@ -13,10 +13,10 @@

    ## Start jstatd

    $ jstatd -J-Djava.security.policy=/home/arun/jstatd.all.policy
    $ $JAVA_HOME/bin/jstatd -J-Djava.security.policy=/home/arun/jstatd.all.policy

    ## Launch VisualVM on the remote host

    $ jvisualvm
    $ $JAVA_HOME/bin/jvisualvm

    After VisualVM is launched select `"Remote" > "Add Remote Host.."` and enter the hostname where `jstatd` is running.
    After VisualVM is launched, select `"Remote" > "Add Remote Host.."` and enter the hostname where `jstatd` is running.
  3. uarun revised this gist Apr 15, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion visualvm.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@
    * Create a file named `jstatd.all.policy`
    * With the following contents:

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

    ## Start jstatd

  4. uarun created this gist Apr 15, 2015.
    22 changes: 22 additions & 0 deletions visualvm.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # Remote VisualVM

    ## Start RMI registry

    $ rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar

    ## Create Policy file for jstatd

    * Create a file named `jstatd.all.policy`
    * With the following contents:

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

    ## Start jstatd

    $ jstatd -J-Djava.security.policy=/home/arun/jstatd.all.policy

    ## Launch VisualVM on the remote host

    $ jvisualvm

    After VisualVM is launched select `"Remote" > "Add Remote Host.."` and enter the hostname where `jstatd` is running.