summaryrefslogtreecommitdiffstats
path: root/abs/core/xymon/xymon-gputemp.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/xymon/xymon-gputemp.sh')
-rw-r--r--abs/core/xymon/xymon-gputemp.sh24
1 files changed, 15 insertions, 9 deletions
diff --git a/abs/core/xymon/xymon-gputemp.sh b/abs/core/xymon/xymon-gputemp.sh
index f8af649..db76f78 100644
--- a/abs/core/xymon/xymon-gputemp.sh
+++ b/abs/core/xymon/xymon-gputemp.sh
@@ -17,7 +17,10 @@ if ! test -x /usr/bin/nvidia-smi ; then
fi
# Use NVidia SMI to determine the model
-gpu_model=`nvidia-smi -L`
+#gpu_model=`nvidia-smi -L`
+# Use lspci to determine the model
+gpu_model=`lspci | grep -i vga | grep -vi non-vga| sort -r | head -n 1 | cut -d: -f3`
+
if test -z "$gpu_model" ; then
$XYMON $XYMSRV "status $MACHINE.gputemp $gpu_color `date`
Couldn't find nVidia card
@@ -29,24 +32,27 @@ if test -z "$gpu_model" ; then
fi
# Determine GPU maximum temperature based on GPU model
-if test $(echo $gpu_model | grep -c -i 'GeForce 210') -eq 0 ; then
+if test $(echo $gpu_model | grep -c -i 'GeForce 210') -eq 1 ; then
# GT 210 maximum GPU temperature is 105 C
max_temp=105
-elif test $(echo $gpu_model | grep -c -i 'GeForce 220') -eq 0 ; then
+elif test $(echo $gpu_model | grep -c -i 'GeForce 220') -eq 1 ; then
# GT 220 maximum GPU temperature is 105 C
max_temp=105
-elif test $(echo $gpu_model | grep -c -i 'GeForce 240') -eq 0 ; then
+elif test $(echo $gpu_model | grep -c -i 'GeForce 240') -eq 1 ; then
# GT 240 maximum GPU temperature is 105 C
max_temp=105
-elif test $(echo $gpu_model | grep -c -i 'GeForce 430') -eq 0 ; then
+elif test $(echo $gpu_model | grep -c -i 'GeForce 430') -eq 1 ; then
# GT 430 maximum GPU temperature is 98 C
max_temp=98
-elif test $(echo $gpu_model | grep -c -i 'GeForce GTS 450') -eq 0 ; then
+elif test $(echo $gpu_model | grep -c -i 'GeForce GTS 450') -eq 1 ; then
# GTS 450 maximum GPU temperature is 100 C
max_temp=100
-elif test $(echo $gpu_model | grep -c -i 'GeForce GT 520') -eq 0 ; then
+elif test $(echo $gpu_model | grep -c -i 'GeForce GT 520') -eq 1 ; then
# GT 520 maximum GPU temperature is 102 C
max_temp=102
+elif test $(echo $gpu_model | grep -c -i 'GeForce GT 710') -eq 1 ; then
+ # GT 710 maximum GPU temperature is 95 C
+ max_temp=95
else
# Assume 100 is the maximum
max_temp=100
@@ -72,8 +78,8 @@ if test -x /usr/bin/nvidia-smi ; then
#`cat /tmp/gputemp.txt`
#"
$XYMON $XYMSRV "status $MACHINE.gputemp $gpu_color `date`
- GPU model is $gpu_model
- max temp is $max_temp
+ GPU Model -$gpu_model
+ GPU Max Temp (C) - $max_temp
GPUTEMP : $gpu_temp
"