Results 1 to 10 of 16

Thread: CPU temperature

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Interesting. Which library are you using for accessing HW data?

  2. #2
    I have no idea which library is involved in accessing the data.

    it seems as for (my) Linux system the sensor data can be collected from plain text files located in one of four following directories:


    /sys/class/hwmon/hwmon0/
    /sys/class/hwmon/hwmon1/
    /sys/class/hwmon/hwmon2/
    /sys/class/hwmon/hwmon3/

    It also seems as the sensors are assigned different directories after each restart.

    Fortunately there are only four directories (in my system) and there is a plain text file named 'name' in each directory saying which sensors were assigned there during the last/current restart.

    /sys/class/hwmon/hwmon'*/name

    So first make a routine to check which directory to look in and then retrieve the actual data from files of the type

    /sys/class/hwmon/hwmon*/temp*_input

    Then you do whatever magic you want to do with this temperature data
    it seems the temperature files are updated every 2 seconds.

    From what I read different systems behave differently. So I guess it depends on what you got under the hood. So far I have only tried this on my own computer.

  3. #3
    So you are just parsing files that were stored by some other sensor monitoring program.

  4. #4
    Quote Originally Posted by SilverWarior View Post
    So you are just parsing files that were stored by some other sensor monitoring program.
    I guess. Makes it incredibly convenient, except for the minor hassle of deciding where to look. I have no idea how the data ends up in those files. I certainly haven't installed any monitoring program. I guess I have to thank team Linux and Intel and some unknown heroes.

  5. #5
    Quote Originally Posted by Jonax View Post
    I guess. Makes it incredibly convenient, except for the minor hassle of deciding where to look. I have no idea how the data ends up in those files. I certainly haven't installed any monitoring program. I guess I have to thank team Linux and Intel and some unknown heroes.
    Well Linux actually has The Linux Hardware Monitoring kernel API https://docs.kernel.org/hwmon/hwmon-kernel-api.html that allows easy and standardized monitoring of computer hardware. It even allows of dumping information to files like the one you are using.
    Now I don't know enough about Linux to tell you where and how you can set this up. I do know here are several programs that do make this much easier. And there is available API that you can use directly from your program to retrieve current information. But i haven't seen readily library for pascal so far.

  6. #6
    Thanks for input. Those suggestions seems useful. However currently for my part there is no pressing need to get access to more precise temperature data. I made this quick attempt mostly to get an idea about my own system's general temperture behaviour before and after the next project - removing the fan, for passive cooling. Haven't begun that procedure yet, got to get a special case for cooling first. Last time I tried this the main problem was to get the system out from the pretty tightly built NUC case without causing too much damage. Actually I lost the microphone and the WiFi + Bluetooth last time. Still it was worth it because the result was a totally silent PC.

    For the future it could be cool to include cpu temperature feedback in some game. Alas that will not happen, at least not in near time.

  7. #7
    Quote Originally Posted by Jonax View Post
    I made this quick attempt mostly to get an idea about my own system's general temperture behaviour before and after the next project - removing the fan, for passive cooling. Haven't begun that procedure yet, got to get a special case for cooling first. Last time I tried this the main problem was to get the system out from the pretty tightly built NUC case without causing too much damage. Actually I lost the microphone and the WiFi + Bluetooth last time. Still it was worth it because the result was a totally silent PC.
    Making a passive cooled PC so it can be completely silent is an intriguing idea. An idea that I was considering several years ago after seeing Passive cooling built from Linus Tech Tips YouTube channel.
    But I never went through with it since I realized that passive cooling has one big flaw. And that is that it is heavily dependent of ambient temperature. After doing some thermodynamics calculations I realized that such approach would not work for me. Why? Since I don't have any AC in my house during summer temperature in my house could reach even to 28 degrees Celsius which is 5 to 7 degrees more that I have during winter time. And this 5-7 degrees temperature difference of ambient temperature would mean 15-20 degrees diference in temperature of passively cooled components.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •