TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: BERND
from: A. DUMAS
date: 2019-01-12 10:13:00
subject: Re: Pi 3 B+: Needs Coolin

Bernd wrote, on 12-01-2019 09:20:
> Meanwhile I have found how to measure the temp
> from the RasPi.

Readable output, not directly useful in scripts:
$ vcgencmd measure_temp
temp=46.2'C

Value in millidegrees:
$ cat /sys/class/thermal/thermal_zone0/temp
47236

Value in degrees rounded down, so 47.9 becomes 47:
$ echo $(($(cat /sys/class/thermal/thermal_zone0/temp)/1000))
47

Value in degrees with one decimal, using bc:
$ echo "scale=1;$(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc
46.5

The same thing without bc:
$ vcgencmd measure_temp | cut -d= -f2 | cut -d\' -f1
46.2

(The decimal separator is not localised for any of these.)

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.