[1] MLD-5.x / Systems / Raspberry PI / [MLD-5.5 testing] Raspberry Pi 4 CPU temperature script
 

Offline gr4vity

  • Expert Member
  • *****
  • Posts: 604
    • View Profile


Hi,

Here is a script that monitors Rpi CPU temperature.
The script isn't mine :D
I made a google search and found it yesterday.
You can change time.sleep to whatever value you want.
(python 3 is required)


Code: [Select]
#!/usr/bin/python3
import os
import time

def temperature_of_raspberry_pi():
    cpu_temp = os.popen("vcgencmd measure_temp").readline()
    return cpu_temp.replace("temp=", "")

while True:
    print(temperature_of_raspberry_pi())
    time.sleep(1)

Best Regards.
« Last Edit: November 13, 2021, 22:11:25 by gr4vity »

[1] MLD-5.x / Systems / Raspberry PI / [MLD-5.5 testing] Raspberry Pi 4 CPU temperature script
 



Users Online Users Online

0 Members and 1 Guest are viewing this topic.