Skip to content

Commit

Permalink
Update Iftop command in testnet automation (solana-labs#6908)
Browse files Browse the repository at this point in the history
* Update iftop command
  • Loading branch information
danpaul000 authored Nov 13, 2019
1 parent ee5cc73 commit f83254d
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions system-test/testnet-performance/testnet-automation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,28 @@ function analyze_packet_loss {
# shellcheck disable=SC1091
source net/config/config
mkdir -p iftop-logs
execution_step "Collecting iftop logs"
execution_step "Map private -> public IP addresses in iftop logs"
# shellcheck disable=SC2154
for i in "${!validatorIpList[@]}"; do
iftop_log=iftop-logs/${validatorIpList[$i]}-iftop.log
# shellcheck disable=SC2154
# shellcheck disable=SC2086
# shellcheck disable=SC2027
echo "{\"private\": \""${validatorIpListPrivate[$i]}""\", \"public\": \""${validatorIpList[$i]}""\"},"
done > ip_address_map.txt

for ip in "${validatorIpList[@]}"; do
net/scp.sh ip_address_map.txt solana@"$ip":~/solana/
done

execution_step "Remotely post-process iftop logs"
# shellcheck disable=SC2154
for ip in "${validatorIpList[@]}"; do
iftop_log=iftop-logs/$ip-iftop.log
# shellcheck disable=SC2016
net/ssh.sh solana@"${validatorIpList[$i]}" 'PATH=$PATH:~/.cargo/bin/ ~/solana/scripts/iftop-postprocess.sh ~/solana/iftop.log temp.log' \
"${validatorIpListPrivate[$i]}" "${validatorIpList[$i]}" > "$iftop_log"
#upload-ci-artifact "$iftop_log"
net/ssh.sh solana@"$ip" 'PATH=$PATH:~/.cargo/bin/ ~/solana/scripts/iftop-postprocess.sh ~/solana/iftop.log temp.log ~solana/solana/ip_address_map.txt' > "$iftop_log"
upload-ci-artifact "$iftop_log"
done

execution_step "Analyzing Packet Loss"
solana-release/bin/solana-log-analyzer analyze -f ./iftop-logs/ | sort -k 2 -g
)
Expand Down Expand Up @@ -330,6 +343,7 @@ TEST_PARAMS_TO_DISPLAY=(CLOUD_PROVIDER \
CLIENT_OPTIONS \
TESTNET_ZONES \
TEST_DURATION_SECONDS \
USE_PUBLIC_IP_ADDRESSES \
ALLOW_BOOT_FAILURES \
ADDITIONAL_FLAGS)

Expand Down

0 comments on commit f83254d

Please sign in to comment.