<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=3963&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Conky + sensors temp settings ?]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=3963</link>
		<description><![CDATA[The most recent posts in Conky + sensors temp settings ?.]]></description>
		<lastBuildDate>Sun, 09 May 2021 10:47:10 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29696#p29696</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Bah, sorry, I thought I tested that...</p><p>Does this work?</p><div class="codebox"><pre><code>#!/bin/sh

temp=&quot;$(sensors|awk &#039;/^Core/{sum+=$3;lines+=1}END{print int (sum/lines)}&#039;)&quot;

printf &quot;Temp: %s°C&quot; &quot;$temp&quot;</code></pre></div></div></blockquote></div><p>yes that works, sorry for late reply been away from technology for a time.</p><p>cheers</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Sun, 09 May 2021 10:47:10 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29696#p29696</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29689#p29689</link>
			<description><![CDATA[<p>Bah, sorry, I thought I tested that...</p><p>Does this work?</p><div class="codebox"><pre><code>#!/bin/sh

temp=&quot;$(sensors|awk &#039;/^Core/{sum+=$3;lines+=1}END{print int (sum/lines)}&#039;)&quot;

printf &quot;Temp: %s°C&quot; &quot;$temp&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 08 May 2021 14:00:49 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29689#p29689</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29687#p29687</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><div class="quotebox"><cite>dice wrote:</cite><blockquote><div><p>I would rather it didnt print a decimal place</p></div></blockquote></div><div class="codebox"><pre><code>#!/bin/sh

temp=&quot;$(sensors|awk &#039;/Core/{lines++}{sum+=$3}END{print int(sum/lines)}&#039;)&quot;

printf &quot;Temp: %s°C&quot; &quot;$temp&quot;</code></pre></div><p>EDIT: added <span class="bbc">lines</span> variable to make the script work for any number of active cores.</p></div></blockquote></div><p>Thanks.</p><p>Although with your edit i am getting this output ?</p><p><span class="bbc">Temp: 318°C</span></p><p>Previous command without line var</p><p><span class="bbc">Temp: 43°C</span></p><p>sensors output in full is..</p><div class="codebox"><pre><code>~$ sensors
BAT1-acpi-0
Adapter: ACPI interface
in0:          11.74 V
curr1:         2.05 A

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +42.0°C  (high = +84.0°C, crit = +100.0°C)
Core 1:       +42.0°C  (high = +84.0°C, crit = +100.0°C)
Core 2:       +45.0°C  (high = +84.0°C, crit = +100.0°C)
Core 3:       +43.0°C  (high = +84.0°C, crit = +100.0°C)

nouveau-pci-0100
Adapter: PCI adapter
GPU core:    850.00 mV (min =  +0.80 V, max =  +0.95 V)
temp1:        +37.0°C  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Sat, 08 May 2021 11:46:46 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29687#p29687</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29676#p29676</link>
			<description><![CDATA[<div class="quotebox"><cite>dice wrote:</cite><blockquote><div><p>from what i can gather it is getting the 3rd column of temperature digits from the /Core/ output and dividing the sum by a factor of 4, would this be correct?</p></div></blockquote></div><p>Yes, that&#039;s right.</p><div class="quotebox"><cite>dice wrote:</cite><blockquote><div><p>I would rather it didnt print a decimal place</p></div></blockquote></div><div class="codebox"><pre><code>#!/bin/sh

temp=&quot;$(sensors|awk &#039;/Core/{lines++}{sum+=$3}END{print int(sum/lines)}&#039;)&quot;

printf &quot;Temp: %s°C&quot; &quot;$temp&quot;</code></pre></div><p>EDIT: added <span class="bbc">lines</span> variable to make the script work for any number of active cores.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Fri, 07 May 2021 15:23:21 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29676#p29676</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29674#p29674</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>fsmithred wrote:</cite><blockquote><div><p>... individual core temps.</p></div></blockquote></div><p>Same here.</p><p>Here&#039;s the line I&#039;m using, not my work.<br />I recall getting the format <em>right</em> here at Dev1:</p><div class="codebox"><pre><code>TEMPERATURES
${hr 2}
Core 0: +${hwmon 0 temp 2} C  $alignc Core 1: +${hwmon 0 temp 3} C
Core 2: +${hwmon 0 temp 4} C  $alignc Core 3: +${hwmon 0 temp 5} C
${hr 0.3}</code></pre></div><p>Looks (sort of) like this:</p><div class="codebox"><pre><code>TEMPERATURES
_____________________________
Core 0: +44 C   Core 1: +41 C
Core 2: +40 C   Core 3: +41 C
_____________________________</code></pre></div><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Fri, 07 May 2021 15:13:13 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29674#p29674</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29671#p29671</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Your other scripts weren&#039;t printing an average of all four cores whereas mine is :-)</p></div></blockquote></div><p>can you explain a little what is going on in that command?</p><p>from what i can gather it is getting the 3rd column of temperature digits from the /Core/ output and dividing the sum by a factor of 4, would this be correct? I would rather it didnt print a decimal place as it moves around too much in the panel, aka 51.75 to 52 etc.</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Fri, 07 May 2021 14:32:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29671#p29671</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29670#p29670</link>
			<description><![CDATA[<p>Your other scripts weren&#039;t printing an average of all four cores whereas mine is :-)</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Fri, 07 May 2021 14:00:14 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29670#p29670</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29669#p29669</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Try</p><div class="codebox"><pre><code>#!/bin/sh

temp=&quot;$(sensors | awk &#039;/Core/{sum+=$3}END{print sum/4}&#039;)&quot;

printf &quot;Temp: %s°C&quot; &quot;$temp&quot;</code></pre></div><p>(Untested because my <span class="bbc">sensors</span> doesn&#039;t show a &quot;Core&quot; column. This example presumes four cores with the temperature given in the third field, correct as needed.)</p></div></blockquote></div><p>nice, thanks head on a stick. works for me, it seems out by 1 degree compared to my other scripts but yours may very well be more accurate.</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Fri, 07 May 2021 13:58:48 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29669#p29669</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29661#p29661</link>
			<description><![CDATA[<p>Try</p><div class="codebox"><pre><code>#!/bin/sh

temp=&quot;$(sensors | awk &#039;/Core/{sum+=$3}END{print sum/4}&#039;)&quot;

printf &quot;Temp: %s°C&quot; &quot;$temp&quot;</code></pre></div><p>(Untested because my <span class="bbc">sensors</span> doesn&#039;t show a &quot;Core&quot; column. This example presumes four cores with the temperature given in the third field, correct as needed.)</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Fri, 07 May 2021 13:17:29 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29661#p29661</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=29660#p29660</link>
			<description><![CDATA[<p>revisiting this thread to add to it.</p><p>Figured out i think an easier script to calculate the average of sensors temp output from the awk command posted by fsmithred above.</p><p>Im fairly certain the maths is correct below but wondering if it could be done a better way and also how i could tack on the celcius symbol °C - to the end of the output?</p><div class="codebox"><pre><code>#!/bin/sh

get_temp=$(sensors | awk &#039;/Core/ { printf substr($3,2,2)&quot;&quot; }&#039;)

printf &quot;Temp:&quot; &amp;&amp; expr &quot;$get_temp&quot; / 1000000</code></pre></div><p>this command in the script..</p><div class="codebox"><pre><code>sensors | awk &#039;/Core/ { printf substr($3,2,2)&quot;&quot; }&#039; </code></pre></div><p>now prints 8 digits like so..</p><p><span class="bbc">44444744</span></p><p>edit: so output look like so from the script.</p><div class="codebox"><pre><code>Temp:44</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Fri, 07 May 2021 12:07:51 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=29660#p29660</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=26036#p26036</link>
			<description><![CDATA[<div class="quotebox"><cite>fsmithred wrote:</cite><blockquote><div><p>I like seeing the individual core temps. Here&#039;s the line I&#039;m using:</p><div class="codebox"><pre><code>${execi 8 sensors | awk &#039;/Core/ { printf substr($3,2,2)&quot; &quot; }&#039;}</code></pre></div><p>and the output looks like this:</p><div class="quotebox"><blockquote><div><p>CPU: 42 36 40 41</p></div></blockquote></div></div></blockquote></div><p>That is a good one, i like to see the individual cores as well and this solves my issue with hwmon moving around. Thanks</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Wed, 02 Dec 2020 12:49:29 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=26036#p26036</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=26035#p26035</link>
			<description><![CDATA[<p>I like seeing the individual core temps. Here&#039;s the line I&#039;m using:</p><div class="codebox"><pre><code>${execi 8 sensors | awk &#039;/Core/ { printf substr($3,2,2)&quot; &quot; }&#039;}</code></pre></div><p>and the output looks like this:</p><div class="quotebox"><blockquote><div><p>CPU: 42 36 40 41</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Wed, 02 Dec 2020 11:05:52 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=26035#p26035</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=26034#p26034</link>
			<description><![CDATA[<p>I found a really nice script for use with lm_sensors, way beyond my scripting abilities, all credit to the author whoever it is.</p><p>If you want this in °F you need to add an -f to sensors in the script and change out the celcius parts, i did it the other way around as this script was for °F originally.</p><p>needs bc package if you havent already installed it.</p><div class="codebox"><pre><code>#!/bin/bash

# 1. get temperature

## a. split response
## Core 0:        +48.0°C  (high = +105.0°C, crit = +105.0°C)
IFS=&#039;)&#039; read -ra core_temp_arr &lt;&lt;&lt; $(sensors | grep &#039;^Core\s[[:digit:]]\+:&#039;) #echo &quot;${core_temp_arr[0]}&quot;

## b. find cpu usage
total_cpu_temp=0
index=0
for i in &quot;${core_temp_arr[@]}&quot;; do :
    temp=$(echo $i | sed -n &#039;s/°C.*//; s/.*[+-]//; p; q&#039;)
    let index++
    total_cpu_temp=$(echo &quot;$total_cpu_temp + $temp&quot; | bc)
done
avg_cpu_temp=$(echo &quot;scale=2; $total_cpu_temp / $index&quot; | bc)

## c. build entry
temp_status=&quot;CPU: $avg_cpu_temp °C&quot;
echo $temp_status

exit 0</code></pre></div><p>source: <a href="https://stackoverflow.com/questions/50686262/how-to-get-average-cpu-temperature-from-bash" rel="nofollow">https://stackoverflow.com/questions/506 … -from-bash</a></p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Wed, 02 Dec 2020 10:56:19 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=26034#p26034</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=25965#p25965</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p><a href="https://bbs.archlinux.org/viewtopic.php?id=80012" rel="nofollow">https://bbs.archlinux.org/viewtopic.php?id=80012</a>?</p></div></blockquote></div><p>If the solution in that thread was <span class="bbc">${platform coretemp.0 temp 1}</span> my conky dzen2 says no such file, </p><div class="codebox"><pre><code>conky: can&#039;t open &#039;/sys/bus/platform/devices/coretemp.0/temp1_input&#039;: No such file or directory please check your device or remove this var from conky </code></pre></div><p>However it shows up as </p><div class="codebox"><pre><code>cat /sys/bus/platform/devices/coretemp.0/hwmon/hwmon1/temp1_input</code></pre></div><p>Maybe conky is looking in the wrong directory for that variable?</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Wed, 25 Nov 2020 07:21:13 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=25965#p25965</guid>
		</item>
		<item>
			<title><![CDATA[Re: Conky + sensors temp settings ?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=25957#p25957</link>
			<description><![CDATA[<p><a href="https://bbs.archlinux.org/viewtopic.php?id=80012" rel="nofollow">https://bbs.archlinux.org/viewtopic.php?id=80012</a>?</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Tue, 24 Nov 2020 19:07:01 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=25957#p25957</guid>
		</item>
	</channel>
</rss>
