From 493121924ac913404caec8c8e8baca494e2e670f Mon Sep 17 00:00:00 2001 From: leeclemens Date: Mon, 15 Sep 2014 17:35:15 -0400 Subject: [PATCH] Use case insensitive grep for Temp lines xorg-x11-drv-nvidia-340.29-1.el6.x86_64 (CUDA 6.5?) seems to have changed the Temperature lines from "Gpu" to "GPU" prefixes. Case insensitive grep preserves backwards comatability. --- plugins/gpu/nvidia_gpu_ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gpu/nvidia_gpu_ b/plugins/gpu/nvidia_gpu_ index 77797097..9fda785d 100755 --- a/plugins/gpu/nvidia_gpu_ +++ b/plugins/gpu/nvidia_gpu_ @@ -186,7 +186,7 @@ fi # Get requested value case $name in temp) - valueGpus=`echo "$smiOutput" | grep -A 1 "Temperature" | grep "Gpu" | cut -d : -f 2 | cut -d ' ' -f 2` + valueGpus=`echo "$smiOutput" | grep -A 1 "Temperature" | grep -i "Gpu" | cut -d : -f 2 | cut -d ' ' -f 2` ;; mem) totalMemGpus=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Total" | cut -d : -f 2 | cut -d ' ' -f 2`