mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
fine tuned, moved cpu temp to position 1
This commit is contained in:
parent
d9b0fde91a
commit
7b5d5275e9
34
inxi
34
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.0.96-b1
|
||||
#### version: 1.0.97-b1
|
||||
#### Date: 27 July 2009
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -3182,11 +3182,11 @@ get_sensors_data()
|
|||
}
|
||||
|
||||
# if they are ALL null, print error message. psFan is not used in output currently
|
||||
if ( moboTempReal == "" && cpuTempReal == "" && cpuFanReal == "" && sysFan1Real == "" && sysFan2Real == "" && sysFan3Real == "" ) {
|
||||
if ( cpuTempReal == "" && moboTempReal == "" && cpuFanReal == "" && sysFan1Real == "" && sysFan2Real == "" && sysFan3Real == "" ) {
|
||||
print "No active sensors found. Have you configured your sensors yet?"
|
||||
}
|
||||
else {
|
||||
print moboTempReal "," cpuTempReal "," cpuFanReal "," sysFan1 "," sysFan2 "," sysFan3 "," psFan
|
||||
print cpuTempReal "," moboTempReal "," cpuFanReal "," sysFan1 "," sysFan2 "," sysFan3 "," psFan
|
||||
}
|
||||
}
|
||||
'
|
||||
|
@ -4062,22 +4062,22 @@ print_sensors_data()
|
|||
|
||||
# initial error cases, for missing app or unconfigured sensors
|
||||
if [[ ${#A_SENSORS_DATA[@]} -eq 1 ]];then
|
||||
mobo_temp=${A_SENSORS_DATA[0]}
|
||||
cpu_temp=${A_SENSORS_DATA[0]}
|
||||
b_is_error='true'
|
||||
else
|
||||
if [[ -n ${A_SENSORS_DATA[0]} ]];then
|
||||
mobo_temp=${A_SENSORS_DATA[0]}
|
||||
else
|
||||
mobo_temp='N/A'
|
||||
fi
|
||||
mobo_temp="${C1}System Temperatures: mobo:${C2} $mobo_temp "
|
||||
|
||||
if [[ -n ${A_SENSORS_DATA[1]} ]];then
|
||||
cpu_temp=${A_SENSORS_DATA[1]}
|
||||
cpu_temp=${A_SENSORS_DATA[0]}
|
||||
else
|
||||
cpu_temp='N/A'
|
||||
fi
|
||||
cpu_temp="${C1}cpu:${C2} $cpu_temp "
|
||||
cpu_temp="${C1}System Temperatures: cpu:${C2} $cpu_temp "
|
||||
|
||||
if [[ -n ${A_SENSORS_DATA[1]} ]];then
|
||||
mobo_temp=${A_SENSORS_DATA[1]}
|
||||
else
|
||||
mobo_temp='N/A'
|
||||
fi
|
||||
mobo_temp="${C1}mobo:${C2} $mobo_temp "
|
||||
|
||||
# we need to make sure it's either cpu fan OR cpu fan and sys fan 1
|
||||
if [[ -n ${A_SENSORS_DATA[2]} ]];then
|
||||
|
@ -4091,19 +4091,19 @@ print_sensors_data()
|
|||
# then set the sys fans, if present or 0. sys fan 1 only if cpu fan is present,
|
||||
# otherwise fan1: is cpu fan
|
||||
if [[ -n ${A_SENSORS_DATA[2]} && -n ${A_SENSORS_DATA[3]} ]];then
|
||||
sys_fan1="${C1}sys1:${C2} ${A_SENSORS_DATA[3]} "
|
||||
sys_fan1="${C1}sys-1:${C2} ${A_SENSORS_DATA[3]} "
|
||||
fi
|
||||
if [[ -n ${A_SENSORS_DATA[4]} ]];then
|
||||
sys_fan2="${C1}sys2:${C2} ${A_SENSORS_DATA[4]} "
|
||||
sys_fan2="${C1}sys-2:${C2} ${A_SENSORS_DATA[4]} "
|
||||
fi
|
||||
if [[ -n ${A_SENSORS_DATA[5]} ]];then
|
||||
sys_fan3="${C1}sys3:${C2} ${A_SENSORS_DATA[5]} "
|
||||
sys_fan3="${C1}sys-3:${C2} ${A_SENSORS_DATA[5]} "
|
||||
fi
|
||||
if [[ -n ${A_SENSORS_DATA[6]} ]];then
|
||||
ps_fan="${C1}ps:${C2} ${A_SENSORS_DATA[6]} "
|
||||
fi
|
||||
fi
|
||||
temp_data="$mobo_temp$cpu_temp"
|
||||
temp_data="$cpu_temp$mobo_temp"
|
||||
temp_data=$( create_print_line "Sensors:" "$temp_data" )
|
||||
print_screen_output "$temp_data"
|
||||
# don't print second or subsequent lines if error data
|
||||
|
|
Loading…
Reference in a new issue