{"id":19680629,"url":"https://github.com/rojenzaman/speedtestdjournal","last_synced_at":"2026-05-09T05:03:39.111Z","repository":{"id":162169633,"uuid":"315472565","full_name":"rojenzaman/speedtestdjournal","owner":"rojenzaman","description":"speedtest-cli journal for cron or any daemon","archived":false,"fork":false,"pushed_at":"2022-11-12T23:12:33.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T06:50:17.786Z","etag":null,"topics":["bash","bash-script","daemon","gnu","gnu-linux","html-generator","journaling","json","speedtest","speedtest-cli","speedtest-net","systemd"],"latest_commit_sha":null,"homepage":"https://rojenzaman.github.io/speedtestdjournal.html","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rojenzaman.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}},"created_at":"2020-11-24T00:11:22.000Z","updated_at":"2023-07-07T22:17:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c124509-def6-4c0b-99e1-fead1e291068","html_url":"https://github.com/rojenzaman/speedtestdjournal","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rojenzaman/speedtestdjournal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojenzaman%2Fspeedtestdjournal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojenzaman%2Fspeedtestdjournal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojenzaman%2Fspeedtestdjournal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojenzaman%2Fspeedtestdjournal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rojenzaman","download_url":"https://codeload.github.com/rojenzaman/speedtestdjournal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rojenzaman%2Fspeedtestdjournal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","bash-script","daemon","gnu","gnu-linux","html-generator","journaling","json","speedtest","speedtest-cli","speedtest-net","systemd"],"created_at":"2024-11-11T18:05:36.165Z","updated_at":"2026-05-09T05:03:39.094Z","avatar_url":"https://github.com/rojenzaman.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# speedtestdjournal\nspeedtest-cli Journalist for Cron or any Daemon.\n\nThis script create speedtest-cli journals as json and image data and it can also print them as [html](https://rojenzaman.github.io/speedtestdjournal.html).\n\n*speedtestdjournal uses **speedtest.net** tool of `speedtest-cli`, please read [Privacy Policy](https://www.speedtest.net/about/privacy) before perform this script in your system.*\n\n## Journaling Format\n\n### tree of /var/log/speedtestdjournal/\n\n```\n.\n├── image\n│   ├── 2020-11-24_00-59.png\n│   └── 2020-11-24_01-26.png\n├── json\n│   ├── 2020-11-24_00-59.json\n│   └── 2020-11-24_01-26.json\n├── log.json\n└── README\n\n```\n\n### log.json\n\n```\n{\"json_file\":\"2020-11-24_00-59.json\",\"png_file\":\"2020-11-24_00-59.png\",\"timestamp\":\"1606175962\", \"remote_png\":\"http://www.speedtest.net/result/10471496503.png\"}\n{\"json_file\":\"2020-11-24_01-26.json\",\"png_file\":\"2020-11-24_01-26.png\",\"timestamp\":\"1606177577\", \"remote_png\":\"http://www.speedtest.net/result/10471582209.png\"}\n```\n\n\n## Install\n\nSwitch to [non-root user](#non-root-user) section for rootless setup.\n\nGo to your prefer script path (such as in here /usr/bin) and install it:\n```\n# wget -O /usr/bin/speedtestdjournal.sh https://raw.githubusercontent.com/rojenzaman/speedtestdjournal/main/speedtestdjournal.sh\n# chmod 755 /usr/bin/speedtestdjournal.sh\n```\n\n\n## Set Journal Path (log files path)\nIn default journal path is under home directory as `$HOME/speedtestdjournal/`. We suggest `/var/log/speedtestdjournal/` directory for posixly. This is require root user, and run with root.\nChange it:\n```bash\njournal_path=/var/log/speedtestdjournal # go to line 20 and set journal_path string to /var/log/speedtestdjournal\n```\n\n## Create Daemon\nNow we create speed test daemon to run every an hour. You can change the per time value.\n\n### Way 1 - Set as a Crontab\nSet crontab to perform automate, it is good idea to logging. \nYou can set @weekly @hourly @monthly @daily or any cron param.\n```\n# crontab -e\n@hourly /usr/bin/speedtestdjournal.sh\n```\n\n### Way 2 - Systemd Service\nCreate systemd service to perform automate, it is good idea to logging. \n\nGet service file\n```\n# curl -O https://raw.githubusercontent.com/rojenzaman/speedtestdjournal/main/speedtestjournal.service\n```\nCopy it to systemd service files directory, and give correct permission to the file.\n```\n# cp speedtestjournal.service /etc/systemd/system/\n# chmod 644 /etc/systemd/system/speedtestjournal.service\n```\nReload and reexec the systemd services:\n```\n# systemctl daemon-reexec\n# systemctl daemon-reload\n```\nStart service\n```\n# systemctl start speedtestjournal.service\n```\nCheck it\n```\n# systemctl status speedtestjournal.service\n```\nView journalctl log\n```\n# journalctl -u speedtestjournal.service\n```\n\n\n## Speedtest-cli Configuration\n```bash\n#usr_arg=\"--no-download\"                                # uncomment if you want do not perform download test\n#usr_arg=\"--no-upload\"                                  # uncomment if you want do not perform upload test\n#usr_arg2=\"\"                                            # set any speedtest-cli argument if you want\n#server=\"--server SERVER\"                               # specify a server ID to test against.\nshare=\"--share\"                                         # if you don't want create image files from speedtest.net uncomment this\n#exclude=\"--exclude EXCLUDE\"                            # exclude a server from selection. Can be supplied multiple times\n#ssl=\"--secure\"                                         # use HTTPS instead of HTTP when communicating with speedtest.net operated servers\n```\n\u003e Note: This script can understand if the cli command is speedtest-cli or speedtest.py\n\n\n## Simple Usage\n\n```\n# speedtestdjournal.sh -h\nusage: ./speedtestdjournal.sh [-v] [-p|-i|-l] [-h]\n -v\tverbose output\n -p\tprint journals as html file (image gallery)\n -i\tdownload png files from /var/log/speedtestdjournal/log.json\n -l\tlist all speedtest results as table from /var/log/speedtestdjournal/json/*.json\n -h\tdisplay help page\n```\n\nFor get instant speed test just type:\n\n```\n# speedtestdjournal.sh\n```\nAnd get it:\n\n```\n# speedtestdjournal.sh -l | tail -1\n```\n\n\n## Functions\n\n\n### Print Test Results as HTML From Journal\nAn example at here [speedtestdjournal.html](https://rojenzaman.github.io/speedtestdjournal.html)\n```\n# speedtestdjournal.sh -p \u003e output.html\n```\n\n\n### Verbosing\n```\n# speedtestdjournal.sh -v\n```\nor\n\n```\n# speedtestdjournal.sh -v -p\n```\n\n### Download PNG files\n\ndownload png files from log.json\n\n```bash\n# speedtestdjournal.sh -i  # if image exist will skip\n```\n\n### List Results as Table (template)\n\nlist all speedtest results as table from speedtestdjournal/json/*.json\n\n```\n# speedtestdjournal.sh -l\nDOWNLOADS\tUPLOADS\n   9.39M\t 829.62K\n  12.87M\t 781.28K\n  12.54M\t 791.03K\n  12.74M\t 829.52K\n  12.76M\t 661.64K\n  12.87M\t 793.82K\n  12.67M\t 681.81K\n```\n\n## Non-Root User\n\nGo to your user PATH\n```\n$ cd ~/bin\n```\nor\n```\n$ cd ~/.local/bin\n```\nAnd download it.\n```\n$ wget https://raw.githubusercontent.com/rojenzaman/speedtestdjournal/main/speedtestdjournal.sh\n$ chmod 750 speedtestdjournal.sh\n```\nYou can run now, the journal path is `$HOME/speedtestdjournal`. It is under home directory, you can change this with **journal_path** string.\nFinally create crontab:\n```\n$ crontab -e\n@hourly /home/YOURUSERNAME/bin/speedtestdjournal.sh\n```\n\n\n## TODO\n* Print html with detailed tables\n* Beauty html\n* Json parsing html\n* Create POSIX-SH Compliant version\n* Require testing under OS X and BSD unix\n\n### Contribution\nPlease go to `Issues` or `Pull requests`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frojenzaman%2Fspeedtestdjournal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frojenzaman%2Fspeedtestdjournal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frojenzaman%2Fspeedtestdjournal/lists"}