- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: telnet session script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2006 11:23 AM
тАО03-03-2006 11:23 AM
telnet session script
we are having 9 server for these server i have to moniter and note the cpu usage, mem usage, no of user.... for this i login to each server and note...
can any one of you tell the script to open 9 telnet session with one script..
thanks in adv
wish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2006 11:34 AM
тАО03-03-2006 11:34 AM
Re: telnet session script
you can achieve this making a trust between servers, and then running a script.
Also if you have Secure Shell installed, you can very easily establish a trust between the servers and then run a script.
For EG:
for HOST in hp1 hp2 hp3
do
echo #HOST
ssh $HOST w;..;..
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2006 11:36 AM
тАО03-03-2006 11:36 AM
Re: telnet session script
for HOST in hp1 hp2 hp3
do
echo $HOST
ssh $HOST w;..;..
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2006 06:47 AM
тАО03-04-2006 06:47 AM
Re: telnet session script
First of all thanks you.
If my 9 server names are one, two,....nine
and what to run script from one of the pcs in the same subnet - then what would be the script i want to know that step by step pl reply....
thanks in adv
regds
wish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2006 12:37 PM
тАО03-05-2006 12:37 PM
Re: telnet session script
Rory
#!/bin/sh
#
#
dojob()
{
TOHOST=`echo $1`
WAIT_THIS_LONG="${2}" #added to allow for wait of long commands
WAIT_THIS_LONG=${WAIT_THIS_LONG:-10} #default if not set
echo "
set network TCP/IP
#set host 10.254.7.34
set host ${TOHOST}
input 10 login:
if failure exit 1 No login prompt
output USERID\13
input 10 word:
if failure exit 1 No password prompt
output PASSWD\13
input 10 $
ls -ld \13
input ${WAIT_THIS_LONG} $
output exit\13
output quit
"
}
for HOST in 10.254.0.1 10.254.0.2 10.254.0.3 10.254.0.4
do
trap "" 1 2 3
#passwords and USERID can be set as variables past to kermit
#like host and timeout
dojob ${HOST} 4600 |/usr/bin/kermit
trap 1 2 3
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2006 08:08 PM
тАО03-05-2006 08:08 PM
Re: telnet session script
my sugegstoin id to prepare a script which collects all the required data and run it on all the server by remsh:
for server in one two three four
do
remsh $server -l $user -n "script"
done
to do this you have to add an entry in the target .rhost
or in alternative you can use rexec instead of rmsh. In this case you have to create a file .netrc on the source server with the logon info for the target server.
For furhet info man rexec, remsh can help.
HTH,
Art