Fix substitution of private IP with public IP in iftop logs (#6748)

automerge
This commit is contained in:
Pankaj Garg 2019-11-05 15:08:35 -08:00 committed by Grimes
parent 8993b15248
commit 1c5d2a85cf
1 changed files with 2 additions and 2 deletions

View File

@ -23,10 +23,10 @@ awk '{ if ($3 ~ "=>") { print $2, $7 } else if ($2 ~ "<=") { print $1, $6 }} ' <
| awk 'NR%2{printf "%s ",$0;next;}1' \ | awk 'NR%2{printf "%s ",$0;next;}1' \
| awk '{ print "{ \"a\": \""$1"\", " "\"b\": \""$3"\", \"a_to_b\": \""$2"\", \"b_to_a\": \""$4"\"}," }' > "$2" | awk '{ print "{ \"a\": \""$1"\", " "\"b\": \""$3"\", \"a_to_b\": \""$2"\", \"b_to_a\": \""$4"\"}," }' > "$2"
if [ "$#" -ne 3 ]; then if [ "$#" -lt 4 ]; then
solana-log-analyzer iftop -f "$2" solana-log-analyzer iftop -f "$2"
else else
solana-log-analyzer iftop -f "$2" map-IP --priv "$(hostname -i)" --pub "$3" solana-log-analyzer iftop -f "$2" map-IP --priv "$3" --pub "$4"
fi fi
exit 1 exit 1