File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22# @Function
3- # Find the High cpu consume thread of java, and print the stack of these threads.
3+ # Find out the highest cpu consumed threads of java, and print the stack of these threads.
44#
55# @Usage
66# $ ./show-busy-java-threads.sh
1010PROG=` basename $0 `
1111
1212redEcho () {
13- if [ -p /dev/stdout ] ; then
14- # if stdout is pipeline, shutdown color output.
15- echo " $@ "
16- else
13+ if [ -c /dev/stdout ] ; then
14+ # if stdout is console, turn on color output.
1715 echo -e " \033[1;31m$@ \033[0m"
16+ else
17+ echo " $@ "
1818 fi
1919}
2020
2121usage () {
2222 cat << EOF
2323Usage: ${PROG} [OPTION]...
24- Find the High cpu consume thread of java, and print the stack of these threads.
24+ Find out the highest cpu consumed threads of java, and print the stack of these threads.
2525Example: ${PROG} -c 10
2626
2727Options:
You can’t perform that action at this time.
0 commit comments