SUMMARY: rsh timeout
2007-12-24 20:41:00
--=_alternative 0047DF8880256AB7_=
Content-Type: text/plain; charset="us-ascii"
I originally posted:-
Hi,
I have a script that pulls various files over onto a single machine for me
to read easily. The problem is that if a machine is down then the rsh
command that I use will stick for a long period before timing out. I
would like to cut this period down. I have seen versions of rsh that allow
a -t flag to be set to give a short time out period, bu tI can't find an
equivalent setting for the rsh. Is anybody aware of a way to shorten the
timeout period on rsh commands (preferably without messing up the rlogin
and other commands as well)?
Thanks to the many people who responded to this (way to many to mention).
They all suggest variants on using ping to determine if the host if up
before trying to rsh. Vic Engle was unique in pointing out that I could
also use nmap to make sure that the host would accept my rsh request as
well. As an example Cyril Jaouich sent this short outline of how to achieve this with the bourne shell.
#!/usr/bin/sh
ping $SERVER
if [ $? == 0 ]
then
rsh
...
Thanks to everyone,
Bernard McAuley,
Mindspeed Technologies,
--=_alternative 0047DF8880256AB7_=
Content-Type: text/html; charset="us-ascii"
<br><font size=2 face="sans-serif">I originally posted:-</font>
<br><font size=2 face="sans-serif">Hi,</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
I have a script that pulls various files over onto a single machine for me to read easily. The problem is that if a machine is down then the rsh command that I use will stick for a long period before timing out. I would like to cut this period down. I have seen versions of rsh that allow a -t flag to be set to give a short time out period, bu tI can't find an equivalent setting for the rsh. Is anybody aware of a way to shorten the timeout period on rsh commands (preferably without messing up the rlogin and other commands as well)?</font><font size=3 face="Times New Roman"> </font>
<br>
<br>
<br><font size=2 face="sans-serif">Thanks to the many people who responded to this (way to many to mention). They all suggest variants on using ping to determine if the host if up before trying to rsh. Vic Engle was unique in pointing out that I could also use nmap to make sure that the host would accept my rsh request as well. As an example </font><font size=2 face="Courier New">Cyril Jaouich</font><font size=2 face="sans-serif"> sent this short outline of how to achieve this with the bourne shell.</font>
<font size=3 face="Times New Roman"> </font><font size=2 color=blue face="Arial">#!/usr/bin/sh</font><font size=3 face="Times New Roman"> </font>
<font size=3 face="Times New Roman"> </font><font size=2 color=blue face="Arial">ping $SERVER</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 color=blue face="Arial">if [ $? == 0 ]</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 color=blue face="Arial">then</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 color=blue face="Arial">rsh </font><font size=3 face="Times New Roman"><br>
</font><font size=2 color=blue face="Arial">...</font><font size=3 face="Times New Roman"> </font>
<font size=2 face="sans-serif">Thanks to everyone,</font>
<br><font size=2 face="sans-serif">Bernard McAuley,<br>
Mindspeed Technologies,<br>
</font>
--=_alternative 0047DF8880256AB7_=--
Comments
Got something to say?
You must be logged in to post a comment.

