[rancid] Re: ProcessHistory filter

Smirnoff Alexander asmirnoff at office.beeline.ru
Thu Jul 23 14:19:12 UTC 2009


Hello!

 

Now I find some information about these symbols, but until can't
correctly work with them. For example zyxP791Rlogin must send command,
and wait for prompt before send next command - and this feature work in
one case and not word for another. I can't understand why. May be some
of RANCID scripts already solve this problem with scroll-like terminals
and scrolling symbols?

 

 

________________________________

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

 

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
!SYS FEATURE: IP ONLY: no
!SYS FEATURE: AUI: no
!SYS FEATURE: AB ADAPTER: no

 

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: $_");

                return(1);

                }

                 $found_end = 1;

    

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

    }   

    return(0);

}       

 

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     172.17.100.1      2
00ab 0      409683

+ !IP ROUTE: default         01 0   mpoa01     172.17.100.1      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? 

 

 

 

 

-- 
Regards,
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/20090723/25d3ebcf/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 172.17.100.99.raw
Type: application/octet-stream
Size: 8214 bytes
Desc: 172.17.100.99.raw
Url : http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090723/25d3ebcf/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zyxP791rancid
Type: application/octet-stream
Size: 17175 bytes
Desc: zyxP791rancid
Url : http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090723/25d3ebcf/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zyxP791rlogin
Type: application/octet-stream
Size: 25748 bytes
Desc: zyxP791rlogin
Url : http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20090723/25d3ebcf/attachment-0002.obj 


More information about the Rancid-discuss mailing list