Mailing List Archive

Show tech on latest Procurve software
Hi all,


Is there a way of altering the output of rancid, or which commands it runs, or how the 'diff'ing' works?


We seem to have a problem with the latest hp software, where 'show tech transceivers' seems to include a call to 'show time'. Hence it notices a diff in the output timestamp and and it's fairly annoying if you actually want to keep track of changes. 


Ref. https://community.hpe.com/t5/ProCurve-ProVision-Based/Command-behavior-change-in-KB-16-05-0003-5406R-firmware/td-p/6992013


Regards,
Aleksander Vines
Re: Show tech on latest Procurve software [ In reply to ]
Yes, it's fairly easy to filter out individual lines by editing the
filter inside the perl scripts to make them go away. I have done this
many, many times. The only trick is that when you upgrade you might lose
your change, so save a copy or diff that you can re-apply later.

In this case, the place where you'd put the filter is in
~rancid/bin/hrancid in the routine "ShowTechTransceivers"

Right at the top where it has 'next if (...)'

either above or below that you can add a line that says something like
next if (/thing I want to match here/) which will skip that line.


On 2/19/2018 9:12 AM, Aleksander Vines wrote:
> Hi all,
>
> Is there a way of altering the output of rancid, or which commands it
> runs, or how the 'diff'ing' works?
>
> We seem to have a problem with the latest hp software, where 'show
> tech transceivers' seems to include a call to 'show time'. Hence it
> notices a diff in the output timestamp and and it's fairly annoying if
> you actually want to keep track of changes. 
>
> Ref. https://community.hpe.com/t5/ProCurve-ProVision-Based/Command-behavior-change-in-KB-16-05-0003-5406R-firmware/td-p/6992013
>
> Regards,
> Aleksander Vines
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

--
Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562)
Re: Show tech on latest Procurve software [ In reply to ]
That worked perfectly. Thanks for the fast reply.


For reference, if anyone else have issues with new procurve software, this is what I added:



# This routine parses "show tech transceivers"
sub ShowTechTransceivers {
    ...
    while (<INPUT>) {
        ...
        # These next two lines are new
        next if (/[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]+ [0-2][0-9]:[0-5][0-9]:[0-5][0-9] 20[0-9][0-9]/);
        next if (/show time/);
        next if (/^(\s*|\s*$cmd\s*)$/);
        ...
}


Thanks,
Aleksander Vines




From: Doug Hughes <doug.hughes@keystonenap.com>
To: <rancid-discuss@shrubbery.net>
Sent: 2018-02-19 18:06
Subject: Re: [rancid] Show tech on latest Procurve software



Yes, it's fairly easy to filter out individual lines by editing the filter inside the perl scripts to make them go away. I have done this many, many times. The only trick is that when you upgrade you might lose your change, so save a copy or diff that you can re-apply later.
In this case, the place where you'd put the filter is in ~rancid/bin/hrancid in the routine "ShowTechTransceivers"
Right at the top where it has 'next if (...)'
either above or below that you can add a line that says something like next if (/thing I want to match here/) which will skip that line.


On 2/19/2018 9:12 AM, Aleksander Vines wrote:
Hi all,


Is there a way of altering the output of rancid, or which commands it runs, or how the 'diff'ing' works?


We seem to have a problem with the latest hp software, where 'show tech transceivers' seems to include a call to 'show time'. Hence it notices a diff in the output timestamp and and it's fairly annoying if you actually want to keep track of changes. 


Ref. https://community.hpe.com/t5/ProCurve-ProVision-Based/Command-behavior-change-in-KB-16-05-0003-5406R-firmware/td-p/6992013


Regards,
Aleksander Vines

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

--

Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562)

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Show tech on latest Procurve software [ In reply to ]
Thank you for sharing!

Sincerely,

Vacheslav



From: Rancid-discuss [mailto:rancid-discuss-bounces@shrubbery.net] On Behalf Of Aleksander Vines
Sent: Tuesday, February 20, 2018 11:46 AM
To: rancid-discuss@shrubbery.net
Subject: Re: [rancid] Show tech on latest Procurve software



>That worked perfectly. Thanks for the fast reply.



>For reference, if anyone else have issues with new procurve software, this is what I added:




<sub ShowTechTransceivers {

...

while (<INPUT>) {

...

# These next two lines are new

next if (/[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]+ [0-2][0-9]:[0-5][0-9]:[0-5][0-9] 20[0-9][0-9]/);

next if (/show time/);

next if (/^(\s*|\s*$cmd\s*)$/);

...

}



>Thanks,

Aleksander Vines




From: Doug Hughes <doug.hughes@keystonenap.com <mailto:doug.hughes@keystonenap.com> >
To: <rancid-discuss@shrubbery.net <mailto:rancid-discuss@shrubbery.net> >
Sent: 2018-02-19 18:06
Subject: Re: [rancid] Show tech on latest Procurve software

Yes, it's fairly easy to filter out individual lines by editing the filter inside the perl scripts to make them go away. I have done this many, many times. The only trick is that when you upgrade you might lose your change, so save a copy or diff that you can re-apply later.

In this case, the place where you'd put the filter is in ~rancid/bin/hrancid in the routine "ShowTechTransceivers"

Right at the top where it has 'next if (...)'

either above or below that you can add a line that says something like next if (/thing I want to match here/) which will skip that line.



On 2/19/2018 9:12 AM, Aleksander Vines wrote:

Hi all,



Is there a way of altering the output of rancid, or which commands it runs, or how the 'diff'ing' works?



We seem to have a problem with the latest hp software, where 'show tech transceivers' seems to include a call to 'show time'. Hence it notices a diff in the output timestamp and and it's fairly annoying if you actually want to keep track of changes.



Ref. https://community.hpe.com/t5/ProCurve-ProVision-Based/Command-behavior-change-in-KB-16-05-0003-5406R-firmware/td-p/6992013



Regards,

Aleksander Vines





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



--


Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562)





