SUMMARY: rsh timeout

From: <bernard.mcauley_at_mindspeed.com>
Date: Wed Aug 29 2001 - 09:06:29 EDT
This is a multipart message in MIME format.
--=_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. &nbsp;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. &nbsp;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. &nbsp;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). &nbsp;They all suggest variants on using ping to determine if the host if up before trying to rsh. &nbsp;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. &nbsp;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>
<p><font size=3 face="Times New Roman">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Arial">#!/usr/bin/sh</font><font size=3 face="Times New Roman"> </font>
<p><font size=3 face="Times New Roman">&nbsp; &nbsp; &nbsp; &nbsp; </font><font size=2 color=blue face="Arial">ping $SERVER</font><font size=3 face="Times New Roman"> <br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=blue face="Arial">if [ $? == 0 ]</font><font size=3 face="Times New Roman"> <br>
 &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=blue face="Arial">then</font><font size=3 face="Times New Roman"> <br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=blue face="Arial">rsh </font><font size=3 face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=2 color=blue face="Arial">...</font><font size=3 face="Times New Roman"> </font>
<p>
<p><font size=2 face="sans-serif">Thanks to everyone,</font>
<p>
<br><font size=2 face="sans-serif">Bernard McAuley,<br>
Mindspeed Technologies,<br>
</font>
--=_alternative 0047DF8880256AB7_=--
Received on Wed Aug 29 14:06:29 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:25:02 EDT