#! /bin/bash
set -o xtrace

# run this script on main ai
# this is testing the links to vision

# check pre errors
ethtool -S pcu-direct | grep _errors
ssh vision1 "ethtool -S pcu-direct | grep _errors"

# run traffic
ssh -q vision1 "iperf3 -s -D -i 60"
iperf3 -i 60 -n 625000000000 -c 192.168.5.2
iperf3 -i 60 -n 625000000000 -c 192.168.5.2 -R
ssh -q vision1 "pkill -TERM iperf3"

# check post errors
ethtool -S pcu-direct | grep _errors
ssh vision1 "ethtool -S pcu-direct | grep _errors"
