LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-24-2012, 05:48 AM   #1
mkavagg
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Rep: Reputation: Disabled
Script on router by telnet


Hi Friends

I would like to know how to run show commands on routers automatically .like show int br,show versn etc .i want it to run by scriptng on a regular interval of 1 hr to check the wheather y router is performing correctly or not.
can anyone help me.
 
Old 02-24-2012, 06:03 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
routine tests are probably run better with other mechanisms like SNMP monitoring, but the tool you'll probably want to look as is called "expect", there's a nice little example of an expect script for ios here... http://blog.penumbra.be/2010/02/expe...-cisco-config/
 
Old 02-24-2012, 06:18 AM   #3
mkavagg
LQ Newbie
 
Registered: Feb 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
thanks for your reply.but do you have any example of script with you which can run these commands doing telnet using putty.
My aim is to run automatic script which i can load and and the output can be stored on specific path after fixed interval.so after every interval i can see direct results.
like when i telnet router it should username ,password then go to bash and then specific path.
a result displayed directly.

the commands are
"show log severity critical
show log severity warning
show log severity error
show log " show fans show vrrp show ospf neighbor "show power detail
show power controller" show temperature show switch show memory show cpu-monitoring show EDP port "port number" "show ports configuration
show port rxerror
show port txerror
show port utilization" "show sntp-client
show switch" Validate the Mrtg Links "show tech all
"
.
HOw i can run it by scripting.
Kindly help me
 
Old 02-24-2012, 06:18 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
I'm sure you can adapt that example script, it's not hard.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
expect script to telnet into a router m4rtin Programming 5 08-02-2010 09:03 PM
telnet -> use contrl-D to exit using python telnet script athreyavc Programming 5 07-07-2009 12:17 AM
telnet to cisco router martino Linux - Server 2 06-30-2009 02:33 PM
Help: Setup Router DMZ via Telnet lusiads Linux - Security 5 01-13-2009 02:18 AM
Running Telnet in a script, want to save Telnet output, howtodothis??? anil3 Linux - Software 2 03-08-2006 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration