objective c - How to get GPU temperature programmatically in OSX? -
i trying gpu temperature on mac's osx platform programmatically
i tried google solutions can't find , find cpu temperature , gpu usage in percentage.
is there api or library allows retrieve sensors data ?
can please tell me start ? or maybe provide example?
https://developer.nvidia.com/cuda-faq
q: how can information on gpu temperature application? on microsoft windows platforms, nvidia's nvapi gives access gpu temperature , many other low-level gpu functions
under linux, "nvidia-smi" utility, included standard driver install, displays gpu temperature installed devices.
edit
while looking further "nvidia-smi" utility has been provided linux based system, found have provided c based api fetch gpu temperature.
https://developer.nvidia.com/nvidia-management-library-nvml https://developer.nvidia.com/nvidia-system-management-interface
from manual, see below api can used find out has been provided "nvidia-smi":
7.9.2.8 nvmlreturn_t decldir nvmlunitgettemperature (nvmlunit_t unit, unsigned int type, unsigned int temp) retrieves temperature readings unit, in degrees c. s-class products. depending on product, readings may available intake (type=0), exhaust (type=1) , board (type=2). parameters: unit identifier of target unit type type of reading take temp reference in return intake temperature returns: • nvml_success if temp has been populated • nvml_error_uninitialized if library has not been initialized • nvml_error_invalid_argument if unit or type invalid or temp null • nvml_error_not_supported if not s-class product • nvml_error_unknown on unexpected error
hope useful , way can achieve requirement. "nvidia-smi" internally uses above api find out temperature of gpu which user get.this command line utility provided nvidia.
Comments
Post a Comment