Crates.io | docker-activity |
lib.rs | docker-activity |
version | 1.0.0 |
source | src |
created_at | 2021-12-01 19:26:46.460752 |
updated_at | 2021-12-01 19:26:46.460752 |
description | Tool to monitor the statistics and the energy consumption of docker containers. |
homepage | |
repository | https://github.com/jdrouet/docker-activity |
max_upload_size | |
id | 490411 |
size | 93,891 |
Docker activity is a tool to monitor the statistics of your containers and output their energy consumption.
Warning It's still in early stage, for demoing, it's going to be nicer soon...
To be able to use docker-activity, you need access to the docker engine socket and, if you want some power
consumption information, you need to have access to /sys/class/powercap
.
The power consumption module only works on software compatible with Intel RAPL (Intel and AMD).
# Build the project in release mode
cargo build --release
# Start as root
sudo ./target/release/docker-activity tcp-socket 1.2.3.4:56
# Get some help
./target/release/docker-activity --help
# Build docker image (optional)
docker build -t jdrouet/docker-activity .
# Run it
docker run \
-v /sys/class/powercap:/sys/class/powercap:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./output:/output \
jdrouet/docker-activity tcp-socket 1.2.3.4:56
docker-activity
doesn't have any complex output system. You should rely on other tools to export the data somewhere.
In the example, you can see how to interface docker-activity
with Vector
in order to export that data to Prometheus or any other tool.