How to read temperature sensors inside TX2 module?

In particular, I’d like to read CPU and GPU temperatures from application written in C language. Any pointers?

-albertr

I found some temperatures exposed under /sys tree:

root@tx2:/sys/class/thermal# cat /sys/class/thermal/thermal_zone?/temp
49000
49000
55000
49000
47500
44000
45250
100000
48600

root@tx2:/sys/class/thermal# cat /sys/devices/c250000.i2c/i2c-7/7-004c/temperature
44 45.25

Are these reliable and can be used? Which sensors they correspond to?

-albertr

You may check this topic:[url]https://devtalk.nvidia.com/default/topic/1021313/jetson-tx1/use-c-language-get-cpu-thermal-sensor-temperature-tx1-/post/5198956/#5198956[/url]

That’s exactly what I was looking for, thanks!

-albertr