mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 22:25:23 +00:00
Merge pull request #836 from qji77/master
nvidia_gpu_: + power consumption (nvidia_gpu_power)
This commit is contained in:
commit
57661e0f96
2 changed files with 18 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
.*.swp
|
.*.swp
|
||||||
|
*~
|
||||||
|
|
|
@ -86,6 +86,7 @@ if [ "$1" = "suggest" ]; then
|
||||||
echo "temp"
|
echo "temp"
|
||||||
echo "mem"
|
echo "mem"
|
||||||
echo "fan"
|
echo "fan"
|
||||||
|
echo "power"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -162,6 +163,19 @@ if [ "$1" = "config" ]; then
|
||||||
: $(( nGpusCounter = $nGpusCounter + 1 ))
|
: $(( nGpusCounter = $nGpusCounter + 1 ))
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
power)
|
||||||
|
echo 'graph_title GPU power consumption'
|
||||||
|
echo 'graph_vlabel Watt'
|
||||||
|
echo 'graph_category sensors'
|
||||||
|
echo "graph_info power consumption of NVIDIA GPUs using driver version $driverVersion"
|
||||||
|
nGpusCounter=0
|
||||||
|
while [ $nGpusCounter -lt $nGpus ]
|
||||||
|
do
|
||||||
|
gpuName=`echo "$nGpusOutput" | sed -n $(( $nGpusCounter + 1 ))p | cut -d \( -f 1`
|
||||||
|
echo "power${nGpusCounter}.info power consumption of $gpuName"
|
||||||
|
: $(( nGpusCounter = $nGpusCounter + 1 ))
|
||||||
|
done
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Can't run without a proper symlink. Exiting."
|
echo "Can't run without a proper symlink. Exiting."
|
||||||
echo "Try running munin-node-configure --suggest."
|
echo "Try running munin-node-configure --suggest."
|
||||||
|
@ -205,6 +219,9 @@ case $name in
|
||||||
fan)
|
fan)
|
||||||
valueGpus=`echo "$smiOutput" | grep "Fan Speed" | cut -d ':' -f 2 | cut -d ' ' -f 2`
|
valueGpus=`echo "$smiOutput" | grep "Fan Speed" | cut -d ':' -f 2 | cut -d ' ' -f 2`
|
||||||
;;
|
;;
|
||||||
|
power)
|
||||||
|
valueGpus=`echo "$smiOutput" | grep "Power Draw" | cut -d ':' -f 2 | cut -d ' ' -f 2`
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Can't run without a proper symlink. Exiting."
|
echo "Can't run without a proper symlink. Exiting."
|
||||||
echo "Try running munin-node-configure --suggest."
|
echo "Try running munin-node-configure --suggest."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue