通过命令 /opt/vc/bin/vcgencmd measure_temp 查看gpu温度。 import commands defget_cpu_temp(): tempFile =open("/sys/class/thermal/thermal_zone0/temp") cpu_temp = tempFile.read() tempFile.close() returnfloat(cpu_temp)/1000# Uncomment the next line if you want the temp in Fahrenheit #r...
functionGet-Temperature {$t= Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace"root/wmi"$returntemp= @()foreach($tempin$t.CurrentTemperature) {$currentTempKelvin=$temp/10$currentTempCelsius=$currentTempKelvin- 273.15$currentTempFahrenheit= (9/5) *$currentTempCelsius+ 32$returntemp+=$currentT...
FAQs About Normal CPU Temp Is 70 degrees Celsius hot for a CPU while gaming? “Typically, temperatures up to 70 degrees Celsius [158 degrees Fahrenheit] are fine,” Silverman says, adding that “if it gets hotter, you might start having problems.” Depending on the model, your CPU and GP...
tempFile = open( "/sys/class/thermal/thermal_zone0/temp" ) cpu_temp = tempFile.read() tempFile.close() return float(cpu_temp)/1000 # Uncomment the next line if you want the temp in Fahrenheit #return float(1.8*cpu_temp)+32 def get_gpu_temp(): gpu_temp = commands.getoutput( '/...
cpu_temp=tempFile.read() tempFile.close() returnfloat(cpu_temp)/1000 # Uncomment the next line if you want the temp in Fahrenheit #return float(1.8*cpu_temp)+32 defget_gpu_temp(): gpu_temp=commands.getoutput('/opt/vc/bin/vcgencmd measure_temp').replace('temp=', '' ).replace( ...
CPU temps vary with the usage. Usually,40–65 degrees Celsius or 104–145 degrees Fahrenheit is considered as harmless temperature range for your computer. And under heavy workload, this temp may rise to70–80 degrees Celsius (155–175 degrees Fahrenheit). ...
That's it! You've printed the temperature in Celsius to the REPL. Note that it's not exactly the ambient temperature and it's not super precise. But it's close! If you'd like to print it out in Fahrenheit, use this simple formula: Celsius * (9/5) + 32. It's super easy to ...
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries# SPDX-License-Identifier: MIT"""CircuitPython CPU temperature example in Fahrenheit"""importtimeimportmicrocontrollerwhileTrue:print(microcontroller.cpu.temperature * (9/5) +32) time.sleep(0.15) ...
In the Core Temp program, you’ll see your CPU’s current temperatures below the “Processor #0: Temperature Readings” heading. Depending on your processor, you might see a temperature reading for each of your processor’s cores or just the first core. ...
functionGet-Temperature{$t=Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace"root/wmi"$returntemp=@()foreach($tempin$t.CurrentTemperature){$currentTempKelvin=$temp/10$currentTempCelsius=$currentTempKelvin-273.15$currentTempFahrenheit=(9/5)*$currentTempCelsius+32$returntemp+=$currentTempCelsius.To...