IPerf3 Guide

3 min

What is iPerf3?

iPerf3 is a powerful and flexible tool for network performance testing. Its ability to measure key network parameters and provide detailed output makes it invaluable for network administrators and engineers. It measures the bandwidth, delay jitter, and packet loss of a network connection, that is widely used to diagnose network issues and evaluate the performance of various types of networks.

If you need to perform iPerf Internet speed tests as part of your network monitoring activity, look no further: Domotz can help you thanks to an integration script we’ve created.

By leveraging the SSH protocol, this script can perform speed tests from Linux machines, with the ability to measure download and upload speed.

How it works

To use iPerf3, you need to install it on both the client and server machines. A speed test is performed measuring data transfer bandwidth between a client machine and a server machine.

The speed test client machine is a Linux machine where iPerf3 client is installed.

The speed test server machine is a machine that implements the iPerf3 server protocol and can be located inside a Domotz monitored network or in an external network, as described in the following diagrams:

  1. iPerf client and server inside Domotz monitored network

2. iPerf server outside Domotz monitored network

An external speed test server machine can also be provided by third-parties, like ping.online.net or speedtest.serverius.net.

The following paragraphs describe how to install iPerf3 on a test client and a test server machines.

How to install iPerf3 on the speed test client machine

To install iPerf on a Linux Debian/Ubuntu/Mint machine, you can execute the following command:

sudo apt-get install iperf3

The Domotz integration script will connect to the iPerf client machine and will launch the speed test automatically.

How to install iPerf3 on the speed test server machine

To configure iPerf3 server on a Linux Debian/Ubuntu/Mint machine, you can execute the following steps:

  1. Install iPerf3:
sudo apt-get install iperf3

2. Create dedicated user and group:

sudo adduser iperf --disabled-login --gecos iperf

3. Edit the service definition:

sudo nano /etc/systemd/system/iperf3-server@.service

[Unit]

Description=iperf3 server on port %i

After=syslog.target network.target

[Service]

ExecStart=/usr/bin/iperf3 -s -1 -p %i

Restart=always

RuntimeMaxSec=3600

User=iperf

[Install]

WantedBy=multi-user.target

DefaultInstance=5201

4. Reload the service daemon:

sudo systemctl daemon-reload

5. Activate 4 iPerf processes at start-up. We activate more than one process, each one on a different port, for fallback in case of errors:

sudo systemctl enable iperf3-server@5200
sudo systemctl enable iperf3-server@5201
sudo systemctl enable iperf3-server@5202
sudo systemctl enable iperf3-server@5203

How to monitor iPerf3 Internet Speed Test with Domotz integration script


Use iPerf3 integration script to get information about the following variables:

  • Download speed
  • Download speed UDP
  • Upload speed
  • Upload speed UDP

When you associate the script to a device, you will be asked to define the following parameters:

  • Target iPerf3 server list
  • Default iPerf3 port

The target iPerf3 server list contains a list of servers to use for testing in the form <server:port>, where port is optional. A list of pre-defined servers is already present but please check their availability on iPerf web site (https://iperf.fr/iperf-servers.php#public-servers).

The default iPerf3 port is used in case it is not specified in the target server.

If the current server returns an error, the next server in the list will be used .

The script uses the SSH protocol to display the speed test values.

The script has been tested on Ubuntu Linux 22.04.1 LTS and iPerf 3.7.

You can find this script in our examples library:

You can customize the drivers to fit your needs.

Full network visibility with ready-to-use scripts

Use the pre-configured scripts to monitor and manage network-connected devices, cloud services, and web applications. By using standard network protocols, the scripts will allow you to retrieve valuable data and execute actions on the monitored devices and services.

Build or customize scripts according to your network monitoring needs.

Additionally, you can apply customized alerts on scripts to be notified when a specific event occurs.

Additional Resources

Automation and Scripts – Domotz

Share via Social Networks

You might also like…

Read more top posts in this category

Want more tips on Network Monitoring?

Ready to get started with Domotz?

  • Powerful
  • Automated
  • Simple
  • Affordable
Start Your Free Trial Contact Sales