Friday, January 17, 2014

NVIDIA GPU Temp

On my old TV setup I used nvclock to get the NVIDIA GPU temperature and graph it using rrdtool (along with other temperatures and fan speeds).

nvclock was always a bit of a hack and does not work any more (at least, it won't do anything useful for me).

I know the nvidia-settings tool can display the temperature (and much more information) so there must be a modern way to access this data. A quick google showed up the nvidia-smi tool.

Quick and dirty,
nvidia-smi -q | grep Temperature -A 1
will show the current temperature.
    Temperature
        Gpu                     : 72 C


Interestingly, the output can also be in XML format. Combined with some xslt magic, it is possible to get the temperature in a more structured way.
echo '<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method='text'/>
<xsl:template match="/">
<xsl:for-each select="//gpu_temp">
<xsl:value-of select="."/>

<xsl:text>&#xa;</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

' > nvidia-temp.xml
nvidia-smi --dtd > nvsmi_device_v6.dtd
nvidia-smi -q -x | xsltproc nvidia-temp.xml -

Note: Your driver might be using a different dtd version. Adjust as required. (nvidia-smi --dtd | head -1 | cut -d ' ' -f 2 will give the correct name)

If you have multiple cards and want to know which card has which temperature then you can alter the xsl to format it as you require with something like
<xsl:value-of select="ancestor::gpu/@id"/> or <xsl:value-of select="ancestor::gpu/uuid"/>
eg
0000:04:00.0 Quadro K2000 31 C
0000:05:00.0 Quadro K2000 32 C



27 comments:

  1. The article you have shared here very awesome. I really like and appreciated your work. I read deeply your article, the points you have mentioned in this article are useful
    Bad Ice Cream

    ReplyDelete
  2. I am very happy to read this. Appreciate your sharing lulubox download

    ReplyDelete
  3. I don't understand about NVIDIA GPU Temp. Please at first give a brief introduction about it. And one thing if you need a guidance to install exodus kodi, just ping me.

    ReplyDelete
  4. Thanks for expaling about NVIDIA GPU Temp. Can you tell me how we can resolve high CPU usages issue? and Can I post your blog on QuickBooks support site?

    ReplyDelete
  5. There's no easy answer; it varies from GPU to GPU. Google is your friend. Most modern chips can run at temperatures in the mid-90 degrees Celsius, though, and you'll often see them hit those temperatures in gaming laptops

    hotstar app

    ReplyDelete
  6. NVIDIA should do something to lower the temperature of their chipset while playing games. I have encountered this problem while working on Geek Squad Tech Support project.

    ReplyDelete
  7. This post is discussing in an outstanding way. I like your way yo discussed your valid points and facts about this. I really said you share more and more articles How To Remove Mildew From Clothes

    ReplyDelete
  8. Most of the toxic plants are irritants, causing localized tenderness of the mouth, stomach & skin. The toxic principle in the other plants have a systemic effect, damage the function of cat organs like the heart or kidney. Plants Poisonous To Cats

    ReplyDelete
  9. In Present Scenario, being able to speak English is crucial for both career success and social success. here we learn how to speak confidently and correctly. we provide an excellent training on learning the language with different and excellent methods. English Speaking Course Online

    ReplyDelete
  10. Hey, Excellent work. I must appreciate the way you manage your article’s content and the look & feel of your website. you are really doing a great work, carry on the hard work.
    Best SEO services in Delhi NCR

    ReplyDelete
  11. Choosing a high quality and well-paying casino may be hard. But Casinority comes to the rescue with its detailed and up to date casino reviews. Take advantages of our https://casinority.com/reviews/fair-go-casino/ listings of the best sites.

    ReplyDelete
  12. Impressive blog. I thought this was not really preferrable.

    click for truck listing

    ReplyDelete
  13. Wonderful article, thank you for sharing the info. It isn’t too often that you simply read articles where the poster understands what they’re blogging about.

    사설토토
    온라인카지노
    파워볼

    ReplyDelete
  14. I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.

    토토
    카지노사이트
    파워볼사이트

    ReplyDelete
  15. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.

    스포츠토토
    바카라사이트
    파워볼게임

    ReplyDelete
  16. It’s really a nice and useful piece of info. I am glad that you shared this helpful information with us. Please keep us up to date like this. Thank you for sharing. 배트맨토토

    ReplyDelete
  17. Really appreciate you sharing this blog post. Really looking forward to read more. Really Great 토토

    ReplyDelete
  18. This article is an appealing wealth of useful informative that is interesting and well-written. I commend your hard work on this and thank you for this information. I know it very well that if anyone visits your blog, then he/she will surely revisit it again. 온라인카지노사이트

    ReplyDelete
  19. I have read it, but the information is still less than mine, i am wanting to learn more
    바카라사이트인포

    ReplyDelete
  20. Useful information. Lucky me I found your web site by chance, and I’m shocked
    why this coincidence did not took place earlier! I bookmarked it.
    파워볼사이트닷컴

    ReplyDelete
  21. Very good article! We will be linking to this great
    content on our site. Keep up the good writing.
    온라인카지노사이트

    ReplyDelete
  22. I needed to thank you for this phenomenal read!! I unquestionably adored each and every piece of it. I have you bookmarked your site to look at the new stuff you post.
    사설토토

    ReplyDelete