Skip to content

CICD-468 · GPU utilization reporting ​

Encyclopedia · FinOps and resource optimization · All snippets

Previous · CICD-467 · Next · CICD-469

1. Where it fits ​

  • Placement GPU metrics report.
  • Prerequisites authorized read reports, explicit pricing period and reviewed ownership for cleanup.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
nvidia-smi --query-gpu=name,utilization.gpu,utilization.memory,power.draw --format=csv -lms 500 -f gpu-utilization.csv

3. How it works ​

The NVIDIA tool reads hardware and driver counters visible in this execution environment.

4. Verify the result ​

Run for a bounded interval alongside a fixed workload. Utilization samples and memory bandwidth are different measures from allocated memory.

Validation syntax-validated (Bash parse). Status definitions.