<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>cpuTemp0 &amp;mdash; Ebrius Disputatios</title>
    <link>https://blog.natehiggers.org/tag:cpuTemp0</link>
    <description>### *A thing&#39;s not wrong because it&#39;s illegal, a thing is illegal because it&#39;s wrong*.</description>
    <pubDate>Fri, 24 Apr 2026 09:34:13 +0000</pubDate>
    <item>
      <title>This Is A Script That I Initially called Pi Temp</title>
      <link>https://blog.natehiggers.org/this-is-a-script-that-i-initially-called-pi-temp</link>
      <description>&lt;![CDATA[Initially this script was for my SOC that didn&#39;t have cool tools like vcgencmd. Usually non Raspian/Raspberry Pi Oses.  It&#39;s worked for me on many types of devices and it is dependent on the program bc, which is a basic calculator program found on UNIX like systems, including Linux. The program bc is also a language too, I believe. This script gives the temperature of the cpu and, I think may give an all around sense of what the temperature in your box is. &#xA;&#xA;Okay here&#39;s the script, feel free to improve upon it if needs be:&#xA;&#xA;!/bin/sh&#xA;&#xA;For the uninitiated, this is a comment&#xA;&#xA;cpuTemp0=$(cat /sys/class/thermal/thermalzone0/temp)&#xA;cpuTemp1=$(($cpuTemp0/1000))&#xA;cpuTemp2=$(($cpuTemp0/100))&#xA;cpuTempM=$(($cpuTemp2 % $cpuTemp1))&#xA;&#xA;$gpuTemp0=$(/opt/vc/bin/vcgencmd measuretemp)&#xA;gpuTemp0=${gpuTemp0//\&#39;/º}&#xA;gpuTemp0=${gpuTemp0//temp=/}&#xA;&#xA;echo CPU Temp: $cpuTemp1&#34;.&#34;$cpuTempM&#34;ºC&#34;&#xA;echo GPU Temp: $gpuTemp0&#xA;&#xA;milcel=$(cat /sys/class/thermal/thermal_zone0/temp)&#xA;&#xA;echo &#34;CPU Temperature:&#34;&#xA;echo&#xA;ctemp=$(echo &#34;scale=3;$milcel/1000&#34; | bc)&#xA;echo $ctemp &#34;°C&#34;&#xA;echo&#xA;ftemp=$(echo &#34;scale=3;(($milcel/1000)*(9/5))+32&#34; | bc)&#xA;echo $ftemp &#34;°F&#34;&#xA;echo&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Initially this script was for my SOC that didn&#39;t have cool tools like vcgencmd. Usually non Raspian/Raspberry Pi Oses.  It&#39;s worked for me on many types of devices and it is dependent on the program bc, which is a basic calculator program found on UNIX like systems, including Linux. The program bc is also a language too, I believe. This script gives the temperature of the cpu and, I think may give an all around sense of what the temperature in your box is.</p>

<p>Okay here&#39;s the script, feel free to improve upon it if needs be:</p>

<p>#!/bin/sh</p>

<p><a href="https://blog.natehiggers.org/tag:For" class="hashtag"><span>#</span><span class="p-category">For</span></a> the uninitiated, this is a comment</p>

<p><a href="https://blog.natehiggers.org/tag:cpuTemp0" class="hashtag"><span>#</span><span class="p-category">cpuTemp0</span></a>=$(cat /sys/class/thermal/thermal_zone0/temp)
<a href="https://blog.natehiggers.org/tag:cpuTemp1" class="hashtag"><span>#</span><span class="p-category">cpuTemp1</span></a>=$(($cpuTemp0/1000))
<a href="https://blog.natehiggers.org/tag:cpuTemp2" class="hashtag"><span>#</span><span class="p-category">cpuTemp2</span></a>=$(($cpuTemp0/100))
<a href="https://blog.natehiggers.org/tag:cpuTempM" class="hashtag"><span>#</span><span class="p-category">cpuTempM</span></a>=$(($cpuTemp2 % $cpuTemp1))</p>

<p>#$gpuTemp0=$(/opt/vc/bin/vcgencmd measure_temp)
<a href="https://blog.natehiggers.org/tag:gpuTemp0" class="hashtag"><span>#</span><span class="p-category">gpuTemp0</span></a>=${gpuTemp0//\&#39;/º}
<a href="https://blog.natehiggers.org/tag:gpuTemp0" class="hashtag"><span>#</span><span class="p-category">gpuTemp0</span></a>=${gpuTemp0//temp=/}</p>

<p><a href="https://blog.natehiggers.org/tag:echo" class="hashtag"><span>#</span><span class="p-category">echo</span></a> CPU Temp: $cpuTemp1”.“$cpuTempM”ºC”
<a href="https://blog.natehiggers.org/tag:echo" class="hashtag"><span>#</span><span class="p-category">echo</span></a> GPU Temp: $gpuTemp0</p>

<p>milcel=$(cat /sys/class/thermal/thermal_zone0/temp)</p>

<p>echo “CPU Temperature:”
echo
ctemp=$(echo “scale=3;$milcel/1000” | bc)
echo $ctemp “°C”
echo
ftemp=$(echo “scale=3;(($milcel/1000)*(9/5))+32” | bc)
echo $ftemp “°F”
echo</p>
]]></content:encoded>
      <guid>https://blog.natehiggers.org/this-is-a-script-that-i-initially-called-pi-temp</guid>
      <pubDate>Sun, 19 Dec 2021 20:58:27 +0000</pubDate>
    </item>
  </channel>
</rss>