mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-14 06:45:19 +00:00
remove old compatibility code in as.sh. #92
This commit is contained in:
1 parent
f45f401c49
commit
bb945824bc
2 files changed
+11
-32
No files matched your search
@@ -66,7 +66,6 @@ set ERROR_CODE=%ERRORLEVEL%
|
|||||||
goto endNT
|
goto endNT
|
||||||
|
|
||||||
:attachSuccess
|
:attachSuccess
|
||||||
REM %JAVACMD% -Dfile.encoding=UTF-8 -Djava.awt.headless=true -cp "%CORE_JAR%" com.taobao.arthas.core.ArthasConsole 127.0.0.1 3658
|
|
||||||
telnet 127.0.0.1 3658
|
telnet 127.0.0.1 3658
|
||||||
|
|
||||||
REM set local scope for the variables with windows NT shell
|
REM set local scope for the variables with windows NT shell
|
||||||
|
|||||||
@@ -365,38 +365,18 @@ attach_jvm()
|
|||||||
|
|
||||||
echo "Attaching to ${TARGET_PID} using version ${1}..."
|
echo "Attaching to ${TARGET_PID} using version ${1}..."
|
||||||
|
|
||||||
if [ ${TARGET_IP} = ${DEFAULT_TARGET_IP} ]; then
|
echo ${ARTHAS_OPTS}
|
||||||
if [[ "${arthas_version}" > "3.0" ]]; then
|
|
||||||
${JAVA_HOME}/bin/java \
|
|
||||||
${ARTHAS_OPTS} ${BOOT_CLASSPATH} ${JVM_OPTS} \
|
|
||||||
-jar ${arthas_lib_dir}/arthas-core.jar \
|
|
||||||
-pid ${TARGET_PID} \
|
|
||||||
-target-ip ${TARGET_IP} \
|
|
||||||
-telnet-port ${TELNET_PORT} \
|
|
||||||
-http-port ${HTTP_PORT} \
|
|
||||||
-core "${arthas_lib_dir}/arthas-core.jar" \
|
|
||||||
-agent "${arthas_lib_dir}/arthas-agent.jar"
|
|
||||||
else
|
|
||||||
# for compatibility
|
|
||||||
${JAVA_HOME}/bin/java \
|
|
||||||
${ARTHAS_OPTS} ${BOOT_CLASSPATH} ${JVM_OPTS} \
|
|
||||||
-jar ${arthas_lib_dir}/arthas-core.jar \
|
|
||||||
-pid ${TARGET_PID} \
|
|
||||||
-target ${TARGET_IP}":"${TELNET_PORT} \
|
|
||||||
-core "${arthas_lib_dir}/arthas-core.jar" \
|
|
||||||
-agent "${arthas_lib_dir}/arthas-agent.jar"
|
|
||||||
|
|
||||||
# verify_pid
|
if [ ${TARGET_IP} = ${DEFAULT_TARGET_IP} ]; then
|
||||||
echo "help" > /tmp/command
|
${JAVA_HOME}/bin/java \
|
||||||
PID=`${JAVA_HOME}/bin/java -cp ${arthas_lib_dir}/arthas-core.jar ${ARTHAS_OPTS}\
|
${ARTHAS_OPTS} ${BOOT_CLASSPATH} ${JVM_OPTS} \
|
||||||
com.taobao.arthas.core.ArthasConsole ${TARGET_IP} ${TELNET_PORT} -b -f /tmp/command \
|
-jar ${arthas_lib_dir}/arthas-core.jar \
|
||||||
| grep PID | awk '{print $2}'`
|
-pid ${TARGET_PID} \
|
||||||
rm /tmp/command
|
-target-ip ${TARGET_IP} \
|
||||||
if [ ! -z ${PID} ] && [ "${PID}" != "${TARGET_PID}" ]; then
|
-telnet-port ${TELNET_PORT} \
|
||||||
echo "WARNING: Arthas server is running on ${PID} instead of ${TARGET_PID}, exiting."
|
-http-port ${HTTP_PORT} \
|
||||||
exit 1
|
-core "${arthas_lib_dir}/arthas-core.jar" \
|
||||||
fi
|
-agent "${arthas_lib_dir}/arthas-agent.jar"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user