[rancid] Rancid and Cisco Small Business SG500

heasley heas at shrubbery.net
Tue Dec 20 14:48:57 UTC 2016


Tue, Dec 20, 2016 at 11:57:48AM +0000, Alex DEKKER:
> On 2016-12-19 18:04, heasley wrote:
> > Wed, Apr 13, 2016 at 09:44:49AM +0000, Richard Savage:
> 
> >> + ! 1     06,13:16:41
> >> + ! 2     06,13:16:45
> >> + ! 3     06,13:16:41
> >>   !
> >>   !       Unit             SW version         Boot version         HW 
> >> version
> >>   !------------------- ------------------- ------------------- 
> >> -------------------
> >> 
> >> Is there a way that rancid can ignore this so that we don't get a diff 
> >> everytime rancid is run?
> > 
> > I've imported a version of cisco-sb for rancid 4.0, but need a little 
> > more
> > info to address this problem.  Can you tell me from which command this
> > output comes and show me the raw output?
> 
> show system:
> 
> $ csblogin sg500x
> 
> 
> 
> User Name:cisco
> Password:***********
> 
> 
> SG500X#sho system
> System Description:                       SG500X-24P 24-Port Gigabit 
> with 4-Port 10-Gigabit PoE Stackable Managed Switch
> System Up Time (days,hour:min:sec):       486,05:08:01
> System Contact:
> System Name:                              SG500X
> System Location:                          SG500X
> System MAC Address:                       d4:d7:48:d3:8e:16
> System Object ID:                         1.3.6.1.4.1.9.6.1.85.24.2
> 
> Fans Status:                              OK
> 
> 
>            Unit            Temperature (Celsius)            Status
> ------------------------ ------------------------ 
> ------------------------
>             1                        39                       OK
> 
> 
> SG500X#quit

Thats not the output that richard is complaining about, but the temperature
(per card?) that you have supplied seems like it needs to be filtered.  Does
the following do it?

Index: lib/iossb.pm.in
===================================================================
--- lib/iossb.pm.in	(revision 3568)
+++ lib/iossb.pm.in	(working copy)
@@ -133,6 +133,17 @@
 	/system description:\s+(.*)$/i &&
 	    ProcessHistory("COMMENTS","keysort","B0","! Chassis type: $1\n") &&
 	    next;
+	# filter individual card temperature
+	if (/unit\stemperature/i) {
+	    while (<$INPUT>) {
+		tr/\015//d;
+		return(0) if (/^$prompt/);
+		next if (/^(\s*|\s*$cmd\s*)$/);
+		next if (/^\s+\^$/);
+
+		last if (/^\s*$/);
+	    }
+	}
     }
     return(0);
 }

and can you me a 'show version'?



More information about the Rancid-discuss mailing list