Skip to content

Instantly share code, notes, and snippets.

@first087
Created July 21, 2020 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save first087/f8d7a8e93336514aa8ab42afd96505b5 to your computer and use it in GitHub Desktop.
Save first087/f8d7a8e93336514aa8ab42afd96505b5 to your computer and use it in GitHub Desktop.
Java check thread by pid using jstack
echo "Check process $1"
while true
do
"$JAVA_HOME/bin/jstack" -l $1 | grep pool
sleep 1
echo
done
# Command: sh check-thread.sh {pid}
# Example: sh check-thread.sh 12345
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment