> I'm a Linux novice and new to this list -- so, I beg your pardon if this
> subject has been previously addressed.
>
> I use RedHat 5.0 on an HP pentium PC in support of 20 Cisco routers and
> numerous HP and Catalyst switches.  I basically use it for IOS and
> configuration backups (TFTP) and testing (ping, traceroute, etc.).  I
would
> also like to use it to proactively monitor certain conditions on the Cisco
> routers by automatically Telneting to each router and then executing a set
> of router commands and redirecting the output to a file (on the Linux
> machine).
>
> I know that I can use CRON and .telnetrc to schedule and automate most of
> the Telnet process.  But, is there then a way to pass Cisco router
commands
> to the router by somehow scripting the commands or redirecting them from a
> file on the Linux machine?  Is it futile to persue this?  Any assistance
is
> appreciated.
>
> Thanks,
> Steve Barrett
>

You will probably have to "roll your own" script, but it shouldn't be to
hard.

Here is a Perl module that can be used to automatically login a system via
telnet and execute some commands, it doesn't matter if the system is unix,
cicso router or modem hub, aslong as it works with a standard telnet client
http://cpan.valueclick.com/authors/id/J/JR/JROGERS/

There is also a script launage called "expect" that was designed from the
ground up to interact with interactive programs like telnet or ftp
http://expect.nist.gov/

I think that there is also a Perl module for expect (or atleast acts like
it) at
http://cpan.valueclick.com/authors/id/A/AU/AUSCHUTZ/

I know that the first two methods will work if you don't mind spending a 6
pack of jolt on it, I also heard this could be done in python, but don't
know the exact method of doing it, might want to search there faq to see if
anything is there.

After you have your script(s) working, run them though `cron`, `at` or write
them as daemons that are always running, but sleep between the times they
are supose to check.

On a side note, if you want to monitor bandwidth usage (among other things)
over a period of time, you might want to check out MRTG at
http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html it will check the
network device every 5 minutes for differant things (depending on how well
you can dig around in the SMNP oids) and print a nice graphically chart or
usage, etc..

Also you might want to check out freshmeat.net
http://freshmeat.net/appindex/console/monitoring.html and see if anyone has
already written a tool that does what you are trying to monitor, check, etc
Just in case, so you don't reinvent the wheel.

Jack


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to