Created
August 7, 2012 13:14
-
-
Save jcsalterego/3285239 to your computer and use it in GitHub Desktop.
Run Remote Jstatd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grant codebase "file:${java.home}/../lib/tools.jar" { | |
permission java.security.AllPermission; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Run jstatd Remotely | |
# | |
# * Requires jstatd.all.policy | |
# * Ensure your firewall is not blocking port 1099 tcp/udp | |
# | |
# Thanks to http://siniatech.com/blog/?p=263 | |
BIND_DEV=eth0 | |
BIND_HOST=$(ifconfig $BIND_DEV | awk '/inet /{print $2}' | awk -F: '{print $2}'); | |
jstatd \ | |
-J-Xdebug \ | |
-J-Djava.security.policy=jstatd.all.policy \ | |
-J-Djava.rmi.server.hostname=$BIND_HOST \ | |
-J-Djava.rmi.server.logCalls=true \ | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment