Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to check console ports

Status
Not open for further replies.

dandan123

Technical User
Sep 9, 2005
505
US
We are using cisco terminal servers to connect to console ports on Sun servers.

I want to script testing these ports, is this possible ?

Here's what I want to do -

telnet termserver portnumber ( I would have a list of these)
Enter user id (cisco term server - always same)
Enter password (cisco term server - always same)
Login prompt (capture system name from login prompt)
Verify that system name matches what's on the list.

TIA

 
In a nut shell, yes it's possible, the question is what language did you want to use, sh or perl, which are std releases with Solaris
 
I would prefer to use a shell script as I'm not familiar with Perl.
 
I've been coming across expect a lot in my search for a telnet script.

Any pointers on were to get documentation ?
 
Another pointer... expect comes with a very handy tool autoexpect which you can use to script or record an interactive session and generate an expect script. Then you can go and modify the generated script to make it generic so that it works for all of your servers, not just the one you recorded.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top