There's probably a better way to do what I'm doing and if so, let me know an alternative.
I have a script that runs rsh for every entry in a txt file to go get the file size off the remote server. I then compare the remote size with a local size.
My script worked fine until recently when I was comparing a large list (600+). After about 400 files, the rsh command returned nothing.
My repeated command would be similar to:
/u2/web/a.jsp would be one of the 600 files I'm getting the size of.
I'm able to continue making it work by putting in a 2 second sleep every 10th file.
Any thoughts as to why and/or possibly any alternatives?
Thank you for your time.
Moderator's Comments:
Use code tags please, see PM.
Last edited by zaxxon; 08-23-2013 at 11:31 AM..
Reason: code tags
The system might run out of sockets.
Place a sleep 1 between the rsh calls!
Bundle commands to one host
--
Just seen your confirmation.
A closed TCP connection stays a while in TIMEWAIT (can be seen with netstat) in the hope of a re-open. But a rsh process cannot re-open the connections of the previous rsh commands. If rsh are fired too rapidly the system runs out of sockets.
Last edited by MadeInGermany; 08-23-2013 at 02:26 PM..
I have made a shell script(/bin/sh) that starts a perl script (that I haven't made my self) that's starts a ssh session. The ssh session uses a private/public key to login so no password is needed. The Perl script works perfect.
But when I put it in a cronjob (crontab) the ssh connection asks... (6 Replies)
Hi all,
When I cp a script, this section of the code stops reading from a file.
if ; then
while read dirtoclean
do
DIRSTOCLEAN=${DIRSTOCLEAN}' '$dirtoclean
done < ${BASEDIR}test.conf
fi
${DIRSTOCLEAN} doesn't return anything, even though it will work right before... (6 Replies)
i am using solaris 8.
i can access my server through telnet.
but not able to access rsh or rlogin.
i can rsh from this server to another machine but not from other machine to this machine.
How to start rsh service.
i have restarted inetd.
pkill -HUP inetd.
thanks (1 Reply)
I have 64bit 11.1 installed on a clone. The Logitech LX3 mouse stops working sometimes, forcing a reboot. The LED under the mouse goes dark when this happens. A normal ps/2 mouse works fine, and I am certain the LX3 mouse is not defective as I have an identical one on a XP system that I swapped to... (6 Replies)
Hey guys,
I was using ssh-keygen settings for a long time to login on remote machines without password.
2 days back it suddenly stops working, i tried by reset all ssh-keygen setting but it not works.
what could be the reason of this issue and how can i resolve this? (2 Replies)
Hi,
I am getting the below error while using rsh from other logins in AIX 5.3
rcmd2: socket: The file access permissions do not allow the specified action.
whereas the same is working fine with root login.
I have already defined the host entries in etc/hosts as well as in .rhosts... (0 Replies)
I have a really strange issue on Solaris 10 running on v490. I'm running Oracle 10g on the box. Everything runs fine and all of a sudden I get a call from a DBA. I check and none of the Oracle processes are running. They were definitely running after the system booted and nobody stopped them. I try... (0 Replies)
Hi all
I have updated my .rhosts file as per the norm, however for some reason on hostA I cannot rsh to hostB.
The entries on /.rhosts on hostA are as follows :-
hostB +
hostB on the other can do rsh without a problem.
Any ideas ? :confused: (1 Reply)
Hi,
From one of the unix servers i want execute an rsh command to 5 different servers.
i want to go to these servers execute a command and come back.
i have a main program which calls a function, where in i use the rsh command.
The server name is passed as a parameter to teh function.
it is... (3 Replies)
Dear all;
I have to Unix servers SUM1 and SUM2 running Reliant Unix 5.45
on both servers i have a system user called "netop".
i want netop on SUM1 to execute rsh from SUM1 to SUM2.
What i did, i put in the .rhosts file in the home directory of netop on SUM2 the following entry:
netop ... (2 Replies)