Report-Generator / iperf3_server.sh
Jaimodiji's picture
Upload folder using huggingface_hub
c001f24
#!/bin/bash
#
# This script starts an iperf3 server and displays the server's IP address.
#
# Check if iperf3 is installed
if ! command -v iperf3 &> /dev/null
then
echo "iperf3 could not be found. Please install it."
echo "For Debian/Ubuntu, use: sudo apt install iperf3"
echo "For CentOS/RHEL, use: sudo yum install iperf3"
exit 1
fi
# Get the server's IP address
IP_ADDRESS=$(hostname -I | awk '{print $1}')
PORT=5201
echo ""
echo "------------------------------------------------------------------"
echo " iperf3 Server"
echo "------------------------------------------------------------------"
echo " Server IP: ${IP_ADDRESS}"
echo " Port: ${PORT}"
echo ""
echo "Starting iperf3 server..."
echo "Press Ctrl+C to stop the server."
echo "------------------------------------------------------------------"
# Start the iperf3 server
iperf3 -s -p ${PORT}