- Measure and average ping times, interpolate between green and red depending on latency and packet loss.
- Ping several different places for redundancy and for checking worldwide connectivity. Maybe change overall brightness depending on packet loss, if the provider is wireless.
I had to do something like this at home with a flaky cable connection. It was a 100Mbs connection, or maybe 200Mbs. Several years ago, but fastest I could get. Periodically it would drop to 5Mbs or so, nothing faster. The ISP came and said they'd changed the cable, changed the connection on the pole, etc, and started pushing for evidence.
So, I wrote a script that periodically did a speed test, but I had it test 3 different sites, and average the result. Because when it was slow it was so slow I wrote a back-off function (or maybe ramp up, I can't remember), so I can determine the actual speed, given available bandwidth. Did something like test a 1Mb download, then if that was quick 10Mb, then 100Mb, to get a sustained throughput speed, and average across download sources.
If it was shown to be slow it bounced the modem. I was using the ISP cable modem because after all the complaining I did want them to have any complaints about me using a custom one, so had to reverse engineer the correct call to the shitty web-site it presented.
Anyway, it ended up working really well, and kept their engineers off my back whenever they came round to ask if I'd bounced the modem, or whatever basic troubleshooting. I could show them the script, show them the metrics it kept (daily and hourly averages), and they'd instantly get more serious with their answers.
I never got to the flashing light stage though, maybe should have done that too.
I once made a little status indicator in C#. It was just a little orb in the statusbar that would ping 8.8.8.8 and change color depending on how many packets were dropped.
I lost the code. I could rebuild it (only took a few hours of Googling), but my internet is much better now so the motivation is not very strong. Does anyone know if such a thing exists already?
---
Edit: (literally 10 minutes later) I now have a working version thanks to ChatGPT.
I've always been curious: Would it be more appropriate to ping connectivitycheck.gstatic.com instead of 8.8.8.8 or google.com for connectivity check purposes?
Google probably doesn't care one way or another at small scales like personal use cases, but the saying goes that there's no such thing as a stupid question.
My ISP stopped responding to pings to the next-upstream node so it's been annoying not having that as an easy way to determine internet uptime. I had like a year's worth of data and then it just... stopped.
You can use port 80/443. Craft a tcp syn packet and see if you get a syn/ack response back. There might be someone that already has a ping mechanism written this way.
- Measure and average ping times, interpolate between green and red depending on latency and packet loss.
- Ping several different places for redundancy and for checking worldwide connectivity. Maybe change overall brightness depending on packet loss, if the provider is wireless.