fine tuned sys fan speeds

This commit is contained in:
inxi-svn 2009-07-27 21:32:18 +00:00
parent a4dde53b0f
commit d1b260fff6

51
inxi
View file

@ -1,8 +1,8 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 1.0.91-b1
#### Date: 26 July 2009
#### version: 1.0.92-b1
#### Date: 27 July 2009
########################################################################
#### SPECIAL THANKS
########################################################################
@ -3025,6 +3025,7 @@ get_sensors_data()
temp1=""
temp2=""
cpuFan=""
psFan=""
sysFan1=""
sysFan2=""
sysFan3=""
@ -3069,14 +3070,44 @@ get_sensors_data()
cpuFan=$3
}
}
/^fan1:/ {
sysFan1=$2
/^fan1:|FAN1 Speed:/ {
if ( $1 == "fan1:" ){
sysFan1=$2
}
else if ( $2 == "Speed:" ) {
sysFan1=$3
}
else if ( $3 == "Speed:" ) {
sysFan1=$4
}
}
/^fan2:/ {
sysFan2=$2
/^fan2:|FAN2 Speed:/ {
if ( $1 == "fan2:" ){
sysFan2=$2
}
else if ( $2 == "Speed:" ) {
sysFan2=$3
}
else if ( $3 == "Speed:" ) {
sysFan2=$4
}
}
/^fan3:/ {
sysFan3=$2
/^fan3:|FAN3 Speed:/ {
if ( $1 == "fan3:" ){
sysFan3=$2
}
else if ( $2 == "Speed:" ) {
sysFan3=$3
}
else if ( $3 == "Speed:" ) {
sysFan3=$4
}
}
/Power_FAN Speed:/ {
psFan=$3
}
/POWER FAN Speed:/ {
psFan=$4
}
END {
@ -3150,12 +3181,12 @@ get_sensors_data()
cpuTempReal = cpuTempReal tempUnit
}
# if they are ALL null, print error message
# if they are ALL null, print error message. psFan is not used in output currently
if ( moboTempReal == "" && cpuTempReal == "" && cpuFanReal == "" && sysFan1Real == "" && sysFan2Real == "" && sysFan3Real == "" ) {
print "No active sensors found. Have you configured your sensors yet?"
}
else {
print moboTempReal "," cpuTempReal "," cpuFanReal "," sysFan1 "," sysFan2 "," sysFan3
print moboTempReal "," cpuTempReal "," cpuFanReal "," sysFan1 "," sysFan2 "," sysFan3 "," psFan
}
}
'