[rancid] Re: ProcessHistory filter

Smirnoff Alexander asmirnoff at office.beeline.ru
Wed Jul 22 13:16:30 UTC 2009

And I have some other question about ProcessHistory - I make sub for parsing  commands, and in output I see for every first line this:


!HOSTNAME: 777777777777Prestige_
!AUTOEXEC.NET: 777777777777777777777sys errctl 0
!AUTOEXEC.NET: sys trcl level 5
!AUTOEXEC.NET: sys trcl type 1180
!AUTOEXEC.NET: sys trcp cr 64 96
!AUTOEXEC.NET: sys trcl sw off
!AUTOEXEC.NET: sys trcp sw off
!AUTOEXEC.NET: ip tcp mss 512
!AUTOEXEC.NET: ip tcp limit 2
!AUTOEXEC.NET: ip tcp irtt 65000
!AUTOEXEC.NET: ip tcp window 2
!AUTOEXEC.NET: ip tcp ceiling 6000
!AUTOEXEC.NET: ip rip activate
!AUTOEXEC.NET: ip rip merge on
!AUTOEXEC.NET: ip icmp discovery enif0 off
!AUTOEXEC.NET: ppp ipcp compress off
!AUTOEXEC.NET: sys wdog sw on
!AUTOEXEC.NET: sys quick enable
!SYS FEATURE: 77777777777IPX: yes


e.g. I am ask about 777777777 symbols.


And this is my sub:


# is routine processes a "sys view autoexec.net"

sub ShowAutoexec {

    print STDERR "    In ShowAutoexec: $_" if ($debug);

    while (<INPUT>) {


        if (/^$prompt/) { $found_env=1; last};


                if (/>/) {

                $found_end = 1;

                ProcessHistory("","","","!AUTOEXEC.NET: $_");



                 $found_end = 1;


        ProcessHistory("","","","!AUTOEXEC.NET: $_");





May be somebody know about this problem?



From: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Smirnoff Alexander
Sent: Wednesday, July 22, 2009 11:29 AM
To: rancid-discuss at shrubbery.net
Subject: [rancid] ProcessHistory filter


Hello all RANCID people!


I try to filter interface counters from output of Zyxel Prestige 791R ip route status :

- !IP ROUTE: default         01 0   mpoa01      2    00ab 0      409683

+ !IP ROUTE: default         01 0   mpoa01      2    00ab 0      412140


 using these definitions:


if (/^(default)/)

        { ProcessHistory("","","","!IP ROUTE: default $1 $2$3 mpoa01     $5$6<___>\n") && next;    }


but  something wrong - i receive this:


!IP ROUTE: default default  mpoa01     <___>


How I can correctly setup this filter? 





Alexandr Smirnov
+7(812)3468600 # 54682
Head of Data Transmission Networks Monitoring Service                        mailto:asmirnoff at office.beeline.ru <mailto:asmirnoff at office.beeline.ru> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090722/e3775521/attachment.html 

More information about the Rancid-discuss mailing list