So my roommate and I were annoyed about our internet beeing slow.
I thought about speedtesting my connection every so often and save the results to send them to my ISP when the internet is slow again.
I quickly binged my way to through some tutorials and the simplest way was to use speedtest-cli, cron, scp and a windows shortcut in the startup folder.
You could follow this tutorial for the basics:
but I extended the idea with a cronjob and an scp command under windows to backup the file to my pc.
Im assuming you have a device with linux at home.
Install speedtest-cli on the pi with python-pip.
create a cronjob with “crontab -e” and enter something along these lines:
30 00 * * * date >> /var/tmp/speedlog.txt
30 00 * * * /usr/local/bin/speedtest-cli >> /var/tmp/speedlog.txt
This saves the current date in the speedlog file and adds the speedtest output.
I did not consider log-file rollover here – because this file will eventually be huge otherwise.
sync your file via scp or rsync to your desktop pc. Have ssh enabled and sync your file. I did it with another cronjob inside my WSL (Windows Subsystem for Linux) and copy the file from my pi to my HDD with:
00 22 * * * scp firstname.lastname@example.org:/var/tmp/speedlog.txt ../../mnt/d/speedlog.txt
Then it dawned on me, that the WSL has to be kept open, so i found this:
Especially this part:
Open sudo config file:
Add the following line:
%sudo ALL=NOPASSWD: /etc/init.d/cron start
win+r, enter shell:startup , create a shortcut for wsl.exe (see below) and paste something along this in the destination field:
C:\Windows\System32\wsl.exe sudo /etc/init.d/cron start
Then a linux terminal should start on pc boot. If you picked your time for the file backup at a reasonable time thats inside the window of you using your pc, that should run one time and you should see your updated file at your chosen location.
Meanwhile I did not want to send the files manually to my ISP. So I added a twitter bot and a python script to automatically notify my ISP about my network being slow.
It didn´t take them a week to ban the bot from posting to them.
As it turns out, my ISP was just partly the problem.
A friend of mine had the idea to just disable my freifunk router to see if that helps.
SPOILER: it did.
Now why does it help?
Vodafone Germany fucked up their ipv6 routing and therefore my freifunk router took over the ipv6 handling,which slowed down my internet speed significantly ( predictably to 16Mbit/s ).
As of now, vodafone still hasn´t fixed that. I´ll have to try and disable ipv6 routing in my freifunk router and see if that helps – because i still want to use the router as my guest wifi.
So, if you run into the same problem, and you are sure its not on their part (by checking your ISP´s speedtest, which sometimes shows the speed to your router and the network internal speed seperately) – try disabling some of your equipment, especially routers and see if that helps.