[rancid] Cisco 10k sflog Timestamp Cycling

heasley heas at shrubbery.net
Fri Jun 13 06:04:38 UTC 2014


Mon, Jun 09, 2014 at 10:18:21AM -0400, Kenneth Lind:
> > -----Original Message-----
> > From: heasley [mailto:heas at shrubbery.net]
> > Sent: Thursday, June 05, 2014 5:27 PM
> > To: Kenneth Lind
> > Cc: rancid-discuss at shrubbery.net
> > Subject: Re: [rancid] Cisco 10k sflog Timestamp Cycling
> > 
> > Thu, Jun 05, 2014 at 02:24:41PM -0400, Kenneth Lind:
> > > This is a fairly old issue so I'm including the previous threads for
> > > what it's worth. We upgraded to Rancid v3.0 and then today to v3.1
> > without issue.
> > > The upgrade to 3.0a did hush the actual sflog diffs, however, we are
> > > still receiving noisy diffs related to the sflog/IPDR data and the
> > > fact that n bytes are stored in flash before being sent to the
> > collector.
> > >
> > > What would be the best method to hush these diffs?
> > >
> > > Example of diffs:
> > >   !Flash:                                           sflog
> > > - !Flash: 821772288 bytes available (202817536 bytes used)
> > > + !Flash: 821805056 bytes available (202784768 bytes used)
> > 
> > would you show me the output of the command 'dir' or 'show flash' for
> > whatever device this is?  it should be replacing that line with a
> > sumarry line that ought to be less annoying.
> 
> "Dir" and "show flash" look a little different, so I'll include both.
> 
> First "dir"
> Directory of disk0:/
> 
>     1  -rw-    68483912  Dec 14 2010 10:46:02 -05:00  <removed>.bin
>     2  -rw-    68495176  Jan 25 2011 01:27:54 -05:00  <removed>.bin
>     3  -rw-    54584320  Jan 25 2011 01:30:40 -05:00  <removed>.pkg
>     4  -rw-    11060935  Jul 31 2012 10:09:38 -04:00  <removed>.img
>     5  -rw-      115639  Mar 28 2013 10:24:54 -04:00  ftp
>     6  -rw-           0   Jun 9 2014 10:01:30 -04:00  sflog
> 
> 
> "show flash"
> -#- --length-- -----date/time------ path
> 1     68483912 Dec 14 2010 10:46:02 -05:00 <removed>.bin
> 2     68495176 Jan 25 2011 01:27:54 -05:00 <removed>.bin
> 3     54584320 Jan 25 2011 01:30:40 -05:00 <removed>.pkg
> 4     11060935 Jul 31 2012 10:09:38 -04:00 <removed>.img
> 5       115639 Mar 28 2013 10:24:54 -04:00 ftp
> 6            0 Jun 9 2014 10:01:30 -04:00 sflog
> 

Does this patch fix the space available line (summarize it)?

Index: lib/ios.pm.in
===================================================================
--- lib/ios.pm.in	(revision 2847)
+++ lib/ios.pm.in	(working copy)
@@ -848,6 +848,20 @@
 	# Drop these files entirely.
 	/\s+(private-multiple-fs|multiple-fs|LISP-MapCache-IPv\S+|nv_hdr)$/ &&
 	    next;
+
+	if ($ios eq "XE" && /(\d+) bytes available \(\d+ bytes used\)/) {
+	    my($tmp) = $1;
+	    if ($tmp >= (1024 * 1024 * 1024)) {
+		$tmp = int($tmp / (1024 * 1024 * 1024));
+		$_ = "$tmp GB free";
+	    } elsif ($tmp >= (1024 * 1024)) {
+		$tmp = int($tmp / (1024 * 1024));
+		$_ = "$tmp MB free";
+	    } else {
+		$tmp = int($tmp / 1024);
+		$_ = "$tmp KB free";
+	    }
+	}
 	ProcessHistory("FLASH","","","!Flash: $_");
     }
     ProcessHistory("","","","!\n");



More information about the Rancid-discuss mailing list