Skip to content

Instantly share code, notes, and snippets.

@wstrange wstrange/debug.sh
Created Aug 3, 2018

Embed
What would you like to do?
Debug running ds processes with jstack
#!/usr/bin/env bash
dump() {
echo "******* Dump $1 *******"
pid=`jps -ml | grep $1 | awk '{print $1}'`
if [ -n "$pid" ]; then
echo $pid
jstack $pid;
fi
}
while true
do
echo "******** Thread dump *******"
jps -ml
dump Directory
dump ReplicationCliMain
sleep 30;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.