Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. cpu temperature

cpu temperature

Scheduled Pinned Locked Moved C#
csharptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    ziwez0
    wrote on last edited by
    #1

    Getting the current cpu temperature is proving very very difficult. Ive looked into WMI which although there is a WIN32_temperatureProbe [CurrentReading] this is not currently availble (future production) or is very limited to certain boards. So Ive hunted around and come across that I can get the information via Ring0 access! Great! errrh.......what do I do? So I havent found any info on how to actually program this (apart from c# wont work with it). I really just want a assembly object that my c# can call 1.amount of cpu(and cores) 2. cpu temp? has anyone or does aanyone got the know how on how to do this? being a c# and vb programmer my knoweldge is limited.

    Y 1 Reply Last reply
    0
    • Z ziwez0

      Getting the current cpu temperature is proving very very difficult. Ive looked into WMI which although there is a WIN32_temperatureProbe [CurrentReading] this is not currently availble (future production) or is very limited to certain boards. So Ive hunted around and come across that I can get the information via Ring0 access! Great! errrh.......what do I do? So I havent found any info on how to actually program this (apart from c# wont work with it). I really just want a assembly object that my c# can call 1.amount of cpu(and cores) 2. cpu temp? has anyone or does aanyone got the know how on how to do this? being a c# and vb programmer my knoweldge is limited.

      Y Offline
      Y Offline
      yoaz
      wrote on last edited by
      #2

      ziwez0 wrote:

      I can get the information via Ring0 access

      ring0 basically means kernel level in windows world, which is to be expected if you want to query hardware properties and state. you have found the way to interact with kernel through

      ziwez0 wrote:

      WIN32_temperatureProbe

      . You can't improve much on this, and not at all in managed code. CPU usage is another thing, which u can access through managed code(c#). Try looking into System.Diagnostics namespace especially PerformanceCounter class and related.

      there are no facts, only interpretations

      Z 1 Reply Last reply
      0
      • Y yoaz

        ziwez0 wrote:

        I can get the information via Ring0 access

        ring0 basically means kernel level in windows world, which is to be expected if you want to query hardware properties and state. you have found the way to interact with kernel through

        ziwez0 wrote:

        WIN32_temperatureProbe

        . You can't improve much on this, and not at all in managed code. CPU usage is another thing, which u can access through managed code(c#). Try looking into System.Diagnostics namespace especially PerformanceCounter class and related.

        there are no facts, only interpretations

        Z Offline
        Z Offline
        ziwez0
        wrote on last edited by
        #3

        Hi, nah dont need usage just need temperature for each cpu.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups