Since installing nvidia-prime and nvidia-370.28 I have been attempting to get the GPU temp to display on the panel.
My first effort was to use lm-sensors. That failed because Neon User Edition with the nvidia gpu controlling the display will not allow it to stay in memory. And, the widget that I downloaded in 16.04 to use with lm-sensors will not display in the widget list in Neon after I download it.
So, I began looking for nvidia source code that I could raid to create my own tool. I found nvidia-smi.
Just issuing nvidia-smi gives:
Issuing nvidia-smi -q -d TEMPERATURE -l 2 gives a two second loop of:
Neither of these are satisfactory. However, I can scrape the standard output with
nvidia-smi | grep '[0-9][0-9]C' | awk '{print $3}' | sed 's/C//' and it returns just the temperature on a single line:
:~$ nvidia-smi | grep '[0-9][0-9]C' | awk '{print $3}' | sed 's/C//'
Anyone know of a simple way to get that value to display in a box on the panel?
My first effort was to use lm-sensors. That failed because Neon User Edition with the nvidia gpu controlling the display will not allow it to stay in memory. And, the widget that I downloaded in 16.04 to use with lm-sensors will not display in the widget list in Neon after I download it.
So, I began looking for nvidia source code that I could raid to create my own tool. I found nvidia-smi.
Just issuing nvidia-smi gives:
Code:
:~$ nvidia-smi Thu Nov 3 11:41:25 2016 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 370.28 Driver Version: 370.28 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GT 650M Off | 0000:01:00.0 N/A | N/A | | N/A 30C P8 N/A / N/A | 158MiB / 1998MiB | N/A Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 Not Supported | +-----------------------------------------------------------------------------+
Code:
==============NVSMI LOG============== Timestamp : Thu Nov 3 11:59:19 2016 Driver Version : 370.28 Attached GPUs : 1 GPU 0000:01:00.0 Temperature GPU Current Temp : 31 C GPU Shutdown Temp : N/A GPU Slowdown Temp : N/A
nvidia-smi | grep '[0-9][0-9]C' | awk '{print $3}' | sed 's/C//' and it returns just the temperature on a single line:
:~$ nvidia-smi | grep '[0-9][0-9]C' | awk '{print $3}' | sed 's/C//'
Code:
34
Comment