Mandatory logfile

master
Meliurwen 4 years ago
parent 03f5b5e5b8
commit 38e42095d3
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 3
      iperf3-k8s.sh

@ -44,7 +44,8 @@ timestamp="$(date +"%Y-%m-%d_%H-%M-%S")"
for POD in ${CLIENTS}; do
HOST=$(kubectl get pod "${POD}" -o jsonpath='{.status.hostIP}')
if [[ "${arguments}" == *"-J"* ]]; then
kubectl exec -it "${POD}" -- iperf3 -c iperf3-server -T "${HOST}" "$@" > "reports/${timestamp}-${HOST}-${POD}.json"
kubectl exec -it "${POD}" -- iperf3 -c iperf3-server -T "${HOST}" "$@" "--logfile" "reports/${timestamp}-${HOST}-${POD}.json"
echo "Report created: reports/${timestamp}-${HOST}-${POD}.json"
else
kubectl exec -it "${POD}" -- iperf3 -c iperf3-server -T "${HOST}" "$@"
fi

Loading…
Cancel
Save