Re: [rancid] Getting a lot of noise related to ce_switch.log and ce_switch.log.bak

2019-07-18 Thread john heasley
Wed, Jul 17, 2019 at 12:36:04AM +, heasley:
> Wed, Jul 10, 2019 at 01:39:34AM -0700, Dan Mahoney (Gushi):
> > On Tue, 11 Sep 2018, heasley wrote:
> > 
> > > Mon, Sep 10, 2018 at 01:45:42AM -0700, Dan Mahoney (Gushi):
> > >> Hey all,
> > >>
> > >> I'm running Rancid built from freebsd packages, rancid3-3.7
> > >>
> > >> Periodically, my ASR9K's log something like this:
> > >>
> > >>   !Flash: harddisk: 24753   -rwx  800470016   Wed Sep 10 20:00:00 
> > >> 2014
> > >> VM-ASR9K-px-4.3.4.tar
> > >> - !Flash: harddisk: 24623   -rw-
> > >> ce_switch.log
> > >> + !Flash: harddisk: 24781   -rw-  8192017 Mon Sep 10 05:10:03 
> > >> 2018
> > >> ce_switch.log.bak
> > >>   !Flash: harddisk: 24688   -rw-  1048576 Thu Sep 11 02:08:46 
> > >> 2014
> > >> kd.bin_0_RSP0_CPU0
> > >>   !Flash: harddisk: 24625   drwx  4096Thu Sep 11 01:38:55 
> > >> 2014
> > >> idiags
> > >>   !Flash: harddisk: 24626   -rw-  0   Thu Sep 11 01:40:24 
> > >> 2014
> > >> ahci.log
> > >>   !Flash: harddisk: 24627   drwx  4096Thu Sep 11 02:20:32 
> > >> 2014
> > >> np
> > >> - !Flash: harddisk: 24783   -rw-  8192017 Fri Sep  7 08:18:57 
> > >> 2018
> > >> ce_switch.log.bak
> > >> + !Flash: harddisk: 24628   -rw-
> > >> ce_switch.log
> > >>   !Flash: harddisk: 6442434560 bytes total (4 GB free)
> > >>
> > >> I thought I saw something on the mailing lists that this was fixed in a
> > >> prior version, but I guess not.  How would I go about tweaking rancid so
> > >> these bits are ignored?
> > >
> > > add a filter to DirSlotN().  i see that your device is renaming files,
> > > causing the fileno to change.  I'll add that filter for 3.9.
> > 
> > Sorry to revive an old thread.
> > 
> > I've upgraded to 3.9, but this doesn't seem to have been fixed:
> 
> My mistake; I made this change to ios.pm, but did not also change iosxr.pm.
> I'll work on that change.

ftp://ftp.shrubbery.net/pub/rancid/alpha/rancid-3.9.99.tar.gz

or

diff --git a/CHANGES b/CHANGES
index fbf20763..4139a17a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,4 @@
 3.9.99
-   iosxr.pm: DirSlotN(): drop the file number from all files.
-
Missing Arista documentation - github.com/inphobia
 
