{"id":48356792,"url":"https://github.com/green-coding-solutions/gmt-helpers","last_synced_at":"2026-04-05T11:33:37.976Z","repository":{"id":312101520,"uuid":"951161760","full_name":"green-coding-solutions/gmt-helpers","owner":"green-coding-solutions","description":"Some small helper scripts that help admin the GMT cluster, we deem optional and do not want to keep in the main repository","archived":false,"fork":false,"pushed_at":"2026-03-21T06:27:20.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-21T22:28:04.330Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/green-coding-solutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-19T08:57:46.000Z","updated_at":"2026-03-21T06:27:24.000Z","dependencies_parsed_at":"2025-12-09T15:03:23.816Z","dependency_job_id":null,"html_url":"https://github.com/green-coding-solutions/gmt-helpers","commit_stats":null,"previous_names":["green-coding-solutions/gmt-helpers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/green-coding-solutions/gmt-helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-coding-solutions%2Fgmt-helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-coding-solutions%2Fgmt-helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-coding-solutions%2Fgmt-helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-coding-solutions%2Fgmt-helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/green-coding-solutions","download_url":"https://codeload.github.com/green-coding-solutions/gmt-helpers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/green-coding-solutions%2Fgmt-helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31434624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-04-05T11:33:37.337Z","updated_at":"2026-04-05T11:33:37.966Z","avatar_url":"https://github.com/green-coding-solutions.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this repo?\n\nThe GMT-Helpers repo contains small scripts that help with operating the [Green Metrics Tool](https://github.com/green-coding-solutions/green-metrics-tool/) either \nin a user role or a cluster admin role.\n\n## Guarantees and testing\n\nThe scripts in this folder are partially contributed by the community and have no current maintainer or unit-tests to check their validity.\n\nThey might be outdated so be sure that they do not come with the same expectations as GMT itself. They **should** work, but also might need some minor tweaks to work in your environment\nas they have only been developed in tested in a \"works for me\" fashion.\n\n## Installation\n\nMost scripts can be executed only when the Python venv of the Green Metrics Tool is active.\n\nThis means typically a call like this:\n\n`$ /home/user/green-metrics-tool/venv/bin/python3 /home/user/gmt-helpers/nginx/send_log_report.py`\n\nThese calls can then be used directly in the `crontab` or your cron manager of choice.\n\nSome other scripts are manually executable like for instance `submit_software.py` and some other must be installed as service. The info is given in the respective info box for the script.\n\n# Scripts\n\n## wake_measurement_machine.py\n*Direct Execution*\n\nIf you use Wake-on-LAN for your measurement machines to save energy in the cluster you can use this script to start a machine as soon as a job was submitted to the API.\n\n## submit_software.py\n*Direct Execution*\n\nA little script that enables you to submit jobs to the cluster from the shell. You will need to have `requests` installed. Otherwise run `pip install requests`.\n\n## nginx/send_log_report.py\n*venv Execution*\n\nYou need to make the nginx logs from the previous day readable to the script either by copying them out somewhere or changing the `chmod` in place.\nExample cronjob if you run nginx outside of the containers as `www-data`: \n```cron\n15 0 * * * chmod 644 /var/log/nginx/access.log.1\n16 0 * * * chmod 644 /var/log/nginx/error.log.1\n```\n\nExample cronjob then for python to run the script: `$ /home/user/green-metrics-tool/venv/bin/python3 /home/user/gmt-helpers/nginx/send_log_report.py`\n\n## db/consistency.py\n*venv Execution*\n\nYou need to create the following files from the `.example` files:\n\n- `db/queries_check_empty.sql`: Contains queries separated by *\\n-------\\n* that should result in empty result. Otherwise warning email is sent to configured error email address of GMT.\n- `db/queries_info.sql`: Reports result via email from query if no empty result is returned to configured error email address of GMT.\n\nExample cronjob then for python to run the script: `$ /home/user/green-metrics-tool/venv/bin/python3 /home/user/gmt-helpers/db/check_consistency.py`\n\n## wol-webserver\n*Service Execution*\n\nIf you need to wake a machine from the outside inside your local network you can use this ingress\nscript to transport a connect to a webserver to WoL command\n\n\n# Contributing\n\nWe love contributions. All scripts in this folder are licensed as MIT and if you contribute you agree to this license.\n\nNote that this license is different from the GMT license itself (AGPLv3)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreen-coding-solutions%2Fgmt-helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreen-coding-solutions%2Fgmt-helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreen-coding-solutions%2Fgmt-helpers/lists"}