Query Nvidia GPU Temperature

I have Googled to no avail.

Does anyone have code for a function to return the nvidia gpu temperature in Linux?
Topic archived. No new replies allowed.