From 36588f9275b87ba8d5b83380d2ba8df91b814b74 Mon Sep 17 00:00:00 2001 From: Andi Nitshce Date: Sat, 16 Apr 2016 09:03:16 +0200 Subject: [PATCH 1/2] fixed naming for multiple GPUs in amd_gpu_; adjusted lower limit for temperature to 20 --- plugins/gpu/amd_gpu_ | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/gpu/amd_gpu_ b/plugins/gpu/amd_gpu_ index 4f7095e0..bdfe54d7 100755 --- a/plugins/gpu/amd_gpu_ +++ b/plugins/gpu/amd_gpu_ @@ -109,14 +109,14 @@ if [ "$1" = "config" ]; then case $name in temp) echo 'graph_title GPU temperature' - echo 'graph_args -l 0 -u 120' + echo 'graph_args -l 20 -u 120' echo 'graph_vlabel Degrees (C)' echo 'graph_category gpu' echo "graph_info Temperature information for AMD GPUs" nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "* 0" | cut -f 1,3 --complement -d " "` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` echo "temp${nGpusCounter}.warning ${warning:-75}" echo "temp${nGpusCounter}.critical ${critical:-95}" echo "temp${nGpusCounter}.info Temperature information for $gpuName" @@ -143,7 +143,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "* 0" | cut -f 1,3 --complement -d " "` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` echo "memclock${nGpusCounter}.info Memory clock information for $gpuName" echo "memclock${nGpusCounter}.label Memory clock ($gpuName)" echo "coreclock${nGpusCounter}.info Core clock information for $gpuName" @@ -160,7 +160,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "* 0" | cut -f 1,3 --complement -d " "` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` echo "fan${nGpusCounter}.info Fan speed information for $gpuName" echo "fan${nGpusCounter}.label Fan speed ($gpuName)" : $(( nGpusCounter = $nGpusCounter + 1 )) @@ -175,7 +175,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "* 0" | cut -f 1,3 --complement -d " "` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` echo "load${nGpusCounter}.info Load information for $gpuName" echo "load${nGpusCounter}.label Load ($gpuName)" : $(( nGpusCounter = $nGpusCounter + 1 )) @@ -189,7 +189,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "* 0" | cut -f 1,3 --complement -d " "` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` echo "vcore${nGpusCounter}.info Vcore information for $gpuName" echo "vcore${nGpusCounter}.label Core voltage ($gpuName)" : $(( nGpusCounter = $nGpusCounter + 1 )) From 620526a2d8630811d14d252a5468e3646c1f03a3 Mon Sep 17 00:00:00 2001 From: Andi Nitsche Date: Thu, 8 Mar 2018 12:11:32 +0100 Subject: [PATCH 2/2] Update amd_gpu_ --- plugins/gpu/amd_gpu_ | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/gpu/amd_gpu_ b/plugins/gpu/amd_gpu_ index bdfe54d7..4accf67c 100755 --- a/plugins/gpu/amd_gpu_ +++ b/plugins/gpu/amd_gpu_ @@ -116,7 +116,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]+\ //'` echo "temp${nGpusCounter}.warning ${warning:-75}" echo "temp${nGpusCounter}.critical ${critical:-95}" echo "temp${nGpusCounter}.info Temperature information for $gpuName" @@ -143,7 +143,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]+\ //'` echo "memclock${nGpusCounter}.info Memory clock information for $gpuName" echo "memclock${nGpusCounter}.label Memory clock ($gpuName)" echo "coreclock${nGpusCounter}.info Core clock information for $gpuName" @@ -160,7 +160,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]+\ //'` echo "fan${nGpusCounter}.info Fan speed information for $gpuName" echo "fan${nGpusCounter}.label Fan speed ($gpuName)" : $(( nGpusCounter = $nGpusCounter + 1 )) @@ -175,7 +175,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]+\ //'` echo "load${nGpusCounter}.info Load information for $gpuName" echo "load${nGpusCounter}.label Load ($gpuName)" : $(( nGpusCounter = $nGpusCounter + 1 )) @@ -189,7 +189,7 @@ if [ "$1" = "config" ]; then nGpusCounter=0 while [ $nGpusCounter -lt $nGpus ] do - gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]\ //'` + gpuName=`echo "$nGpusOutput" | grep "\ $nGpusCounter\.\ " | cut -f 3 -d "." | sed -r 's/^[0-9]+\ //'` echo "vcore${nGpusCounter}.info Vcore information for $gpuName" echo "vcore${nGpusCounter}.label Core voltage ($gpuName)" : $(( nGpusCounter = $nGpusCounter + 1 ))