update files

gh-pages
hengyunabc 2 years ago
parent 0ef3c8fc1b
commit 1bd77d71a0

Binary file not shown.

32
as.sh

@ -8,10 +8,10 @@
# program : Arthas
# author : Core Engine @ Taobao.com
# date : 2023-04-19
# date : 2023-05-09
# current arthas script version
ARTHAS_SCRIPT_VERSION=3.6.8
ARTHAS_SCRIPT_VERSION=3.6.9
# SYNOPSIS
# rreadlink <fileOrDirPath>
@ -393,12 +393,32 @@ update_if_necessary()
fi
}
# jps command may crash, so need to check it
check_jps() {
"${JAVA_HOME}/bin/jps" > /dev/null 2>&1
local exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "jps command failed with exit code ${exit_code}" >&2
fi
return $exit_code
}
call_jps()
{
if [ "${VERBOSE}" = true ] ; then
"${JAVA_HOME}"/bin/jps -l -v
check_jps
local exit_code=$?
if [[ "$exit_code" -eq 0 ]]; then
# jps command is ok
local jps_command=("${JAVA_HOME}/bin/jps" "-l")
if [ "${VERBOSE}" = true ] ; then
jps_command=("${JAVA_HOME}/bin/jps" "-l" "-v")
fi
local jps_output=$("${jps_command[@]}")
echo "$jps_output"
else
"${JAVA_HOME}"/bin/jps -l
# jps command failed, use ps and grep
ps_output=$(ps aux | grep java | grep -v grep | awk '{print $2" "$11}')
echo "$ps_output"
fi
}
@ -455,7 +475,7 @@ EXAMPLES:
./as.sh --stat-url 'http://192.168.10.11:8080/api/stat'
./as.sh -c 'sysprop; thread' <pid>
./as.sh -f batch.as <pid>
./as.sh --use-version 3.6.8
./as.sh --use-version 3.6.9
./as.sh --session-timeout 3600
./as.sh --attach-only
./as.sh --disabled-commands stop,dump

Binary file not shown.
Loading…
Cancel
Save