Fix limited iftop output and failure to stop iftop (#6723)

* Fix limited iftop output and failure to stop iftop

* Shellcheck

* Ignore shellcheck
This commit is contained in:
Sagar Dhawan 2019-11-04 18:12:07 -08:00 committed by GitHub
parent 4d52f47f87
commit 3133ee2401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -812,10 +812,15 @@ stopNode() {
PS4=\"$PS4\"
set -x
! tmux list-sessions || tmux kill-session
declare sudo=
if sudo true; then
sudo="sudo -n"
fi
for pid in solana/*.pid; do
pgid=\$(ps opgid= \$(cat \$pid) | tr -d '[:space:]')
if [[ -n \$pgid ]]; then
sudo kill -- -\$pgid
\$sudo kill -- -\$pgid
fi
done
for pattern in node solana- remote-; do

View File

@ -12,5 +12,5 @@ sudo=
if sudo true; then
sudo="sudo -n"
fi
$sudo iftop -i "$(ifconfig | grep mtu | grep -iv loopback | grep -i running | awk 'BEGIN { FS = ":" } ; {print $1}')" -nNbBP -t
# shellcheck disable=SC2086
exec $sudo iftop -i "$(ifconfig | grep mtu | grep -iv loopback | grep -i running | awk 'BEGIN { FS = ":" } ; {print $1}')" -nNbBP -t -L 1000