A while back I wrote a script to use nvidia-settings to get the core and ambient temperatures from the three GTX465 video cards in my system. All the way up until today it has worked great and is currently tied in with conky to show the temps. Today when I upgraded my nvidia module and the corresponding package the script broke.
After much poking around I found the syntax had changed slightly. Using the old syntax to get the temperature from say thermalsensors:0 I would have used:
nvidia-settings -t -q kaon:0[thermalsensor:0]/ThermalSensorReading
With the new nvidia-settings the syntax is:
nvidia-settings -t -q [thermalsensor:0]/ThermalSensorReading
It seems it now chokes on the inclusion of the display (kaon:0 in this case) yet the documentation and man page still refer to its usage. To wrap things up since I was making changes I decided to directly address the gpus instead of the thermal sensors. This should keep my data more in line and reliable to what I think it correlates to. Here is the finished product:
#!/bin/bash
# Get and return GPU and ambient temp readings from the 3 Nvidia cards
arrayTEMP=( $(nvidia-settings -t \
-q [gpu:0]/GPUCoreTemp \
-q [gpu:0]/GPUAmbientTemp \
-q [gpu:1]/GPUCoreTemp \
-q [gpu:1]/GPUAmbientTemp \
-q [gpu:2]/GPUCoreTemp \
-q [gpu:2]/GPUAmbientTemp \
2> /dev/null) )
echo -e "GeForce GTX465 0"
echo -e " Core ------------ ${arrayTEMP[0]}"
echo -e " Ambient ---------- ${arrayTEMP[1]}"
echo -e "GeForce GTX465 1"
echo -e " Core ------------ ${arrayTEMP[2]}"
echo -e " Ambient ---------- ${arrayTEMP[3]}"
echo -e "GeForce GTX465 2"
echo -e " Core ------------ ${arrayTEMP[4]}"
echo -e " Ambient ---------- ${arrayTEMP[5]}"