Skip to content

Commit

Permalink
Add script for power levels
Browse files Browse the repository at this point in the history
  • Loading branch information
krobertson committed Apr 8, 2024
1 parent 6f089d9 commit cdeac50
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions apps/nvidia-gpu-exporter/setpowerlevel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

if ! test -f $1; then
exit 0
fi

count=$(yq '.limits | length' $1)
eval "$(yq -o=shell $1)"

for i in $(seq 0 $((count-1)));
do
pl=limits_$i
nvidia-smi -i $i -pl ${!pl}
done

sleep infinity

0 comments on commit cdeac50

Please sign in to comment.