Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ea01ea8

Browse files
fix: improve Separator blank line output again 💅 fix wrong blank line logic
1 parent c678e28 commit ea01ea8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎bin/show-busy-java-threads‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ printStackOfThreads() {
536536
while read -r pid threadId pcpu user; do
537537
printf -v threadId0x '%#x' "$threadId"
538538

539-
((idx++))
539+
((idx++>0))&& normalOutput
540540
local jstackFile="$store_file_prefix$((update_round_num + 1))_jstack_$pid"
541541
[ -f "$jstackFile" ] || {
542542
# shellcheck disable=SC2206
@@ -552,17 +552,14 @@ printStackOfThreads() {
552552
redOutput "[$idx] Fail to jstack busy(${pcpu}%) thread($threadId/$threadId0x) stack of java process($pid) under user($user)."
553553
redOutput "User of java process($user) is not current user($USER), need sudo to rerun:"
554554
yellowOutput " sudo $(printCallingCommandLine)"
555-
normalOutput
556555
continue
557556
fi || {
558557
redOutput "[$idx] Fail to jstack busy(${pcpu}%) thread(${threadId}/${threadId0x}) stack of java process(${pid}) under user(${user})."
559-
normalOutput
560558
rm "$jstackFile" &>/dev/null
561559
continue
562560
}
563561
}
564562

565-
((idx > 1)) && normalOutput
566563
blueOutput "[$idx] Busy($pcpu%) thread($threadId/$threadId0x) stack of java process($pid) under user($user):"
567564

568565
if [ -n "$mix_native_frames" ]; then

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /