Re: Best way to login, run a command, view output, repeat on a

From: Jason Madsen (madsen.jason@gmail.com)
Date: Thu Nov 20 2008 - 00:12:44 ARST


I've had great success with Perl and KiwiCattools. Cattools is great
because it requires no scripting...just specify all of the devices you want
to manage and run it or schedule it to run.

Jason

On Wed, Nov 19, 2008 at 7:08 PM, Nick Matthews <matthn@gmail.com> wrote:

> What actually may be a simpler is if you use the redirect/append option:
>
> show int | redirect tftp://192.168.100.100/file.txt
> or
> show int | append tftp://192.168.100.100/file.txt
>
> It may be necessary to write a script to telnet to all of the routers, but
> at least you don't have to worry about the file system as much.
>
> This obviously isn't a working script, but an idea similar to the ping
> script:
>
> foreach address {
> 1.1.1.1
> 2.2.2.2
> } { telnet $address
> puts "show run | redirect tftp://100.100.100.100/$address.txt" }
>
> I wish they would support multiple pipes so you could do:
>
> show int | i error | redirect flash:hey-o.txt
>
> Maybe in 12.6.
>
>
> -Nick
>
> On Wed, Nov 19, 2008 at 5:27 PM, Walter Gibbons <wgibbons@gmail.com>
> wrote:
>
> > Lol...If only there was a way to automate repetitive tasks using some
> sort
> > of electronic device and some language to tell it what to do...
> >
> >
> > On Wed, Nov 19, 2008 at 12:40 PM, Joseph Brunner <
> joe@affirmedsystems.com
> > >wrote:
> >
> > > That is the best way I think; that's how I do it...
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
> Of
> > > Hobbs
> > > Sent: Wednesday, November 19, 2008 12:35 PM
> > > To: Cisco certification
> > > Subject: OT: Best way to login, run a command, view output, repeat on a
> > > bunch of routers
> > >
> > > Hello,
> > >
> > > I am looking for a way to automate the following:
> > >
> > > 1) Log into a router (hostname taken from a list of router names or IP
> > > addresses)
> > >
> > > 2) Run the command "show int | inc proto|error"
> > > (to see the number errors on a all interfaces of a router)
> > >
> > > 3) Put the output in a file or display it on the terminal
> > >
> > > 4) Move on to the next router.
> > >
> > > I have been looking at the Net::Telnet::Cisco module for Perl but I am
> > not
> > > too handy with Perl (but I am learning it).
> > > Is there a better way to do it?
> > >
> > > thanks
> > >
> > >
> > > Blogs and organic groups at http://www.ccie.net
> > >
> > > _______________________________________________________________________
> > > Subscription information may be found at:
> > > http://www.groupstudy.com/list/CCIELab.html
> > >
> > >
> > > Blogs and organic groups at http://www.ccie.net
> > >
> > > _______________________________________________________________________
> > > Subscription information may be found at:
> > > http://www.groupstudy.com/list/CCIELab.html
> >
> >
> > Blogs and organic groups at http://www.ccie.net
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html

Blogs and organic groups at http://www.ccie.net



This archive was generated by hypermail 2.1.4 : Mon Dec 01 2008 - 08:18:31 ARST