Hello,
Thank you for reaching out!
For this purpose, the best option would be to use iPerf3. This is because it is more optimized for scripting, and has much more options.
The processing logic that I imagine would be the best here:
- Create a script that runs the iperf3 speed test to your server and saves the results to a file. The command would look like so:
iperf3 -R --logfile /tmp/iperf_res.txt -c <hostname/IP address>
- The argument -R performs a reverse test, meaning you will see the download speeds of the router. If you only need the upload speed, -R can be removed. It can also be replaced with --bidir. This will perform both - upload and download tests.
- Once this file is saved, you will need to decide what you would like to do with it. I would advise against sending it via email, as managing 200 emails a week could be quite a task. Perhaps the results could be sent via MQTT or as an HTTP Post request to your server, and the results could be stored there? Uploading it via FTP could also be an option (an example can be found in this comment).
- After the file is sent, make sure to remove it, so the results are not concentrated after the next test;
- This script could be placed in the /etc directory, and a crontab could be added to run it at a specified time or every seven days;
Since iPerf3 is not pre-installed on our routers, it will need to be downloaded from the opkg repository. This can be done by connecting to the device
command line, and running these commands:
opkg update (ignore the errors at the end)
opkg install iperf3
Let me know if any more information is needed!
Best regards,
DaumantasG