mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
branch one, another cpu temp adjustment to handle PECI. will need to look at more data sets to see what is safe to do re overrides.
This commit is contained in:
parent
fa39436326
commit
0074e0fe1f
27
inxi
27
inxi
|
@ -2,8 +2,8 @@
|
|||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### Version: 2.1.23
|
||||
#### Date: 2014-04-27
|
||||
#### Patch Number: 02-b1
|
||||
#### Date: 2014-04-28
|
||||
#### Patch Number: 03-b1
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -8211,6 +8211,7 @@ get_sensors_data()
|
|||
sysFanString=""
|
||||
temp1=""
|
||||
temp2=""
|
||||
tempDiff=20 # for C, handled for F after that is determined
|
||||
tempFanType="" # set to 1 or 2
|
||||
tempUnit=""
|
||||
tempWorking=""
|
||||
|
@ -8389,9 +8390,13 @@ get_sensors_data()
|
|||
tempFanType=1
|
||||
}
|
||||
}
|
||||
# convert the diff number for F, it needs to be bigger that is
|
||||
if ( tempUnit == "F" ) {
|
||||
tempDiff = tempDiff * 1.8
|
||||
}
|
||||
if ( cpuTemp != "" ) {
|
||||
# specific hack to handle broken CPUTIN temps with PECI
|
||||
if ( cpuPeciTemp != "" && ( cpuTemp - cpuPeciTemp ) > 20 ){
|
||||
if ( cpuPeciTemp != "" && ( cpuTemp - cpuPeciTemp ) > tempDiff ){
|
||||
cpuTempReal=cpuPeciTemp
|
||||
}
|
||||
# then get the real cpu temp, best guess is hottest is real
|
||||
|
@ -8407,21 +8412,15 @@ get_sensors_data()
|
|||
else {
|
||||
cpuTempReal=temp2
|
||||
}
|
||||
# last check for bad data
|
||||
if ( cpuTempReal != "" && core0Temp != "" && (core0Temp - cpuTempReal) > 10 ) {
|
||||
cpuTempReal=core0Temp
|
||||
}
|
||||
}
|
||||
else {
|
||||
# there are some absurdly wrong temp1: acpitz-virtual-0 temp1: +13.8°C
|
||||
if ( core0Temp != "" ) {
|
||||
cpuTempReal=core0Temp
|
||||
}
|
||||
else {
|
||||
cpuTempReal=temp1 # can be null, that is ok
|
||||
}
|
||||
cpuTempReal=temp1 # can be null, that is ok
|
||||
}
|
||||
}
|
||||
# there are some absurdly wrong temp1: acpitz-virtual-0 temp1: +13.8°C
|
||||
if ( cpuTempReal != "" && core0Temp != "" && (core0Temp - cpuTempReal) > tempDiff ) {
|
||||
cpuTempReal=core0Temp
|
||||
}
|
||||
# if all else fails, use core0/peci temp if present and cpu is null
|
||||
if ( cpuTempReal == "" ) {
|
||||
if ( core0Temp != "" ) {
|
||||
|
|
Loading…
Reference in a new issue