Last active
July 24, 2018 09:41
-
-
Save kokosing/98a172ff1deb2f4782a74b48d6fba9cb to your computer and use it in GitHub Desktop.
Trace Presto Server stack trace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
ticks_to_collect=${1:-120} | |
presto_pids=$(sudo ps aux | grep PrestoServer | grep -v grep | awk '{ print $2 }') | |
for i in $(seq $ticks_to_collect); do | |
for presto_pid in $presto_pids; do | |
sudo kill -3 $presto_pid | |
done | |
echo -en "\rCollected tick $i out of $ticks_to_collect" | |
sleep 1 | |
done | |
echo "All the stack traces are collected in launcher.log" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment