2019-12-23 14:31:57 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
! tmux list-sessions || tmux kill-session
|
|
|
|
declare sudo=
|
|
|
|
if sudo true; then
|
|
|
|
sudo="sudo -n"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "pwd: $(pwd)"
|
|
|
|
for pid in solana/*.pid; do
|
|
|
|
pgid=$(ps opgid= "$(cat "$pid")" | tr -d '[:space:]')
|
|
|
|
if [[ -n $pgid ]]; then
|
|
|
|
$sudo kill -- -"$pgid"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [[ -f solana/netem.cfg ]]; then
|
|
|
|
solana/scripts/netem.sh delete < solana/netem.cfg
|
|
|
|
rm -f solana/netem.cfg
|
|
|
|
fi
|
2020-04-09 01:57:18 -07:00
|
|
|
solana/scripts/net-shaper.sh cleanup
|
2019-12-23 14:31:57 -08:00
|
|
|
for pattern in validator.sh boostrap-leader.sh solana- remote- iftop validator client node; do
|
|
|
|
echo "killing $pattern"
|
|
|
|
pkill -f $pattern
|
|
|
|
done
|