[rancid] Cisco 10k sflog Timestamp Cycling

Kenneth Lind lind108 at hotmail.com
Fri Jun 13 20:12:32 UTC 2014


> -----Original Message-----
> From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On
> Behalf Of Kenneth Lind
> Sent: Friday, June 13, 2014 12:26 PM
> To: 'heasley'
> Cc: rancid-discuss at shrubbery.net
> Subject: Re: [rancid] Cisco 10k sflog Timestamp Cycling
> 
> > -----Original Message-----
> > From: heasley [mailto:heas at shrubbery.net]
> > Sent: Friday, June 13, 2014 2:05 AM
> > To: Kenneth Lind
> > Cc: 'heasley'; rancid-discuss at shrubbery.net
> > Subject: Re: [rancid] Cisco 10k sflog Timestamp Cycling
> >
> > 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");
> 
> Am I doing that wrong if I put that in ios.pm? Doing so caused quite a
> few errors in the logs.

Disregard this last question. I stumbled upon another fault with the server
unrelated to this that appeared about the same time I implemented these
changes to lib/ios.pm. I've re-implemented and successfully ran error free
now.

I am unsure if I have a way to test this issue other than waiting for peak
usage time to spike the IPDR data to the max. I'll update in a few days
after monitoring unless there's some other method that someone would like to
suggest.

> 
> 
> 
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss



More information about the Rancid-discuss mailing list