GC "procket" from manpages & README
diff --git a/lib/iosxr.pm.in b/lib/iosxr.pm.in
index 5c2e7008..1af4fd8e 100644
--- a/lib/iosxr.pm.in
+++ b/lib/iosxr.pm.in
@@ -555,7 +555,7 @@ sub DirSlotN {
}
# filter frequently changing files from IOX bootflash, hardiska,
# and nvram
-   if ($dev =~ /(bootflash|disk[012]|harddisk|nvram)/) {
+   if ($dev =~ /(bootflash|disk0|harddisk|nvram)/) {
if (/\s(\.python-history|aaa|\.bash_history)\s*$/ ||
/\s(ce_switch.log\S*|cisco_support|errmsg_cont)\s*$/ ||
/\s(genstr_cont|temp_cont|temp_cont|temp_static_data)\s*$/ ||
@@ -564,47 +564,50 @@ sub DirSlotN {
# 57  -rw-  23100 volt_cont
# 614788  drwx  4096Fri Aug 20 12:06:25 2010  
temp_cont
# to
-   # -rw-volt_cont
-   # drwxtemp_cont
-   if (/\s*\d+\s+(\S+\s+)(\d+)(\s+)()(\s+)/) {
+   # 57  -rw-volt_cont
+   # 614788  drwx
temp_cont
+   if (/(\s*\d+\s+\S+\s+)(\d+)(\s+)()(\s+)/) {
my($a, $sz, $c, $dt, $d, $rem) = ($1, $2, $3, $4, $5, $');
my($szl) = length($sz);
my($fmt) = "%s%-". $szl ."s%s%s%s%s";
-   $_ = sprintf($fmt, $c, $dt, $d, $rem);
+   $_ = sprintf($fmt, $a, "", $c, $dt, $d, $rem);
ProcessHistory("FLASH","keysort",$rem,"!Flash: $dev: $_");
next;
-   } elsif (/\s*\d+\s+(\S+\s+\d+\s+)(\d+\s+\w+\s+\d+\s+\d+:\d+)/) {
+   } elsif 
(/(\s*\d+)(\s+\S+\s+\d+\s+)(\d+\s+\w+\s+\d+\s+\d+:\d+)/) {
# XR >= 6.3; dir disk0:, but harddisk: is diff format.  wtf
# drop fileno size, & date.
# " 8002 drwxr-xr-x 2 4096 Jan 17 15:27 np"
-   my($perm, $dt, $rem) = ($1, $2, $');
-   my($dtl) = length($dt);
-   my($fmt) = "%s%-". $dtl ."s%s";
-   $_ = sprintf($fmt, $perm, "", $rem);
+   my($fn, $perm, $dt, $rem) = ($1, $2, $3, $');
+   my($fnl, $dtl) = (length($fn), length($dt));
+   my($fmt) = "%-". $fnl ."s%s%-". $dtl ."s%s";
+   $_ = sprintf($fmt, "", $perm, "", $rem);
ProcessHistory("FLASH","keysort",$rem,"!Flash: $dev: $_");
next;
-   } elsif (/\s*\d+\s+(\S+\s+)(\d+)(\s+)(\w+ \w+\s+\d+ \d+:\d+:\d+ 
\d+)/) {
-   my($b, $sz, $c, $dt, $rem) = ($1, $2, $3, $4, $');
- 

Re: [rancid] Getting a lot of noise related to ce_switch.log and ce_switch.log.bak

2019-07-16 Thread heasley
Wed, Jul 10, 2019 at 01:39:34AM -0700, Dan Mahoney (Gushi):
> On Tue, 11 Sep 2018, heasley wrote:
> 
> > Mon, Sep 10, 2018 at 01:45:42AM -0700, Dan Mahoney (Gushi):
> >> Hey all,
> >>
> >> I'm running Rancid built from freebsd packages, rancid3-3.7
> >>
> >> Periodically, my ASR9K's log something like this:
> >>
> >>   !Flash: harddisk: 24753   -rwx  800470016   Wed Sep 10 20:00:00 2014
> >> VM-ASR9K-px-4.3.4.tar
> >> - !Flash: harddisk: 24623   -rw-
> >> ce_switch.log
> >> + !Flash: harddisk: 24781   -rw-  8192017 Mon Sep 10 05:10:03 2018
> >> ce_switch.log.bak
> >>   !Flash: harddisk: 24688   -rw-  1048576 Thu Sep 11 02:08:46 2014
> >> kd.bin_0_RSP0_CPU0
> >>   !Flash: harddisk: 24625   drwx  4096Thu Sep 11 01:38:55 2014
> >> idiags
> >>   !Flash: harddisk: 24626   -rw-  0   Thu Sep 11 01:40:24 2014
> >> ahci.log
> >>   !Flash: harddisk: 24627   drwx  4096Thu Sep 11 02:20:32 2014
> >> np
> >> - !Flash: harddisk: 24783   -rw-  8192017 Fri Sep  7 08:18:57 2018
> >> ce_switch.log.bak
> >> + !Flash: harddisk: 24628   -rw-
> >> ce_switch.log
> >>   !Flash: harddisk: 6442434560 bytes total (4 GB free)
> >>
> >> I thought I saw something on the mailing lists that this was fixed in a
> >> prior version, but I guess not.  How would I go about tweaking rancid so
> >> these bits are ignored?
> >
> > add a filter to DirSlotN().  i see that your device is renaming files,
> > causing the fileno to change.  I'll add that filter for 3.9.
> 
> Sorry to revive an old thread.
> 
> I've upgraded to 3.9, but this doesn't seem to have been fixed:

My mistake; I made this change to ios.pm, but did not also change iosxr.pm.
I'll work on that change.

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Getting a lot of noise related to ce_switch.log and ce_switch.log.bak

2019-07-10 Thread Vacheslav Zouhairy


and this device is not being restarted daily?

On Wed, 2019-07-10 at 01:39 -0700, Dan Mahoney (Gushi) wrote:
> On Tue, 11 Sep 2018, heasley wrote:
> 
> > Mon, Sep 10, 2018 at 01:45:42AM -0700, Dan Mahoney (Gushi):
> > > Hey all,
> > > 
> > > I'm running Rancid built from freebsd packages, rancid3-3.7
> > > 
> > > Periodically, my ASR9K's log something like this:
> > > 
> > >   !Flash: harddisk: 24753   -rwx  800470016   Wed Sep 10
> > > 20:00:00 2014
> > > VM-ASR9K-px-4.3.4.tar
> > > - !Flash: harddisk: 24623   -rw-
> > > ce_switch.log
> > > + !Flash: harddisk: 24781   -rw-  8192017 Mon Sep 10
> > > 05:10:03 2018
> > > ce_switch.log.bak
> > >   !Flash: harddisk: 24688   -rw-  1048576 Thu Sep 11
> > > 02:08:46 2014
> > > kd.bin_0_RSP0_CPU0
> > >   !Flash: harddisk: 24625   drwx  4096Thu Sep 11
> > > 01:38:55 2014
> > > idiags
> > >   !Flash: harddisk: 24626   -rw-  0   Thu Sep 11
> > > 01:40:24 2014
> > > ahci.log
> > >   !Flash: harddisk: 24627   drwx  4096Thu Sep 11
> > > 02:20:32 2014
> > > np
> > > - !Flash: harddisk: 24783   -rw-  8192017 Fri Sep  7
> > > 08:18:57 2018
> > > ce_switch.log.bak
> > > + !Flash: harddisk: 24628   -rw-
> > > ce_switch.log
> > >   !Flash: harddisk: 6442434560 bytes total (4 GB free)
> > > 
> > > I thought I saw something on the mailing lists that this was
> > > fixed in a
> > > prior version, but I guess not.  How would I go about tweaking
> > > rancid so
> > > these bits are ignored?
> > 
> > add a filter to DirSlotN().  i see that your device is renaming
> > files,
> > causing the fileno to change.  I'll add that filter for 3.9.
> 
> Sorry to revive an old thread.
> 
> I've upgraded to 3.9, but this doesn't seem to have been fixed:
> 
> @@ -382,14 +382,14 @@ 
> !Flash: harddisk: 25131   drwx  4096Mon Jun 25 21:00:51
> 2012 
> showtech-temp
>!Flash: harddisk: 25248   -rwx  420587520   Thu Sep 11
> 15:23:40 2014 
> custom-smus-jtl-2014-sept.tar 
> !Flash: harddisk: 25249   -rwx  452402176   Thu Sep 11 15:28:01
> 2014 
> ASR9K-px-4.3.4.tar
>!Flash: harddisk: 25250   -rwx  800470016   Thu Sep 11
> 15:36:25 2014 
> VM-ASR9K-px-4.3.4.tar 
> - !Flash: harddisk: 25268   -rw-  8192017 Sat Jul  6 08:07:41
> 2019 
> ce_switch.log.bak
> + !Flash: harddisk: 25135   -rw- 
> ce_switch.log 
> !Flash: harddisk: 25252   -rw-  1048576 Tue Mar  5 00:26:44
> 2019 
> kd.bin_0_RSP0_CPU0
>!Flash: harddisk: 25137   drwx  4096Fri Sep 12
> 01:33:47 2014 
> idiags 
> !Flash: harddisk: 25138   -rw-  0   Fri Sep 12 01:35:16
> 2014 
> ahci.log
>!Flash: harddisk: 25139   drwx  4096Thu Feb 28
> 20:12:29 2019 
> np 
> - !Flash: harddisk: 25140   -rw- 
> ce_switch.log
> + !Flash: harddisk: 25269   -rw-  8192017 Tue Jul  9 04:57:56
> 2019 
> ce_switch.log.bak
>!Flash: harddisk: 25141   -rwx  63  Sun Feb 24
> 22:37:37 2019 
> chkfs_repair.log
>!Flash: harddisk: 25266   -rw-  40  Mon Feb 25
> 05:39:35 2019 
> uptime_static_data
>!Flash: harddisk: 25143   -rw-
> 
> -Dan
> 


___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Getting a lot of noise related to ce_switch.log and ce_switch.log.bak

2019-07-10 Thread Dan Mahoney (Gushi)

On Tue, 11 Sep 2018, heasley wrote:


Mon, Sep 10, 2018 at 01:45:42AM -0700, Dan Mahoney (Gushi):

Hey all,

I'm running Rancid built from freebsd packages, rancid3-3.7

Periodically, my ASR9K's log something like this:

  !Flash: harddisk: 24753   -rwx  800470016   Wed Sep 10 20:00:00 2014
VM-ASR9K-px-4.3.4.tar
- !Flash: harddisk: 24623   -rw-
ce_switch.log
+ !Flash: harddisk: 24781   -rw-  8192017 Mon Sep 10 05:10:03 2018
ce_switch.log.bak
  !Flash: harddisk: 24688   -rw-  1048576 Thu Sep 11 02:08:46 2014
kd.bin_0_RSP0_CPU0
  !Flash: harddisk: 24625   drwx  4096Thu Sep 11 01:38:55 2014
idiags
  !Flash: harddisk: 24626   -rw-  0   Thu Sep 11 01:40:24 2014
ahci.log
  !Flash: harddisk: 24627   drwx  4096Thu Sep 11 02:20:32 2014
np
- !Flash: harddisk: 24783   -rw-  8192017 Fri Sep  7 08:18:57 2018
ce_switch.log.bak
+ !Flash: harddisk: 24628   -rw-
ce_switch.log
  !Flash: harddisk: 6442434560 bytes total (4 GB free)

I thought I saw something on the mailing lists that this was fixed in a
prior version, but I guess not.  How would I go about tweaking rancid so
these bits are ignored?


add a filter to DirSlotN().  i see that your device is renaming files,
causing the fileno to change.  I'll add that filter for 3.9.


Sorry to revive an old thread.

I've upgraded to 3.9, but this doesn't seem to have been fixed:

@@ -382,14 +382,14 @@ 
!Flash: harddisk: 25131   drwx  4096Mon Jun 25 21:00:51 2012 
showtech-temp
  !Flash: harddisk: 25248   -rwx  420587520   Thu Sep 11 15:23:40 2014 
custom-smus-jtl-2014-sept.tar 
!Flash: harddisk: 25249   -rwx  452402176   Thu Sep 11 15:28:01 2014 
ASR9K-px-4.3.4.tar
  !Flash: harddisk: 25250   -rwx  800470016   Thu Sep 11 15:36:25 2014 
VM-ASR9K-px-4.3.4.tar 
- !Flash: harddisk: 25268   -rw-  8192017 Sat Jul  6 08:07:41 2019 
ce_switch.log.bak
+ !Flash: harddisk: 25135   -rw- 
ce_switch.log 
!Flash: harddisk: 25252   -rw-  1048576 Tue Mar  5 00:26:44 2019 
kd.bin_0_RSP0_CPU0
  !Flash: harddisk: 25137   drwx  4096Fri Sep 12 01:33:47 2014 
idiags 
!Flash: harddisk: 25138   -rw-  0   Fri Sep 12 01:35:16 2014 
ahci.log
  !Flash: harddisk: 25139   drwx  4096Thu Feb 28 20:12:29 2019 
np 
- !Flash: harddisk: 25140   -rw- 
ce_switch.log
+ !Flash: harddisk: 25269   -rw-  8192017 Tue Jul  9 04:57:56 2019 
ce_switch.log.bak
  !Flash: harddisk: 25141   -rwx  63  Sun Feb 24 22:37:37 2019 
chkfs_repair.log
  !Flash: harddisk: 25266   -rw-  40  Mon Feb 25 05:39:35 2019 
uptime_static_data

  !Flash: harddisk: 25143   -rw-

-Dan

--

Dan Mahoney
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Getting a lot of noise related to ce_switch.log and ce_switch.log.bak

2018-09-11 Thread heasley
Mon, Sep 10, 2018 at 01:45:42AM -0700, Dan Mahoney (Gushi):
> Hey all,
> 
> I'm running Rancid built from freebsd packages, rancid3-3.7
> 
> Periodically, my ASR9K's log something like this:
> 
>   !Flash: harddisk: 24753   -rwx  800470016   Wed Sep 10 20:00:00 2014 
> VM-ASR9K-px-4.3.4.tar
> - !Flash: harddisk: 24623   -rw- 
> ce_switch.log
> + !Flash: harddisk: 24781   -rw-  8192017 Mon Sep 10 05:10:03 2018 
> ce_switch.log.bak
>   !Flash: harddisk: 24688   -rw-  1048576 Thu Sep 11 02:08:46 2014 
> kd.bin_0_RSP0_CPU0
>   !Flash: harddisk: 24625   drwx  4096Thu Sep 11 01:38:55 2014 
> idiags
>   !Flash: harddisk: 24626   -rw-  0   Thu Sep 11 01:40:24 2014 
> ahci.log
>   !Flash: harddisk: 24627   drwx  4096Thu Sep 11 02:20:32 2014 
> np
> - !Flash: harddisk: 24783   -rw-  8192017 Fri Sep  7 08:18:57 2018 
> ce_switch.log.bak
> + !Flash: harddisk: 24628   -rw- 
> ce_switch.log
>   !Flash: harddisk: 6442434560 bytes total (4 GB free)
> 
> I thought I saw something on the mailing lists that this was fixed in a 
> prior version, but I guess not.  How would I go about tweaking rancid so 
> these bits are ignored?

add a filter to DirSlotN().  i see that your device is renaming files,
causing the fileno to change.  I'll add that filter for 3.9.

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


[rancid] Getting a lot of noise related to ce_switch.log and ce_switch.log.bak

2018-09-10 Thread Dan Mahoney (Gushi)

Hey all,

I'm running Rancid built from freebsd packages, rancid3-3.7

Periodically, my ASR9K's log something like this:

 !Flash: harddisk: 24753   -rwx  800470016   Wed Sep 10 20:00:00 2014 
VM-ASR9K-px-4.3.4.tar
- !Flash: harddisk: 24623   -rw- 
ce_switch.log
+ !Flash: harddisk: 24781   -rw-  8192017 Mon Sep 10 05:10:03 2018 
ce_switch.log.bak
 !Flash: harddisk: 24688   -rw-  1048576 Thu Sep 11 02:08:46 2014 
kd.bin_0_RSP0_CPU0
 !Flash: harddisk: 24625   drwx  4096Thu Sep 11 01:38:55 2014 
idiags
 !Flash: harddisk: 24626   -rw-  0   Thu Sep 11 01:40:24 2014 
ahci.log
 !Flash: harddisk: 24627   drwx  4096Thu Sep 11 02:20:32 2014 
np
- !Flash: harddisk: 24783   -rw-  8192017 Fri Sep  7 08:18:57 2018 
ce_switch.log.bak
+ !Flash: harddisk: 24628   -rw- 
ce_switch.log

 !Flash: harddisk: 6442434560 bytes total (4 GB free)

I thought I saw something on the mailing lists that this was fixed in a 
prior version, but I guess not.  How would I go about tweaking rancid so 
these bits are ignored?


Thanks,

-Dan

--

Dan Mahoney
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
FB:  fb.com/DanielMahoneyIV
LI:   linkedin.com/in/gushi
Site:  http://www.gushi.org
---

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss