From d1b260fff66a69e5a5925533d59016c16f2225cd Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 27 Jul 2009 21:32:18 +0000 Subject: [PATCH] fine tuned sys fan speeds --- inxi | 51 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/inxi b/inxi index 36cc8f1..3d5fc7a 100755 --- a/inxi +++ b/inxi @@ -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 } } '