Projet

Général

Profil

Révision 49312192

ID493121924ac913404caec8c8e8baca494e2e670f
Parent 24e77a26
Enfant aad8d7fb

Ajouté par leeclemens il y a environ 11 ans

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.

Voir les différences:

plugins/gpu/nvidia_gpu_
186 186
# Get requested value
187 187
case $name in
188 188
	temp)
189
		valueGpus=`echo "$smiOutput" | grep -A 1 "Temperature" | grep "Gpu" | cut -d : -f 2 | cut -d ' ' -f 2`
189
		valueGpus=`echo "$smiOutput" | grep -A 1 "Temperature" | grep -i "Gpu" | cut -d : -f 2 | cut -d ' ' -f 2`
190 190
		;;
191 191
	mem)
192 192
		totalMemGpus=`echo "$smiOutput" | grep -A 3 "Memory Usage" | grep "Total" | cut -d : -f 2 | cut -d ' ' -f 2`

Formats disponibles : Unified diff