Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: CPU temperature

  1. #1

    CPU temperature

    Fellow Pascal game developers!


    I'm happy to show the first achievement in the new year 2023.
    Accessing and processing some data from my new NUC system's temperature sensors.


    Program for data access written in Lazarus Pascal, animated GIF generated with GIMP. OS is Debian.


    The GIF below shows the temperature during the process of generating an animated GIF with GIMP.
    Total shown time 24 minutes. The red area is the CPU temperature, the blue line is the NVMe, which happens to be a WD Blue.
    The green dots are for something Intel calls package temperature.





    The image may be removed from the server at some later time

  2. #2
    Interesting. Which library are you using for accessing HW data?

  3. #3
    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.

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

  5. #5
    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.

  6. #6
    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.

  7. #7
    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.

  8. #8
    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.

  9. #9
    I haven't done any thermodynamic calculations on the problem but I really have used a few passively cooled computers for years now. I have roughly the same indoor temperature as you, though cooler in winter time, because heating is expensive. No AC in the summer so can indeed be pretty warm some days.


    So far I haven't experienced any overheating problems but I'm not taxing the systems so much. I don't write code fast enough to make the PC burn.


    In my case the systems are low end low power (and low electricity bill) processors. The last one a J 5005 Pentium system on a chip and before that J 1900 Celeron. Integrated graphics. Those systems are not producing sooo much waste heat, which simplifies the passive cooling. The Celeron system is a backbone from shuttle.eu with some heat-pipe / heatsink combination. That one still runs but is annoyingly slow nowadays. The newer Pentium was bought as a NUC and unfortunately I damaged it a bit while removing the case. Anyway.. most of it still works and I bought a case from AKASA constructed for passive cooling but lacking heat-pipes, it seemes. So now the whole case does the job as a heatsink. The system is running well. The case do tend to get warm as it's supposed to, but not dramatically. I don't think it's hot enough to fry eggs on it.


    All in all I think you could realistically get a fanless computer for home use if you one day decide to get a new one. That is if you can make do with low end computer. There are no doubt fanless high end computers too but I haven't explored that market much. A Pentium is sufficient for me. Most of the time.

  10. #10
    Quote Originally Posted by Jonax View Post
    In my case the systems are low end low power (and low electricity bill) processors. The last one a J 5005 Pentium system on a chip and before that J 1900 Celeron. Integrated graphics. Those systems are not producing sooo much waste heat, which simplifies the passive cooling. The Celeron system is a backbone from shuttle.eu with some heat-pipe / heatsink combination. That one still runs but is annoyingly slow nowadays.
    Well you really don't need much for cooling this kind of computers. I mean we are talking here about 10 W TDP. I'm wondering if using heat-pipes in such applications is even viable. Heat-pipes do need to reach certain temperature before they are effective at transferring heat. You could probably get away by using solid copper pipe or simply transferring heat to a decent sized aluminium casing using thermal pads.

    Any way since you are interested in such computer types I strongly recommend you check AMD Ryzen Embeded solutions https://www.amd.com/en/products/embe...nipc-solutions
    With last two Ryzen generations AMD managed to greatly increase performance per watt. Not to mention that embedded graphics solution that AMD provides are more than capable of 4K video output. This gave AMD ability to beat Inter in mini PC market. But it is still behind ARM based solutions. And Apple M1 and M2 processors also stirred the market quite a bit.

    Quote Originally Posted by Jonax View Post
    All in all I think you could realistically get a fanless computer for home use if you one day decide to get a new one. That is if you can make do with low end computer. There are no doubt fanless high end computers too but I haven't explored that market much. A Pentium is sufficient for me. Most of the time.
    Unfortunately my computing demands are quite larger than yours therefore making passive cooling much less viable solution.
    So instead lately I'm thinking about making myself a custom PC case that would rely on using air ducts for routing cold air to where it is needed most. Unfortunately existing case solutions don't provide enough room for the needed duct system. Therefore I'm actually considering of making a custom PC case from wood. Why from wood you ask? Wood is much easier to work with than metals and it is also good for sound dampening.

Page 1 of 2 12 LastLast

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
  •