Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theelectronwill/nvml-sensor
Measure GPU and CPU energy consumption
https://github.com/theelectronwill/nvml-sensor
Last synced: about 1 month ago
JSON representation
Measure GPU and CPU energy consumption
- Host: GitHub
- URL: https://github.com/theelectronwill/nvml-sensor
- Owner: TheElectronWill
- License: eupl-1.2
- Created: 2024-07-30T06:51:09.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T07:26:06.000Z (4 months ago)
- Last Synced: 2024-07-31T10:41:26.069Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 46.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# NVML sensor
Small tool that retrieves data from NVML (NVIDIA Management Library), including:
- Number of device
- Info like brand, architecture, driver version
- instantaneous power and energy consumption since last measurement
- Other metrics like utilizationThe sensor deals with overflows. All results are saved in CSV files.
CPU consumption is also returned, based on [this minimal yet rigorous RAPL-based measurement tool](https://github.com/TheElectronWill/cpu-energy-consumption-comparative-analysis).
You can think of this tool as a preliminary version of [Alumet](https://github.com/alumet-dev/alumet).
# Install
You need to clone both this repository _and_ the minimal tool.
Rename `cpu-energy-consumption-comparative-analysis` to `rapl-ebpf-experiments`.## Rust setup
If you haven't installed Rust yet, use Rustup to setup all the necessary tools:
```
curl https://sh.rustup.rs -sSf | sh# if need to uninstall, do rustup self uninstall
```## Compile in release mode and run
```
cargo build --release
mkdir "$HOME/nvml-sensors-results"
sudo -E target/release/nvml_sensor --result-dir "$HOME/nvml-sensor-results" --period-seconds 1 &pid=$!
echo "Sensors running with pid $pid"
sleep 10
kill $pid
```Note that super-user privileges are required to run the tool.