{"id":18044730,"url":"https://github.com/natterstefan/speedtest-cron","last_synced_at":"2025-04-10T01:11:36.331Z","repository":{"id":89872388,"uuid":"81645637","full_name":"natterstefan/speedtest-cron","owner":"natterstefan","description":"An easy to use script test the speed (down-, upload and ping) of your ISP regularly (cronjob).","archived":false,"fork":false,"pushed_at":"2019-05-11T10:45:48.000Z","size":13,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T02:51:36.291Z","etag":null,"topics":["alexa-skill","cron","cron-jobs","crontab","ifttt","python","raspberry-pi","speedtest"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natterstefan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["natterstefan"],"patreon":"natterstefan","custom":["https://www.paypal.me/natterstefan","https://www.buymeacoffee.com/natterstefan"]}},"created_at":"2017-02-11T10:23:51.000Z","updated_at":"2024-11-19T19:24:50.000Z","dependencies_parsed_at":"2023-03-13T18:03:57.382Z","dependency_job_id":null,"html_url":"https://github.com/natterstefan/speedtest-cron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natterstefan%2Fspeedtest-cron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natterstefan%2Fspeedtest-cron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natterstefan%2Fspeedtest-cron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natterstefan%2Fspeedtest-cron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natterstefan","download_url":"https://codeload.github.com/natterstefan/speedtest-cron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137888,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alexa-skill","cron","cron-jobs","crontab","ifttt","python","raspberry-pi","speedtest"],"created_at":"2024-10-30T18:10:30.382Z","updated_at":"2025-04-10T01:11:36.316Z","avatar_url":"https://github.com/natterstefan.png","language":"Shell","funding_links":["https://github.com/sponsors/natterstefan","https://patreon.com/natterstefan","https://www.paypal.me/natterstefan","https://www.buymeacoffee.com/natterstefan"],"categories":[],"sub_categories":[],"readme":"# speedtest-cron\n\n[![GitHub stars](https://img.shields.io/github/stars/natterstefan/speedtest-cron.svg)](https://github.com/natterstefan/speedtest-cron/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/natterstefan/speedtest-cron.svg)](https://github.com/natterstefan/speedtest-cron/network)\n[![GitHub issues](https://img.shields.io/github/issues/natterstefan/speedtest-cron.svg)](https://github.com/natterstefan/speedtest-cron/issues)\n[![Inspired by J0s3f](https://img.shields.io/badge/Inspired%20by-J0s3f-blue.svg)](https://gitgud.io/J0s3f/speedtest_cron)\n[![Twitter](https://img.shields.io/twitter/url/https/github.com/natterstefan/speedtest-cron.svg?style=social)](https://twitter.com/intent/tweet?text=https://github.com/natterstefan/speedtest-cron)\n[![Twitter Follow](https://img.shields.io/twitter/follow/natterstefan.svg?style=social\u0026label=Follow)](https://twitter.com/natterstefan)\n\nAn easy to use script test the speed (down-, upload and ping) of your ISP regularly (cronjob). [Inspired (Forked) by J0s3f's speedtest_cron on gitgud.io][jsspcr].\n\n## Idea\n\nTo run speedtests we use [speedtest-cli by Matt Martz][spcli]. For consistent results, always use the same test server. Regular tests can be used to identify trends.\n\nThe tests should be performed as close to the modem / router as possible. In any case I recommend you use a Ethernet (network) cable.\n\nIdeal would be the execution directly on your router. If it has a storage for storing the measurement data and has enough power to run Python, you should run the code on the router. Otherwise I recommend to use a RaspberryPi or similar, which is connected by cable to the router.\n\n## System Requirements\n\nA UNIX-like system with Python (at least 2.5) is required to run the scripts.\n\n### Submodule\n\nIf the folder `speedtest_cli` is empty run ```git submodule update --init```. It\nshould then checkout the commit with the hash `33e498beb30149ffe233b835cf1fcf012462d219`.\n\n#### Troubleshooting\n\nIf the initialization fails (eg. because of the \"`Permission denied (publickey).`\"\nerror), you have to follow the proposed solution here [#1](https://github.com/natterstefan/speedtest-cron/issues/1#issuecomment-440756964).\nThank you [kyletaylored](https://github.com/kyletaylored) for reporting the issue.\n\n## Installation\n\n### speedtest_cron\n\nWith `./speedtest_cron` you run the test. But before you run the script you should change the speedtest server.\n\nThe current server is ```5351``` (*UPC (Vienna, Austria)*). You can get a list of available servers by running ```./speedtest_cli/speedtest_cli.py --list```. Replace the serverId with the one you would like to use. In order to find the best one, I suggest you run a speedtest on [speedtest.net](speedtest) first and use the server they use.\n\nWith ``` `/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` ``` we get your current IP-Address and use it as the source for the speedtest. If you run into problems you can remove ```--source `/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'` ``` though.\n\n### speedtest_crontab\n\n_speedtest_cron_ should run regularly to be able to analyse trends. To do so you should add a cronjob to `/etc/crontab` or ```crontab -e```. Take a look at the _speedtest_crontab_ file and replace ```/path/to/this/folder/``` with the actual path.\n\n### speedtest_csv\n\nWith ```./speedcsv \u003e results.csv``` you generate a file of the generated results (one file per test in the speedtests folder). You can then further evaluate the results in a spreadsheet.\n\n### speedtest_ifttt\n\nAfter reading the \"[Use Raspberry Pi to Measure Broadband Speeds to Hold Your ISP Accountable][iftttmaker]\" article I decided to implemented [Aallan's work][gistaallan] here too. Because I would like to get either a push notification when the internet speed drops or add the result to a Google Spreadsheet automatically. This is how you use it:\n\n- rename ```example.cfg``` to ```speedtest.cfg```\n- setup the [maker channel on IFTTT][maker]\n- add an Applet [like this one][ifapplet]\n- add the secret key and event name to the `speedtest.cfg`\n- run the script ```./speedtest_ifttt```\n\n## Development\n\nImprovements, suggestions or bug fixes are very welcome. Just create a pull request.\n\nIf you have updated the submodule (eg. different release/commit), update it with:\n\n```bash\ngit submodule foreach --recursive 'git reset --hard'\n```\n\n## Similar projects\n\nThere are other projects available, like [speedtest-cli-extras by HenrikBengtsson][spclix], [speedtest-cron by vwillcox][vwillcox] or [speedtest-cron by brainTrain][brainTrain]. The last one makes use of [Google Spreadsheets and IFTTT's Maker][iftttmaker].\n\n [spcli]: https://github.com/sivel/speedtest-cli\n [spclix]: https://github.com/HenrikBengtsson/speedtest-cli-extras\n [vwillcox]: https://github.com/vwillcox/speedtest-cron\n [brainTrain]: https://github.com/brainTrain/speedtest-cron\n [speedtest]: http://www.speedtest.net/\n [jsspcr]: https://gitgud.io/J0s3f/speedtest_cron\n [iftttmaker]: http://makezine.com/projects/send-ticket-isp-when-your-internet-drops/\n [gistaallan]: https://gist.github.com/aallan/bafc70a347f3b9526d30\n [ifapplet]: https://ifttt.com/applets/49618185d-log-speedtest-results-to-spreadsheet\n [maker]: https://ifttt.com/maker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatterstefan%2Fspeedtest-cron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatterstefan%2Fspeedtest-cron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatterstefan%2Fspeedtest-cron/lists"}