nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA FreeBSD (http://www.nvnews.net/vbulletin/forumdisplay.php?f=47)
-   -   GPU core temp (where to get it?) (http://www.nvnews.net/vbulletin/showthread.php?t=115400)

gnemmi 06-25-08 09:11 PM

GPU core temp (where to get it?)
Can anyone point me to the origin/source/command/file/unameit from where nvidia-settings gets the core temp for the GPU?

sysctl doesn't report a thing about it (or at least I was dumb enough not to see it) but nvidia-setting does indeed report it .. so that value _is_ there somewhere ...

I'd like to perl something to get every temp reading on my system, but the GPU core temp is the only thing that I don't know where to get from :(

For the record:
[gonzalo@inferna ~]% sysctl -a | grep nvidia
hw.nvidia.version: NVIDIA UNIX x86 Kernel Module 173.14.09 Wed Jun 4 11:26:01 PDT 2008
hw.nvidia.registry.EnableVia4x: 0
hw.nvidia.registry.EnableALiAGP: 0
hw.nvidia.registry.NvAGP: 1
hw.nvidia.registry.ReqAGPRate: 15
hw.nvidia.registry.EnableAGPSBA: 0
hw.nvidia.registry.EnableAGPFW: 0
hw.nvidia.registry.Mobile: 4294967295
hw.nvidia.registry.ResmanDebugLevel: 4294967295
hw.nvidia.registry.RmLogonRC: 1
hw.nvidia.registry.ModifyDeviceFiles: 1
hw.nvidia.registry.DeviceFileUID: 0
hw.nvidia.registry.DeviceFileGID: 0
hw.nvidia.registry.DeviceFileMode: 438
hw.nvidia.registry.RemapLimit: 0
hw.nvidia.registry.UpdateMemoryTypes: 4294967295
hw.nvidia.registry.UseVBios: 1
hw.nvidia.registry.RMEdgeIntrCheck: 1
hw.nvidia.registry.UsePageAttributeTable: 4294967295
hw.nvidia.cards.0.model: GeForce 8600 GT
hw.nvidia.cards.0.irq: 16
hw.nvidia.cards.0.vbios: 60.84.5e.00.10
hw.nvidia.cards.0.type: PCI-E
dev.nvidia.0.%desc: GeForce 8600 GT
dev.nvidia.0.%driver: nvidia
dev.nvidia.0.%parent: vgapci0
[gonzalo@inferna ~]% uname -msri

and btw ... if anyone knows what values can be tweaked to get an even better performance .. I would greatly appreciate the info :)

Gonzalo Nemmi

BSDMare 06-26-08 05:26 AM

Re: GPU core temp (where to get it?)
If you have nvidia-settings installed you can use this :


nvidia-settings -q GPUCoreTemp
Which outputs :


  Attribute 'GPUCoreTemp' (Sprout:0.0): 43.
    'GPUCoreTemp' is an integer attribute.
    'GPUCoreTemp' is a read-only attribute.
    'GPUCoreTemp' can use the following target types: X Screen, GPU.

gnemmi 06-26-08 02:45 PM

Re: GPU core temp (where to get it?)
cool ...
didn't know that ...
thanks for the tip !

Anyway, I was looking for something more "parseable" ... like a sysctl value .. ( as in: if I can get all the info from the /proc filesystem under Linux, why wouldn't I be able to get the same info from sysctl under FreeBSD? ... it's even "freeer" than Linux :D )

if there's not such a thing .. are there any plans to include such a functionality in the near future?

If there are no plans to do so, who should I pick on to get it?

I mean .. regardless of whether a user does or does not have nvidia-settings install, he/she should be able to get a proper reading of the GPU core temperature (mem temp too .. maybe?) just like any other temperature reading on the system...

Furthermore .. it would make it easier to write a C or C++ app or widget ( a panel applet for KDE3 or even a plasmoid for KDE4 ) using sys/sysctl.h ;)

Thanks for your kind answer

rnejdl 06-26-08 06:15 PM

Re: GPU core temp (where to get it?)
btw, the other way you can get this is through:

[tethys]:/usr/ports> sudo chm -I
Using ISA Method.
Motherboard Temperature: 38 C
CPU_0 Temperature: 47 C
CPU_1 Temperature: 115 C
VCore: 2.35938 V
Vit: 3.64062 V
Vio: 3.17188 V
+5V: 5.29703 V
+12V: 11.5625 V
-12V: -12.375 V
-5V: -4.85344 V
Fan 1: Not Available
Fan 2: 2700 rpm
Fan 3: Not Available
Motherboard Temperature: 38 C

CPU_O is the temperature of the GPU.

Rusty Nejdl

gnemmi 06-26-08 06:48 PM

Re: GPU core temp (where to get it?)
nice .. thanks for sharing !
still not quite what I'm looking for .. but close ...

amm .. btw ... where does chm come from? I don't have it installed on my system .. :s

"make quicksearch name=chm" threw a lot of .chm files readers .. but no benchmark tool or sysutil ...

could you please tell me in what port is it located?
I already went through an awfull lot of pkg-plist files yet I couldn't find it :(

Thanks :)

rnejdl 06-26-08 09:40 PM

Re: GPU core temp (where to get it?)
[tethys]:/home/rnejdl> pkg_which /usr/local/bin/chm
You have new mail.

BSDMare 06-27-08 04:29 AM

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.


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


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


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 :


* 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 :captnkill:

*hides from linux users*

gnemmi 06-27-08 12:57 PM

Re: GPU core temp (where to get it?)
rnejdl: thanks !

BSDMare: you are right, and I agree on the fact that there are a gazillon ways to do the same thing under UNIX ( even if I hate sed and awk and would rather perl my code instead of using sh, sed and awk) but you got exactly my point: "Having it as a sysctl would be the most ideal option"

Furthermore ... the nvidia module already interfaces with the sysctl system as seen on my first post .. now .. why not reporting the GPU temp? that isn't that much to ask ... is just a few (I bet less than 20) lines of C code ...

and regarding the nvidia settings code issue .. nope .. I use FreeBSD ... and limited freedom ain't no freedom at all ;)

btw: don't hide .. you are right in what you say ;)

All times are GMT -5. The time now is 08:00 PM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.