View Single Post
Old 06-27-08, 04:29 AM   #7
BSDMare
FreeBSD 7.0 User
 
Join Date: Nov 2007
Posts: 13
Default Re: GPU core temp (where to get it?)

It's Unix... there are a lot of ways to achieve what you are after.

I use conky to display my cpu/gpu temps, with a bit of sed/awk/cut twiddling you can get just the value you want.

Code:
nvidia-settings -q GPUCoreTemp | grep HOSTNAME | sed s/\ \ Attribute\ \'GPUCoreTemp\'\ \(HOSTNAME:0.0\):\ //

or

nvidia-settings -q GPUCoreTemp | grep HOSTNAME | awk -F ":\ " '{print $2}'

or

nvidia-settings -q GPUCoreTemp | grep HOSTNAME | cut -d":" -f3
For example will echo just the temp number itself. Obviously replace the HOSTNAME bit with your machines hostname.

Having it as a sysctl would be the most ideal option though, the reason I did the above was because it was missing in sysctl. If you wanted to do something similar with a c/c++ app then you could have a look at how the nvidia-settings app does it, the source code is available for it though obviously if you are going to nab some code remember :

Code:
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of Version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
So your 'freedom' is limited

*hides from linux users*
BSDMare is offline   Reply With Quote