[rancid] Cisco 10k sflog Timestamp Cycling

heasley heas at shrubbery.net
Wed Oct 23 15:17:56 UTC 2013


Wed, Oct 23, 2013 at 08:39:10AM +0200, Alan McKinnon:
> My feeling on these rapidly changing file listings is that they aren't
> worth keeping in the rancid output at all. They are expected to change
> frequently so the entire timestamp is worthless from a rancid POV,
> leaving only the filename. Is it worth recording merely that the file
> does exist, when we already know that it almost certainly will?

imo, yes - at least you know if the file disappears.

based on 3.0a, but ...

Index: lib/ios.pm.in
===================================================================
--- lib/ios.pm.in	(revision 2731)
+++ lib/ios.pm.in	(working copy)
@@ -817,7 +817,7 @@
 	# to:
 	#                                     vlan.dat
 	#                                            vlan.dat
-	if (/(dhcp_[^. ]*\.txt|vlan\.dat)\s*$/) {
+	if (/(dhcp_[^. ]*\.txt|vlan\.dat|sflog)\s*$/) {
 	    if (/(\s*\d+)(\s+)(\d+)(\s+)(\w+ \d+\s+\d+ \d+:\d+:\d+ .\d+:\d+)/) {
 		my($fn, $a, $sz, $c, $dt, $rem) = ($1, $2, $3, $4, $5, $');
 		my($fnl, $szl, $dtl) = (length($fn), length($sz), length($dt));
@@ -884,7 +884,7 @@
 	# to:
 	#       -rw-                                   vlan.dat
 	#       -rw-                                           vlan.dat
-	if (/(dhcp_[^. ]*\.txt|vlan\.dat)\s*$/) {
+	if (/(dhcp_[^. ]*\.txt|vlan\.dat|sflog)\s*$/) {
 	    if (/(\s*\d+)(\s+\S+\s+)(\d+)(\s+)(\w+ \d+\s+\d+ \d+:\d+:\d+ .\d+:\d+)/) {
 		my($fn, $a, $sz, $c, $dt, $rem) = ($1, $2, $3, $4, $5, $');
 		my($fnl, $szl, $dtl) = (length($fn), length($sz), length($dt));
@@ -921,9 +921,6 @@
 	if ($ios eq "XE" && /^((\s+)?\d+\s+\S+)\s+\d+.*(tracelogs$)/) {
 	    $_ = "$1" . sprintf("%43s", "") . "$3\n";
 	}
-	if ($ios eq "IOS" && /^((\s+)?\d+\s+\S+)\s+\d+.*(sflog$)/) {
-	    $_ = "$1" . sprintf("%43s", "") . "$3\n";
-	}
 	# the pager can not be disabled per-session on the PIX
 	if (/^(<-+ More -+>)/) {
 	    my($len) = length($1);


More information about the Rancid-discuss mailing list