Written by Robert -
Ever wanted to see how a switch performs when running it 24 hours? Here is how I did it:
Grab two boxes running Linux. Install the tool iperf on both systems using your favorite package manager. The program needs two systems to function properly. One acts as a server, the other as a client. I prefer to run the test in a tmux session, for two reasons. The first is that I only need one terminal sessions to run two commands. The second reason is that if someone accidently closes the terminal, tmux and the commands are still being run in the background.
On the server side, you need to run the following command:
iperf -s -i 10
The -s stands for server, and -i 10 is the interval when the screen refreshes, in this case every 10 seconds.
Personally, I prefer to run it as following:
iperf -s -i 10 > /home/username/iperf.txt
That way, all information is send to a text file. the text is now invisble,
Here is the output that the command gives. It's not a lot. So I split the tmux window in two, and on the other window I run the following command:
tail -f /home/manjaro/iperf.txt
This reads the file and all new information put in the file to your screen. Like the cat command, but it shows new information as well.
After running that command, you can see all the information.
On a different computer, we start tmux again so we can start the client.
The client side works a bit different. The server only listens to the client. The client starts the actual test.
What we do is run the following command:
iperf -c <ipofserver> -i <interval> -t <time> > /home/username/iperf.txt
This starts the data transfer. The time is in seconds. 24 hours x 60 minutes x 60 seconds = 86400 seconds in a day. Because this test is running for 24 hours, this is the amount of seconds it will run. It will stop automatically after the time has passed. I again output the data to a text file.
I split the window in two again, and I start the tail of the text file.
The images of the output are from two different tests. The data on both sides should be exactly the same so it shouldn't matter on which screen you are reading the data.