Remsh timeout problem
am 19.10.2007 17:15:19 von rachit7Hello Folks,
If I try to remsh to a non-existent ip address, remsh command waits
until it times out (usually 1min approx). Is there a way to kill this
command after waiting for some time ( say 5 secs)? Actually, I have
written a ksh script that remshells to a list of hosts ( reading them
from an input file) and executes a list of commands and gets the
output back to a log file. If any one of these hosts (in the input
file) does not exist then the waiting time for the completion of the
script becomes
time taken by remsh to run all the commands on all the hosts that have
been resolved + time taken by remsh to timeout ( usually 1 min or
more) on a bad hosts (or non-existent hosts).
I want to reduce this time by killing the remsh in between, or just
skipping that host.
Ping is not allowed on the network.
Any other suggestions??? tricks??? Manpage of remsh suggest
gethostbyname() to resolve the hosts. But I dont know how to use
it......not sure if it will work either.
Thanks in Advance,
RB