1 | #!/bin/bash |
---|
2 | |
---|
3 | # find out my host name |
---|
4 | hn=$(hostname) |
---|
5 | |
---|
6 | # install iperf |
---|
7 | yum -y install iperf |
---|
8 | |
---|
9 | # start up the server on host 'left' and client on host 'right' |
---|
10 | if [ $hn == "left" ] |
---|
11 | then |
---|
12 | iperf -s &> /var/www/html/iperf-server.log & |
---|
13 | else |
---|
14 | iperf -c left &> /var/www/html/iperf-client.log & |
---|
15 | fi |
---|
16 | |
---|