Hello all
had found some time to diagnost my CelsiusMysterium again
)
have written a diagnostic tool, which wachtes the sensor-values
( Access-point given from /root/.config/poorercputemp/poorercputemprc )
and remembers the highes found value.
There is also a Value called temp2_max , that says 105° is Maximum for my CPU
and a temp2_crit, which also say 105°
started my tool, then make a maximum use of the cpu until
my fingers cry "tooo hot here", klick on my toolicon in Taskbar,
the Info is 102000, which stands for 102°.
So all seems in given rules - hm
Start PuppySysInfo -> mainboard -> Bios == Release Date: 08/11/2009, Vendor: Phoenix Technologies LTD
so I say, the Lappy does this since 10 years
( Start PuppySysInfo -> mainboard -> CPU == Intel(R) Celeron(R) CPU 900 @ 2.20GHz )
If someone also wants to diagnost, here is my tool,
but remember, IT WORKS NOT FOR ALL, ONLY ON MY LAPPY
so study it, change it to your situation !!
the Look:
The Bashscript (the source of the Temperaturesensorvalues is fix build in,
change the first line to your sensors, you can get a hint from
file /root/.config/poorercputemp/poorercputemprc when 01micko's
poorercputemp is running ):
Code: Select all
#!/bin/sh
# aus dem Systemverzeichnis
# /sys/devices/platform/coretemp.0/hwmon/hwmon0/
# folgende Daten holen:
# ./name 'coretemp' Name der Temperaturmessung
# ./temp2_label 'Core 0' Name
# ./temp2_max '105000' MaxTemp
# ./temp2_input '46000' aktuelle Temperatur
# ./temp2_crit '105000' kritisch Temperatur
vzchns="/sys/devices/platform/coretemp.0/hwmon/hwmon0"
SvgQuelle="/mnt/sdb1/Quellen/upup-ef/Icons/mitInkscape/Temperatur/ColCels.svg"
SvgFile="ColCels.svg"
HighestT=0
export laufen=1
# the different colours of different temperatures in an Array
declare -a colours
colours+=('#018e4a')
colours+=('#018e4a')
colours+=('#b57b00')
colours+=('#8b0400')
colours+=('#f20000')
#echo "Colours-Array[\@]=${colours[@]} colours-Länge=${#colours[@]} colours[4]=[${colours[4]}]"
# the different show-heights for different temperatures in an Array
declare -a heights #Max height = -44 lowest +264 = in 5 steps of 44
heights+=('264')
heights+=('220')
heights+=('176')
heights+=('132')
heights+=('-88')
#Functions
function GetDatas() {
# GET DATAS
if [ -f "$vzchns/name" ]; then Name=$(cat "$vzchns/name"); fi
if [ -f "$vzchns/temp2_label" ]; then Label=$(cat "$vzchns/temp2_label"); fi
if [ -f "$vzchns/temp2_max" ]; then MaxT=$(cat "$vzchns/temp2_max"); echo -n "cat temp2_max="; cat "$vzchns/temp2_max"; fi
if [ -f "$vzchns/temp2_crit" ]; then CritT=$(cat "$vzchns/temp2_crit"); fi
if [ -f "$vzchns/temp2_input" ]; then AktT=$(cat "$vzchns/temp2_input"); fi
}
function Checks() {
# is actual Temperature ok?
if [ $AktT -ge 0 ] && [ $AktT -le 110000 ]; then echo "aktTemp scheint nutzbar zu sein"; else echo "aktuelle Temperatur $AktT ist Mist, breche ab"; exit; fi
# is maximal Temperature ok? if not, take 110
if [ $MaxT -ge 10000 ] && [ $MaxT -le 110000 ]; then echo "MaxTemp $MaxT scheint nutzbar zu sein"; else MaxT=110000; fi
# is the main-SVG-Source there? if not, exit
if [ ! -f $SvgQuelle ]; then echo "kann $SvgQuelle nicht finden, breche ab"; exit; fi
# cp main-SVG-Source to /tmp
cp -f $SvgQuelle /tmp
if [ ! -L /tmp/ColCels ] ; then ln -s $(which yad 2>/dev/null) /tmp/ColCels; fi
}
function Calculate() {
# Calculate, if actTemp is verylow, low, normal, high or dangerous
AktCelsiusPercent=$((100*$AktT/$MaxT))
echo "AktCelsiusPercent=\$((100*$AktT/$MaxT/1000))"
echo "AktCelsiusPercent=[$AktCelsiusPercent]% ( actual $AktT° Maximum $MaxT° " #42% at 46°
DangerClass=$((AktCelsiusPercent/25))
echo "DangerClass=[$DangerClass] height=[${heights[$DangerClass]} from ${heights[0]} to ${heights[4]} colour=[${colours[$DangerClass]}]" # 42%=1 testet with 110°=100%=DangerClass 4
# build the line with the changed Values #height=${heights[$DangerClass]} #colour=${colours[$DangerClass]}
NewLine=" d=\"M 172,${heights[$DangerClass]} L 171,300 C 114,323 83,360 83,421 C 83,501 149,566 229,566 C 309,566 374,501 374,421 C 374,357 340,318 279,297 L 279,${heights[$DangerClass]} L 172,${heights[$DangerClass]} L 172,${heights[$DangerClass]} z \" style=\"fill:${colours[$DangerClass]};fill-opacity:1;stroke:none\" "
echo "[$NewLine]" #rem this in reallife
}
function ChangeSvg() {
# change the Line with colour und GlassSize in /tmp/*.svg
# read it line by line, if it was the Line with colour/Size, write the new one, else write as read to a second file in /tmp
sikifs="$IFS"; IFS=$'\n'
tmptmp="/tmp/tmp.svg"
echo -n "" > $tmptmp
for line in $(cat /tmp/$SvgFile)
do
if [ "${line:0:13}" == ' d="M 172' ]
then echo "$NewLine" >> $tmptmp;
else echo "$line" >> $tmptmp
fi
done
# remove the /tmp/*.svg and move the new one to *.svg
rm "/tmp/$SvgFile"
mv "$tmptmp" "/tmp/$SvgFile"
}
function SetHighest() {
# check if the AktT is the highest recognized in this session
if [ -f /tmp/ColCels.dat ]; then HighestT=$(cat /tmp/ColCels.dat); fi
echo "if [ $AktT > $HighestT ]"
if [ $AktT -gt $HighestT ]; then echo -n $AktT > /tmp/ColCels.dat; echo "höher"; else echo "niedriger"; fi
}
function WriteInfoWinScript() {
echo "#!/bin/sh" > /tmp/ColCelsInfo
echo "MaxTmpFound=$(cat /tmp/ColCels.dat)" >> /tmp/ColCelsInfo
echo " export ColCelsInfo='<window title=\"ColCelsInfo\" name=\"Meldung\" window_position=\"2\" decorated=\"true\">
<vbox>
<text wrap=\"false\"><label>\" the highest Temperature was '\"\$MaxTmpFound\"' \"</label></text>
<button sensitive=\"true\" can-default=\"true\" has-default=\"true\" tooltip-text=\" close this Window \">
<label>Ok, thanks</label>
<variable>btnClosewindow</variable>
<action>closewindow:btnClosewindow</action>
</button>
<button tooltip-text=\" Finish watching temperature \">
<label>Quit</label>
<variable>QuitColCelWatch</variable>
<action>SetLaufen 0</action>
<action>closewindow:btnClosewindow</action>
</button>
</vbox>
</window>'
" >> /tmp/ColCelsInfo
echo "tmpAntwort=\$(gtkdialog4 --program=ColCelsInfo)" >> /tmp/ColCelsInfo
chmod 0757 /tmp/ColCelsInfo
}
# this commented func I use until all works,
# it calls the 'click on Temperature in Taskbar' via urxvt,
# and DONT't close the urxvt, I had to manually close it, so I can read error-messages before close
#function CallIt() {
# exec /tmp/ColCels --notification \
# --command="urxvt --geometry 120x5 -hold -e sh -c \" /tmp/ColCelsInfo \" " \
# --text "Klick for highest Temperature" --image="/tmp/$SvgFile" &
#}
# the real Action for 'Klick on Temperature in Taskbar'
function CallIt() {
exec /tmp/ColCels --notification \
--command="sh -c \" /tmp/ColCelsInfo \" " \
--text "Klick for highest Temperature" --image="/tmp/$SvgFile" &
}
function SetLaufen() {
echo "setze laufen auf $1"
laufen=$1
}
export -f SetLaufen
# check if ColCels is already running
if [ pidof /tmp/ColCels >/dev/nulll 2>&1 ] ; then exit; fi
#MAIN
GetDatas
Checks
Calculate
ChangeSvg
SetHighest
WriteInfoWinScript
CallIt
# loop every 10 seconds
while [ "$laufen" == 1 ]
do
GetDatas
Calculate
ChangeSvg
SetHighest
WriteInfoWinScript
# wait 10 seconds
sleep 10
done
IFS="$sikifs"
and both files (the script and the svg-image as archive:
http://eastler.de/tmp/ColCelInfo.tar.gz
HINTS: the Button 'Quit' doesn't work
for quit simply typ Ctrl+C (Strg+C) in the starting urxvt-window
for a perfect programm, the opening Window should show more,
for example also the CPU-tyte, the Max-Teperature
expand the archive in a directory, open a shell there,
start the script with
HolTemp in the shell
to stop it, type Ctrl+C - or simply close the shell-Window
ahhh, for 01micko: havn't include a FireIcon, but you are right,
it should be in
you can use it as you want, I share it here without any copyright-rule.
Hope it helps someone