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

New: GPU utilization

This commit is contained in:
Nils 2018-02-22 12:58:21 +01:00
parent 5c08e0744c
commit a5ccb70da9

View File

@ -37,8 +37,7 @@ C<ln -s /usr/share/munin/plugins/nvidia_gpu_ /etc/munin/plugins/nvidia_gpu_temp>
=item *
Add support for specific professional GPU features such as number of compute
processes, clocks, power draw, utilization, and so on.
Add support for specific professional GPU features such as number of compute processes, clocks and so on.
=item *
@ -87,6 +86,7 @@ if [ "$1" = "suggest" ]; then
echo "mem"
echo "fan"
echo "power"
echo "utilization"
exit 0
fi
@ -176,6 +176,20 @@ if [ "$1" = "config" ]; then
: $((nGpusCounter=nGpusCounter+1))
done
;;
utilization)
echo 'graph_title GPU utilization'
echo 'graph_args -l 0 -u 100'
echo 'graph_vlabel Percentage'
echo 'graph_category sensors'
echo "graph_info GPU utilization 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 "utilization${nGpusCounter}.info GPU utilization information for $gpuName"
: $((nGpusCounter=nGpusCounter+1))
done
;;
*)
echo "Can't run without a proper symlink. Exiting."
echo "Try running munin-node-configure --suggest."
@ -222,6 +236,9 @@ case $name in
power)
valueGpus=$(echo "$smiOutput" | grep "Power Draw" | cut -d ':' -f 2 | cut -d ' ' -f 2)
;;
utilization)
valueGpus=$(echo "$smiOutput" | grep "Gpu" | cut -d ':' -f 2 | cut -d ' ' -f 2)
;;
*)
echo "Can't run without a proper symlink. Exiting."
echo "Try running munin-node-configure --suggest."