Added CoreTemp.sh and updated README.md

This commit is contained in:
Ulf 2022-04-19 22:48:03 +02:00
parent f34e859181
commit 4223f06149
2 changed files with 28 additions and 0 deletions

26
CoreTemp.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
# Read Core temperature for different CPUs (Intel and AMD)
#
# (c) GPL by Ulf Bartholomäus ub1x@gmx.net
VERSION="$( basename $0 ) Version 0.1.1 from 19.04.2022"
#
# Input: n/a
# Output: temperatur
# Returnvalue: n/a
#
#
# Changes:
# 0.1.1: initial version
mySensors=$(sensors)
#amd old
if [ "${mySensors/k10}" != "${mySensors}" ] ; then
sensors | sed -nE 's/^Tdie: *([^ ]*)/{\1}/p'
#amd new
elif [ "${mySensors/Tctl}" != "${mySensors}" ] ; then
sensors | sed -nE 's/^Tctl: *([^ ]*)/\1/p'
#intel
elif [ "${mySensors/core}" != "${mySensors}" ]] ; then
sensors | sed -ne 's/^Core*//p' | sed 's/°C.*/°C/' | sed 's/.*+/+/'
fi

View file

@ -21,3 +21,5 @@ See also at [LUG-VS-Wiki Nützliche Scripte](https://lug-vs.org//lugvswiki/index
|[wmf2svg.sh](wmf2svg.sh)|Example script converts WMF files in SVG to share it easily on the internet|
|[write-exif-comment.sh](write-exif-comment.sh)|Write JPEG EXIF comment in all *.jpg files|
|[CheckBackup.sh](CheckBackup.sh)|Check if the anacron tasks and give the status of the next backup|
|[CoreTemp.sh](CoreTemp.sh)|Read Core Temperature from Intel and AMD CPUs|