Skip to content

Commit

Permalink
more strict solution for trunk user name bug #62
Browse files Browse the repository at this point in the history
more discussion see #62
  • Loading branch information
oldratlee committed Nov 28, 2017
1 parent 3f0e873 commit 1bb6909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion show-busy-java-threads
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ for ((i = 0; update_count <= 0 || i < update_count; ++i)); do
[ -n "$append_file" ] && headInfo >> "$append_file"
[ "$update_count" -ne 1 ] && headInfo

ps -Leo pid,lwp -o ruser=${USER} -o comm,pcpu --no-headers | {
ps -Leo pid,lwp,user:80,comm,pcpu --no-headers | {
[ -z "${pid}" ] &&
awk '$4=="java"{print $0}' ||
awk -v "pid=${pid}" '$1==pid,$4=="java"{print $0}'
Expand Down

0 comments on commit 1bb6909

Please sign in to comment.