Thank you - very helpful. This created a rabbit hole for me (which I stuck my head in for a little bit). So from the wiki, you can find out that they get this information from: https://www.speedtest.net/. This well known authority in terms of internet speed checking also provides command-line interface to their test software: https://www.speedtest.net/apps/cli
Installed it, Linux binary, and execute it:
{
"download": 93509230.46298379,
"upload": 95016876.45176126,
"ping": 5.024,
"server": {
"url": "http://speedtest1.etisalat.ae:8080/speedtest/upload.php",
"lat": "25.2500",
"lon": "55.3000",
"name": "Dubai",
"country": "United Arab Emirates",
"cc": "AE",
"sponsor": "ETISALAT-UAE",
"id": "17336",
"host": "speedtest1.etisalat.ae:8080",
"d": 1.7183145989433646,
"latency": 5.024
},
"timestamp": "2022-05-12T04:23:32.177313Z",
"bytes_sent": 118841344,
"bytes_received": 117319962,
"share": null,
"client": {
"ip": "2.51.127.183",
"lat": "25.2633",
"lon": "55.3087",
"isp": "Etisalat",
"isprating": "3.7",
"rating": "0",
"ispdlavg": "0",
"ispulavg": "0",
"loggedin": "0",
"country": "AE"
}
}
It creates a very nicely structured json
dataset. This was from my laptop: what if we run this in a z-machine on the grid… :-). From freefarm in Belgium:
{
"type": "result",
"timestamp": "2022-05-12T04:41:36Z",
"ping": {
"jitter": 0.078,
"latency": 4.675
},
"download": {
"bandwidth": 76093440,
"bytes": 537762760,
"elapsed": 7207
},
"upload": {
"bandwidth": 109309476,
"bytes": 427469170,
"elapsed": 3904
},
"isp": "Telenet",
"interface": {
"internalIp": "185.69.166.156",
"name": "eth1",
"macAddr": "0E:14:94:61:B7:4C",
"isVpn": false,
"externalIp": "185.69.166.156"
},
"server": {
"id": 15212,
"host": "netgauge.telenet.be",
"port": 8080,
"name": "Telenet BVBA/SPRL",
"location": "Mechelen",
"country": "Belgium",
"ip": "195.162.192.137"
},
"result": {
"id": "e2bdfa7f-e89f-4884-834f-54c139e95b47",
"url": "https://www.speedtest.net/result/c/e2bdfa7f-e89f-4884-834f-54c139e95b47",
"persisted": true
}
}
Nice bandwidth @delandtj (10Gbps up and down) . Cool so this works out of the box (weird difference in the speedtest binary that on ubuntu I had to accept a license fist, on Archlinux it just did what I asked it to do… anyway).
The real test if we have a 3node that does not have a public IP address… I choose node 67
in the US. Spec-wise it looks like a titan, so it should exist somewhere in a home in the US. I choose to have access over the planetary networks and specify a really small Z-machine (1 core, 512 MB memory).
After deploying the z-machine and installing the software this is the result (deleted specifics of the Titan and Z-machine):
{
"type": "result",
"timestamp": "2022-05-12T04:56:00Z",
"ping": {
"jitter": 2.737,
"latency": 14.062
},
"download": {
"bandwidth": 28531416,
"bytes": 242930960,
"elapsed": 8604
},
"upload": {
"bandwidth": 1405157,
"bytes": 8803184,
"elapsed": 6305
},
"packetLoss": 0,
"isp": "**********",
"interface": {
"internalIp": "***.***.***.***",
"name": "eth0",
"macAddr": "32:AE:DB:11:AE:E6",
"isVpn": false,
"externalIp": "***.***.***.***"
},
"server": {
"id": 16974,
"host": "speedtest.west.rr.com",
"port": 8080,
"name": "Spectrum",
"location": "Los Angeles, CA",
"country": "United States",
"ip": "***.***.***.***"
}
}
So we can find out per installed machine that the download and upload speeds are by which the machine is connected.
Just some playful hacking