--- /usr/sbin/monitorix.old.pl	2010-02-22 12:16:25.000000000 +0100
+++ /usr/sbin/monitorix.pl	2010-02-22 12:39:19.000000000 +0100
@@ -3042,6 +3042,7 @@
 	my $cpu;
 	my $fan;
 	my $rrdata = "N";
+	my $count;
 
 	if(($OSTYPE eq "Linux-RHFC") ||
 	  ($OSTYPE eq "Linux-Arch") ||
@@ -3053,9 +3054,17 @@
 		if(scalar(%SENSORS_LIST)) {
 			no warnings;
 	  		open(SENSORS, "sensors |");
-			while(<SENSORS>) {
+	  		my @rawsensors = <SENSORS>;
+	  		my $lines = @rawsensors;
+			close(SENSORS);
+	  		for  ($count=0; $count < $lines; $count++) {
+				$_ = @rawsensors[$count];
 				if($SENSORS_LIST{'MB'} && (/$SENSORS_LIST{'MB'}/) && (!/RPM/)) {
 					my (undef, $tmp) = split(':', $_);
+					if ($tmp eq "\n") {
+						$count++;
+						$tmp = $rawsensors[$count];
+					}
 					($MB, undef) = split(' ', $tmp);
 					$MB =~ s/[-]/./;
 					$MB =~ s/[^0-9.]//g;
@@ -3064,8 +3073,11 @@
 				for($n = 1; $n < 5; $n++) {
 					$cpu = "CPU" . $n;
 					if($SENSORS_LIST{$cpu} && (/$SENSORS_LIST{$cpu}/) && (!/RPM/)) {
-
 						my (undef, $tmp) = split(':', $_);
+						if ($tmp eq "\n") {
+							$count++;
+							$tmp = $rawsensors[$count];
+						}
 						my ($value, undef) = split(' ', $tmp);
 						$value =~ s/[-]/./;
 						$value =~ s/[^0-9.]//g;
@@ -3076,6 +3088,10 @@
 					$fan = "FAN" . $n;
 					if($SENSORS_LIST{$fan} && (/$SENSORS_LIST{$fan}/) && (/RPM/)) {
 						my (undef, $tmp) = split(':', $_);
+                                                if ($tmp eq "\n") {
+                                                        $count++;
+                                                        $tmp = $rawsensors[$count];
+                                                }
 						my ($value, undef) = split(' ', $tmp);
 						$value =~ s/[^0-9]//g;
 						$FAN[$n] = int($value);
@@ -3083,7 +3099,6 @@
 				}
 	
 			}
-			close(SENSORS);
 		}
 		$MB = defined($MB) ? $MB : 0;
 		$CPU[1] = defined($CPU[1]) ? $CPU[1] : 0;
