Skip to content

Commit 8789a38

Browse files
committed
update
1 parent 6b2d0b7 commit 8789a38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

show-busy-java-threads.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ printStackOfThreads() {
8989

9090
[ ! -f "${jstackFile}" ] && {
9191
jstack ${pid} > ${jstackFile} || {
92-
redEcho "Fail to jstack java process ${pid}"
92+
redEcho "Fail to jstack java process ${pid}!"
9393
rm ${jstackFile}
9494
continue
9595
}
@@ -100,7 +100,7 @@ printStackOfThreads() {
100100
done
101101
}
102102

103-
if [ -z ${pid} ] ; then
103+
if [ -z "${pid}" ] ; then
104104
ps -Leo pid,lwp,user,comm,pcpu --no-headers | awk '$4=="java"{print $0}' |
105105
sort -k5 -r -n | head --lines "${count}" | printStackOfThreads
106106
else

0 commit comments

Comments
 (0)