{"id":17843877,"url":"https://github.com/jdrouet/docker-activity","last_synced_at":"2025-09-29T03:31:06.812Z","repository":{"id":37378097,"uuid":"425020944","full_name":"jdrouet/docker-activity","owner":"jdrouet","description":"Tool to monitor the statistics and the energy consumption of docker containers","archived":false,"fork":false,"pushed_at":"2023-03-02T04:00:40.000Z","size":287,"stargazers_count":56,"open_issues_count":9,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-13T00:32:08.783Z","etag":null,"topics":["docker","energy-consumption","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdrouet.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}},"created_at":"2021-11-05T16:50:00.000Z","updated_at":"2024-11-20T07:08:06.000Z","dependencies_parsed_at":"2023-02-16T03:16:01.893Z","dependency_job_id":null,"html_url":"https://github.com/jdrouet/docker-activity","commit_stats":{"total_commits":100,"total_committers":3,"mean_commits":"33.333333333333336","dds":"0.43000000000000005","last_synced_commit":"a8cfd601b5df511e6ee6cd4475e42b4b21bddab2"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdrouet%2Fdocker-activity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdrouet%2Fdocker-activity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdrouet%2Fdocker-activity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdrouet%2Fdocker-activity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdrouet","download_url":"https://codeload.github.com/jdrouet/docker-activity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234583691,"owners_count":18856280,"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":["docker","energy-consumption","rust"],"created_at":"2024-10-27T21:27:10.530Z","updated_at":"2025-09-29T03:31:06.475Z","avatar_url":"https://github.com/jdrouet.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Activity\n\nDocker activity is a tool to monitor the statistics of your containers and output their energy consumption.\n\n**Warning** It's still in early stage, for demoing, it's going to be nicer soon...\n\nTo be able to use docker-activity, you need access to the docker engine socket and, if you want some power\nconsumption information, you need to have access to `/sys/class/powercap`.\n\n**The power consumption module only works on software compatible with Intel RAPL (Intel and AMD).**\n\n## Build and use\n\n```bash\n# Build the project in release mode\ncargo build --release\n# Start as root\nsudo ./target/release/docker-activity tcp-socket 1.2.3.4:56\n# Get some help\n./target/release/docker-activity --help\n```\n\n## Build and use with docker\n\n```bash\n# Build docker image (optional)\ndocker build -t jdrouet/docker-activity .\n# Run it\ndocker run \\\n\t-v /sys/class/powercap:/sys/class/powercap:ro \\\n\t-v /var/run/docker.sock:/var/run/docker.sock \\\n\t-v ./output:/output \\\n\tjdrouet/docker-activity tcp-socket 1.2.3.4:56\n```\n\n## Interfacing with Prometheus\n\n`docker-activity` doesn't have any complex output system. You should rely on other tools to export the data somewhere.\n\nIn [the example](./example/docker-compose.yml), you can see how to interface `docker-activity` with [Vector](https://vector.dev)\nin order to export that data to [Prometheus](https://prometheus.io) or any other tool.\n\n![Example in prometheus](./example/prometheus-screenshot.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdrouet%2Fdocker-activity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdrouet%2Fdocker-activity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdrouet%2Fdocker-activity/lists"}