_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net <mailto:Rancid-discuss@shrubbery.net>
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Show tech on latest Procurve software [ In reply to ]
Tue, Feb 20, 2018 at 09:46:21AM +0100, Aleksander Vines:
> That worked perfectly. Thanks for the fast reply.
>
>
> For reference, if anyone else have issues with new procurve software, this is what I added:
>
>
>
> # This routine parses "show tech transceivers"
> sub ShowTechTransceivers {
> ? ? ...
> ? ? while (<INPUT>) {
> ? ? ? ? ...
> ? ? ? ? # These next two lines are new
> ? ? ? ? next if (/[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]+ [0-2][0-9]:[0-5][0-9]:[0-5][0-9] 20[0-9][0-9]/);
> ? ? ? ? next if (/show time/);
> ? ? ? ? next if (/^(\s*|\s*$cmd\s*)$/);
> ? ? ? ? ...
> }
>
>
> Thanks,
> Aleksander Vines
>

Would someone confirm that these filters work:

Index: bin/hrancid.in
===================================================================
--- bin/hrancid.in (revision 3760)
+++ bin/hrancid.in (working copy)
@@ -203,6 +203,9 @@
}
next;
}
+ # KB.16.05.0003 5406R firmware bug
+ next if (/^\s*show time\s*$/i);
+ next if (/^\s*\S{3} \S{3}\s+\d+\s+\d+:\d+:\d+\s+\d+\s*$/);

ProcessHistory("COMMENTS","keysort","G0",";$_");

>
>
> From: Doug Hughes <doug.hughes@keystonenap.com>
> To: <rancid-discuss@shrubbery.net>
> Sent: 2018-02-19 18:06
> Subject: Re: [rancid] Show tech on latest Procurve software
>
>
>
> Yes, it's fairly easy to filter out individual lines by editing the filter inside the perl scripts to make them go away. I have done this many, many times. The only trick is that when you upgrade you might lose your change, so save a copy or diff that you can re-apply later.
> In this case, the place where you'd put the filter is in ~rancid/bin/hrancid in the routine "ShowTechTransceivers"
> Right at the top where it has 'next if (...)'
> either above or below that you can add a line that says something like next if (/thing I want to match here/) which will skip that line.
>
>
> On 2/19/2018 9:12 AM, Aleksander Vines wrote:
> Hi all,
>
>
> Is there a way of altering the output of rancid, or which commands it runs, or how the 'diff'ing' works?
>
>
> We seem to have a problem with the latest hp software, where 'show tech transceivers' seems to include a call to 'show time'. Hence it notices a diff in the output timestamp and and it's fairly annoying if you actually want to keep track of changes.?
>
>
> Ref.?https://community.hpe.com/t5/ProCurve-ProVision-Based/Command-behavior-change-in-KB-16-05-0003-5406R-firmware/td-p/6992013
>
>
> Regards,
> Aleksander Vines
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
> --
>
> Doug Hughes
> Keystone NAP
> Fairless Hills, PA
> 1.844.KEYBLOCK (539.2562)
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss



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

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Show tech on latest Procurve software [ In reply to ]
On 2/20/2018 1:10 PM, heasley wrote:
> Tue, Feb 20, 2018 at 09:46:21AM +0100, Aleksander Vines:
>> That worked perfectly. Thanks for the fast reply.
>>
>>
>> For reference, if anyone else have issues with new procurve software, this is what I added:
>>
>>
>>
>> # This routine parses "show tech transceivers"
>> sub ShowTechTransceivers {
>>     ...
>>     while (<INPUT>) {
>>         ...
>>         # These next two lines are new
>>         next if (/[A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]+ [0-2][0-9]:[0-5][0-9]:[0-5][0-9] 20[0-9][0-9]/);
>>         next if (/show time/);
>>         next if (/^(\s*|\s*$cmd\s*)$/);
>>         ...
>> }
>>
>>
>> Thanks,
>> Aleksander Vines
>>
> Would someone confirm that these filters work:
>
> Index: bin/hrancid.in
> ===================================================================
> --- bin/hrancid.in (revision 3760)
> +++ bin/hrancid.in (working copy)
> @@ -203,6 +203,9 @@
> }
> next;
> }
> + # KB.16.05.0003 5406R firmware bug
> + next if (/^\s*show time\s*$/i);
> + next if (/^\s*\S{3} \S{3}\s+\d+\s+\d+:\d+:\d+\s+\d+\s*$/);
>
> ProcessHistory("COMMENTS","keysort","G0",";$_");
My HPs aren't new enough to show the time field.
But it looks innocuous enough.

--
Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562)