NVidia videocards - getting statistic
i need to write few applications about lowlevel videocard controling for my coursework. For example - temperature, working SM's, managing access to them, etc. OS linux, tesla c1060.
Could you give me few advices where to search this kind of information?
CUDA does not provide these features. It must be some work with dev\nvidia* probabaly. or not? I've never written something like this - any advices would be welcome.
Thanks.
UPD: nvidia-settings is good but does not provide all what i need. Mb there are some more ways how to do it on c\cuda's开发者_如何学运维 ptx?
A couple of options spring to mind, you could use RivaTuner v2.24c from guru3d.com and/or CPU-ID for a bit more information. I have however, just noticed that you are using Linux so you should be able to install the latest NVidia drivers and run nvidia-settings -h
to see the options to view Temperature and various other information. Best of luck!
I know this is 2 years late, but if you are looking for a library oriented option Nvidia's NVML API does all of this. Check it out here! Thankfully the documentation is really well done. I had my c++ app polling my gpu's temperature in about an hour fiddling with it.
EDIT Here is some code to get the gpu temperature. Note, this code works (as is) for a one card system.
#include "nvml.h"
using namespace std;
Nvidia::Nvidia()
{
nvmlInit();
}
Nvidia::~Nvidia()
{
//dtor
}
unsigned int Nvidia::FetchTemp()
{
unsigned int DeviceCount;
nvmlReturn_t Rval=nvmlDeviceGetCount(&DeviceCount); //return type enum
if(Rval!=0)
{
//Card read error
return 0;
}
//Turn Count into index
DeviceCount--;
//Get Prereqs
nvmlDevice_t Device;
Rval=nvmlDeviceGetHandleByIndex(DeviceCount,&Device);
if(Rval!=0)
{
//Card read error
return 0;
}
nvmlTemperatureSensors_t TSensors=NVML_TEMPERATURE_GPU;
//Get Temperature
unsigned int Temp=0;
Rval=nvmlDeviceGetTemperature(Device,TSensors,&Temp);
if(Rval!=0)
{
//Card read error
return 0;
}
return Temp;
}
You can write a DirectX program to query the capabilities of the card, if you are interested in which functions it supports.
精彩评论