[rancid] Force10 FTOS 9 still triggering alerts due to flash mod time changing and fan speed

heasley heas at shrubbery.net
Tue Jan 31 22:16:51 UTC 2017


Mon, Jan 30, 2017 at 08:16:54PM -0500, Doug Hughes:
> 
> Yes, this is relatively easy to fix.
> 
> for the first I'd add a line in your ShowFlash proc near the other 'next 
> if' lines like so:
> 
> next if / \.?$/;
> (that will skip the . and .. entries.)
> 
> for the next it'd be in the ShowChassis procedure you could do something 
> similar, however if you care about the fan status but not the speed 
> (reasonable), you have to do a little more processing. There are ways 
> you could do this with more work by eliminating the speed, but the 
> simple answer might be:
> 
> next if / up /;
> 
> It's a little bit scattershot, but it will quiet the noise unless 
> something important comes up with a fan or a power supply. (It's also 
> easier than testing the alternate)

or

Index: CHANGES
===================================================================
--- CHANGES	(revision 3601)
+++ CHANGES	(working copy)
@@ -1,4 +1,7 @@
 3.99.99
+	f10rancid: WS after filenames in some versions cause the dir and
+	parent dir filters to fail.
+
 	fnrancid: filter last-login - Merijn Evertse
 
 	sros.pm: drop unnecessary command: file type config.dbg - Greg Hankins
Index: bin/f10rancid.in
===================================================================
--- bin/f10rancid.in	(revision 3586)
+++ bin/f10rancid.in	(working copy)
@@ -345,7 +345,7 @@
 
 	/Directory of/ && next;
 	# . & ..
-	/ \.{1,2}$/ && next;
+	/ \.{1,2}\s+$/ && next;
 
 	# clean up totals line
 	if (/.* (\d+) bytes total/) {

Tue, Jan 31, 2017 at 10:13:26PM +0000, heasley:
Index: CHANGES
===================================================================
--- CHANGES	(revision 3602)
+++ CHANGES	(working copy)
@@ -1,4 +1,6 @@
 3.99.99
+	f10rancid: remove s4048 PS fan speed
+
 	f10rancid: WS after filenames in some versions cause the dir and
 	parent dir filters to fail.
 
Index: bin/f10rancid.in
===================================================================
--- bin/f10rancid.in	(revision 3602)
+++ bin/f10rancid.in	(working copy)
@@ -241,7 +241,7 @@
 
     while (<INPUT>) {
 	tr/\015//d;
-	last if (/^$prompt/);
+REDO:	last if (/^$prompt/);
 	next if (/^(\s*|\s*$cmd\s*)$/);
 	return(1) if /(Invalid input|Type help or )/;
 	return(1) if /( *\^$)/;
@@ -259,6 +259,42 @@
 	# E600 AC PSMs
 	/Status        : up/ && next;
 	/High line/ && next;
+	# PS fans
+	if (/power\s+supplies/i) {
+	    ProcessHistory("COMMENTS","keysort","CHASSIS","!Chassis: $_");
+
+	    while (<INPUT>) {
+		tr/\015//d;
+		if (/^$prompt/) {
+		    goto OUT;
+		}
+		last if (/^$/);
+		# remove any trailing WS
+		s/\s+$//;
+		next if (/^----+$/);
+		# s4048 style
+		if (/(Unit\s+Bay\s+Status\s+Type\s+FanStatus)\s+FanSpeed/) {
+		    ProcessHistory("COMMENTS","keysort","CHASSIS",
+		    		   "!Chassis: $1\n");
+		    while (<INPUT>) {
+			tr/\015//d;
+			if (/^$prompt/) {
+			    goto OUT;
+			}
+			last if (/^$/);
+			# remove any trailing WS
+			s/\s+$//;
+			# consume the following separator line
+			next if (/^----+$/);
+			/^(\s+\d+\s+\d+\s+\S+\s+\S+\s+\S+)\s+\S+/ &&
+			    ProcessHistory("COMMENTS","keysort","CHASSIS",
+			    "!Chassis: $1\n") && next;
+			last;
+		    }
+		    goto REDO;
+		}
+	    }
+	}
 	# fans
 	if (/Fan\s+Status/i) {
 	    ProcessHistory("COMMENTS","keysort","CHASSIS","!Chassis: $_");



More information about the Rancid-discuss mailing list