2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

nvidia_gpu_: + power consumption (nvidia_gpu_power)

This commit is contained in:
Robert Kulyassa 2017-04-18 18:32:03 +02:00
parent 87b20d70e4
commit 59361d6cab

View File

@ -86,6 +86,7 @@ if [ "$1" = "suggest" ]; then
echo "temp"
echo "mem"
echo "fan"
echo "power"
exit 0
fi
@ -162,6 +163,19 @@ if [ "$1" = "config" ]; then
: $(( nGpusCounter = $nGpusCounter + 1 ))
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 "Try running munin-node-configure --suggest."
@ -205,6 +219,9 @@ case $name in
fan)
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 "Try running munin-node-configure --suggest."