RSH: Running out of ports


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting RSH: Running out of ports
# 1  
Old 10-01-2012
RSH: Running out of ports

I have an issue where I am running out of ports when using RSH to start a script remotely.

I have a script that i need to run that has been pushed out to every server. I have a list of servers (hostfilelist)

Basically, I have a simple loop that will run them in paralell.

Code:
for host in `cat hostfilelist`; do
rsh $host ksh script.ksh &
done

Problem is there are like 2k servers and I am hitting a limit of 512, (assuming port range is 512-1023 for RSH based on documents i have read).

How can i get around this? I am running RHEL5 fwiw.
# 2  
Old 10-01-2012
Maybe something like this, (not sure how the \& scape will work on your system):

Code:
 
for host in `cat hostfilelist`; do
rsh $host 'ksh script.ksh \&' &
done

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do i list running process with the ports they are using?

How do i list the running process and also view the ports they are listening to at the same time? (3 Replies)
Discussion started by: mena
3 Replies

2. Shell Programming and Scripting

RSH connection problem while running MPI program

I'm trying to run MPI programs on 8 machines, but I get the error connect to address 127.0.0.1 port 544: Connection refused Trying krb4 rsh... connect to address 127.0.0.1 port 544: Connection refused trying normal rsh (/usr/bin/rsh) lagrid02: Connection refused When I run it with a... (8 Replies)
Discussion started by: vishwamitra
8 Replies

3. Solaris

Can i bind to a local login terminal running using rsh or remotely

Hi Can i ask? I had multiple solaris workstation running and some local users using it. Is it possible to bind to the local user terminal or console he's using as if like the user well type and I can see it and what my typing in the local user see it also. Is it possible.. Thanks. (3 Replies)
Discussion started by: jao_madn
3 Replies

4. Red Hat

Rsh

Hi, I issue : rsh ****.16.0.151 -l root ls -l /tmp and I receive : connect to address ***.16.0.151: Connection refused Trying krb4 rsh... In hosts file of remote (***.16.0.151) I have : ***.16.0.202 root Can you help me ? Thank you. (0 Replies)
Discussion started by: big123456
0 Replies

5. Shell Programming and Scripting

Running RSH on the background

Hi, I am developing a script that would do a 'rsh' on a client machine. I want to invoke a script in client machine which would keep on polling data to the server. I want the rsh to return back once it invoked the script on client and the script should run on background on client. ... (2 Replies)
Discussion started by: eamani_sun
2 Replies

6. Shell Programming and Scripting

Error while running rsh commands !!!

Hi All I am trying to run an RSH command remotely to a machine, but I am gettinf the following errors, can anyone help me to resolve the errors user@server10:~> rsh user@server24 'uname -n' rcmd: getaddrinfo: Temporary failure in name resolution Thanks in advance to all Chirantan (3 Replies)
Discussion started by: csaha
3 Replies

7. Shell Programming and Scripting

running multiple rsh command in a script

hi scripting experts, juz wondering if it's possible to have multiple rsh command in a single script? :confused: ie: rsh -l <username> "<command>" rsh -l <username> "<command>" thanks. regards, wee :) (0 Replies)
Discussion started by: lweegp
0 Replies

8. UNIX for Dummies Questions & Answers

Script to kill rsh processes running for more than 10 mins

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (3 Replies)
Discussion started by: amitsayshii
3 Replies

9. Shell Programming and Scripting

script to kill rsh processes running for more than 10 minutes

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (1 Reply)
Discussion started by: amitsayshii
1 Replies

10. UNIX for Advanced & Expert Users

script to kill rsh processes running for more than 10 minutes

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (1 Reply)
Discussion started by: amitsayshii
1 Replies
Login or Register to Ask a Question