-
Notifications
You must be signed in to change notification settings - Fork 218
/
testJConsole.sh
executable file
·21 lines (18 loc) · 1.03 KB
/
testJConsole.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#for instance test with: service:jmx:kubernetes:///api/v1/namespaces/mynamespace/pods/mypodname-.*/actuator/jolokia/
if [ "$JAVA_HOME" = "" ]
then
echo "JAVA_HOME must be set and valid to run $0" ; exit 1
fi
VERSION=1.6.3-SNAPSHOT
$JAVA_HOME/bin/java -Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=45999 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Djava.rmi.server.hostname=localhost \
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1045 \
-javaagent:"$(dirname $0)/../../../../../agent/jvm/target/jolokia-jvm-${VERSION}-agent.jar=port=8779" \
-classpath "$(dirname $0)/../../../../jmx-adapter/target/jolokia-jmx-adapter-${VERSION}-standalone.jar:$(dirname $0)/../../../target/jolokia-kubernetes-1.6.3-SNAPSHOT-standalone.jar:$HOME/.m2/repository/io/kubernetes/client-java/5.0.0/client-java-5.0.0.jar:$JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/classes" \
-Dapplication.home=$JAVA_HOME \
-Xms8m -Djconsole.showOutputViewer \
sun.tools.jconsole.JConsole