mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(change version)
bug fix for cpu data. Make sure all cpu counts are > 1 for tests.
This commit is contained in:
parent
a2c6aabcd8
commit
2201b388c9
22
inxi
22
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.1.9
|
#### version: 1.1.10
|
||||||
#### Date: August 3 2009
|
#### Date: August 4 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -146,7 +146,8 @@
|
||||||
|
|
||||||
## NOTE: we can use hwinfo if it's available in all systems, or most, to get
|
## NOTE: we can use hwinfo if it's available in all systems, or most, to get
|
||||||
## a lot more data and verbosity levels going
|
## a lot more data and verbosity levels going
|
||||||
|
# set to default LANG to avoid locales errors with , or .
|
||||||
|
LANG=C
|
||||||
### Variable initializations: null values
|
### Variable initializations: null values
|
||||||
CMDL_MAX=''
|
CMDL_MAX=''
|
||||||
COLOR_SCHEME=''
|
COLOR_SCHEME=''
|
||||||
|
@ -1998,7 +1999,7 @@ get_cpu_ht_multicore_smp_data()
|
||||||
|
|
||||||
# looking at logical processor counts over 1, which means either HT, SMP or MCP
|
# looking at logical processor counts over 1, which means either HT, SMP or MCP
|
||||||
# http://en.wikipedia.org/wiki/Symmetric_multiprocessing
|
# http://en.wikipedia.org/wiki/Symmetric_multiprocessing
|
||||||
if ( processor_logical_count > 1 ) {
|
if ( processor_logical_count > 1 && core_count > 1 ) {
|
||||||
if ( processor_logical_count > core_count && physical_cpu_count > 1 ) {
|
if ( processor_logical_count > core_count && physical_cpu_count > 1 ) {
|
||||||
type = "SMP-HT" # could be Xeon/P4 HT dual cpu
|
type = "SMP-HT" # could be Xeon/P4 HT dual cpu
|
||||||
}
|
}
|
||||||
|
@ -3263,7 +3264,7 @@ get_sensors_data()
|
||||||
if ( cpuTempReal == "" && core0Temp != "" ) {
|
if ( cpuTempReal == "" && core0Temp != "" ) {
|
||||||
cpuTempReal=core0Temp
|
cpuTempReal=core0Temp
|
||||||
}
|
}
|
||||||
|
|
||||||
# then the real mobo temp
|
# then the real mobo temp
|
||||||
if ( moboTemp != "" ){
|
if ( moboTemp != "" ){
|
||||||
moboTempReal=moboTemp
|
moboTempReal=moboTemp
|
||||||
|
@ -3285,9 +3286,11 @@ get_sensors_data()
|
||||||
# because that creates an array item in gawk just by the test itself
|
# because that creates an array item in gawk just by the test itself
|
||||||
if ( tempFanType == 1 && 1 in aFanDefault ) {
|
if ( tempFanType == 1 && 1 in aFanDefault ) {
|
||||||
aFanMain[1]=aFanDefault[1]
|
aFanMain[1]=aFanDefault[1]
|
||||||
|
aFanDefault[1]=""
|
||||||
}
|
}
|
||||||
else if ( tempFanType == 2 && 2 in aFanDefault ) {
|
else if ( tempFanType == 2 && 2 in aFanDefault ) {
|
||||||
aFanMain[1]=aFanDefault[2]
|
aFanMain[1]=aFanDefault[2]
|
||||||
|
aFanDefault[2]=""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3314,7 +3317,13 @@ get_sensors_data()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# now see if you can find the fast little mobo fan, > 5000 rpm and put it as mobo
|
# now see if you can find the fast little mobo fan, > 5000 rpm and put it as mobo
|
||||||
|
# note that gawk is returning true for some test cases when aFanDefault[j] < 5000
|
||||||
|
# which has to be a gawk bug, unless there is something really weird with arrays
|
||||||
|
# note: 500 > aFanDefault[j] < 1000 is the exact trigger, and if you manually
|
||||||
|
# assign that value below, the > 5000 test works again, and a print of the value
|
||||||
|
# shows the proper value, so the corruption might be internal in awk.
|
||||||
for (j = 1; j <= indexCountaFanDefault; j++) {
|
for (j = 1; j <= indexCountaFanDefault; j++) {
|
||||||
if ( j in aFanDefault && aFanDefault[j] > 5000 && aFanMain[2] == "" ) {
|
if ( j in aFanDefault && aFanDefault[j] > 5000 && aFanMain[2] == "" ) {
|
||||||
aFanMain[2] = aFanDefault[j]
|
aFanMain[2] = aFanDefault[j]
|
||||||
|
@ -3326,7 +3335,8 @@ get_sensors_data()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# then construct the sys_fan string for echo
|
# then construct the sys_fan string for echo, note that iteration 1
|
||||||
|
# makes: fanDefaultString separator null, ie, no space or ,
|
||||||
for (j = 1; j <= indexCountaFanDefault; j++) {
|
for (j = 1; j <= indexCountaFanDefault; j++) {
|
||||||
fanDefaultString = fanDefaultString separator aFanDefault[j]
|
fanDefaultString = fanDefaultString separator aFanDefault[j]
|
||||||
separator=","
|
separator=","
|
||||||
|
|
Loading…
Reference in a new issue