How to get the processor temperature in Python?

294 Views Asked by At

I'm working on a TRNG written in Python, which currently uses ram data, disk usage, processor usage, virtual memory usage, battery voltage, as seed, I'm using the psutil module:

entropy_values : dict = {
                "battery": sensors_battery().percent * qb,
                "cpu": cpu_freq().current / 1000,
                "virtual": virtual_memory().percent,
                "ram": swap_memory().percent,
                "disco": disk_usage("/").percent,
            }

However after reading some articles (including from Intel), I concluded that I could "improve" the "randomness" of the numbers using also the thermal noise of the processor, but getting the processor temperature in python is not trivial. I've tried using psutil, HWMonitor, Ansible and many other modules that I don't remember very well. Could someone please help me, say maybe it's worth using thermal noise, and how. I have a computer with Windows 10 x86, a Intel processor and Python 3.8. Thank you for your attention and collaboration.

0

There are 0 best solutions below