Skip to content

Commit

Permalink
Add an iperf test
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann committed Jul 22, 2024
1 parent 1d40b29 commit d83f5ea
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,16 @@ Free a machine with `make free-machine01` or
docker compose run --rm metalctl machine rm e0ab02d2-27cd-5a5e-8efc-080ba80cf258
```

## iPerf

To test network performance between the machines run:

```bash
make start-machine03
make machine02
./test/iperf.sh
```

## Flavors

There's few versions of mini-lab environment that you can run. We call them flavors. There's 2 flavors at the moment:
Expand Down
12 changes: 12 additions & 0 deletions test/iperf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -o errexit

echo "Install iperf3"
ssh -o StrictHostKeyChecking=no -o "PubkeyAcceptedKeyTypes +ssh-rsa" -i files/ssh/id_rsa [email protected] "sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes iperf3"
ssh -o StrictHostKeyChecking=no -o "PubkeyAcceptedKeyTypes +ssh-rsa" -i files/ssh/id_rsa [email protected] "sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes iperf3"

echo "Start iperf3 server on machine01"
ssh -o StrictHostKeyChecking=no -o "PubkeyAcceptedKeyTypes +ssh-rsa" -i files/ssh/id_rsa [email protected] "sudo iperf3 --server --one-off --daemon --bind 203.0.113.130"

echo "Run iperf3 test on machine02"
ssh -o StrictHostKeyChecking=no -o "PubkeyAcceptedKeyTypes +ssh-rsa" -i files/ssh/id_rsa [email protected] "iperf3 --client 203.0.113.130"

0 comments on commit d83f5ea

Please sign in to comment.