New program to process iftop
log output (#6668)
* New program to process iftop log output * fixes * fix shellcheck * address review comments * more review comments
This commit is contained in:
@ -8,9 +8,9 @@ set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
sudo iftop -i "$(ifconfig | grep mtu | grep -iv loopback | grep -i running | awk 'BEGIN { FS = ":" } ; {print $1}')" -nNbBP -t \
|
||||
| awk '{ if ($3 ~ "=>") { print $2, $7 } else if ($2 ~ "<=") { print $1, $6 }} ' \
|
||||
| awk 'NR%2{printf "%s ",$0;next;}1' \
|
||||
| awk '{ print $1, "<=>", $3, ":", $2, $4 }'
|
||||
sudo=
|
||||
if sudo true; then
|
||||
sudo="sudo -n"
|
||||
fi
|
||||
|
||||
exit 1
|
||||
$sudo iftop -i "$(ifconfig | grep mtu | grep -iv loopback | grep -i running | awk 'BEGIN { FS = ":" } ; {print $1}')" -nNbBP -t
|
||||
|
Reference in New Issue
Block a user