Skip to content

Commit 07a0429

Browse files
committed
support command name jsvc to find java process feature oldratlee#72
1 parent 7d991a4 commit 07a0429

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

show-busy-java-threads

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ headInfo() {
269269
if [ -n "${pid}" ]; then
270270
readonly ps_process_select_options="-p $pid"
271271
else
272-
readonly ps_process_select_options="-C java"
272+
readonly ps_process_select_options="-C java -C jsvc"
273273
fi
274274

275275
# output field: pid, thread id(lwp), pcpu, user
@@ -303,7 +303,7 @@ __top_threadId_cpu() {
303303
if (prevLineHasText && !currentLineHasText)
304304
blockIndex++ # from text line to empty line, increase block index
305305
306-
if (blockIndex == 3 && $NF == "java") # $NF(last field) is command field
306+
if (blockIndex == 3 && ($NF == "java" || $NF == "jsvc")) # $NF(last field) is command field
307307
# only print 4th text block(blockIndex == 3), aka. process info of second top update
308308
print $1 " " $9 # $1 is thread id field, $9 is %cpu field
309309

0 commit comments

Comments
 (0)