[rancid] Filtering out flash dir and time change events

Lee ler762 at gmail.com
Thu Jul 27 15:51:23 UTC 2017


On 7/27/17, Doug Hughes <doug.hughes at keystonenap.com> wrote:
> I don't recall where !Time comes from exactly (search in lib/rancid/ios.pm)
>
> But Flash comes from etc/rancid.types.base:
> cisco;command;ios::ShowFlash;show flash
>
> You could either comment out that line and then remember to do the same
> when you upgrade, or you could make a rancid.types.conf and override the
> entire cisco;command;ios block

How comfortable are you with modifying the code?

Take a look at rancid 3.6.2 - sub ShowFlash in lib/rancid/ios.pm looks for
  if (/(\d+) bytes (available|total) \((\d+) bytes used\)/) {
and changes the line to
 NN [GMK]B free

It doesn't seem like it would be too hard to change
 NNN bytes total (NNN bytes free)
to
 NN [GMK]B total (NN [GMK]B free)

Regards,
Lee


> On 7/27/2017 10:40 AM, Walker, Alan wrote:
>>
>> Hi All,
>>
>> I’ve been using Rancid for a while now and it seems to work pretty
>> well but one thing I’m seeing on certain new Cisco devices such as
>> ISR’s, Nexus, etc are displaying changes for the flash directory
>> changing in size and the time of the device changing. These events
>> come up like this:
>>
>>
>> - !Flash: bootflash: 7113240576 bytes total (6335688704 bytes free)
>>
>> + !Flash: bootflash: 7113240576 bytes total (6335643648 bytes free)
>>
>>
>>
>> - !Time: Thu Jul 27 07:12:05 2017
>>
>> + !Time: Thu Jul 27 08:12:10 2017
>>
>>
>> Is there anyway to filter out these types of changes so that I only
>> see more substantial changes?
>>
>> Thanks.
>>
>> Corcentric <http://www.corcentric.com>
>> Alan Walker | Network Engineer
>> 457 Haddonfield Road, Suite 220 | Cherry Hill, NJ 08002
>> O (856) 406-3746 | F
>> awalker at corcentric.com<mailto:awalker at corcentric.com>|
>> www.corcentric.com <http://www.corcentric.com>
>
> --
> Doug Hughes
> Keystone NAP
> Fairless Hills, PA
> 1.844.KEYBLOCK (539.2562)



More information about the Rancid-discuss mailing list