RaduH has asked for the wisdom of the Perl Monks concerning the following question:
I am executing some script on HostA and this script sends commands to HostB. At some point, HostB is being reset and after it comes back online there are more commands that need to be sent by HostA's script to HostB. This means HostA's script needs to figure somehow when it can send the commands to HostB again (the commands are sent using the unix command line ssh with the [command] parameter)
There are multiple ways to figure out if HostB is ready to take more commands after a reset but I was wondering what is THE way to do it, if there is such a thing. I was thinking about pinging HostB until I see it is alive (don't really know how to pick up the ping response in my Perl script since ping runs until I stop it and keeps spitting out data, but that's a story for me to worry about only if this is THE way to go). I was also thinking about attempting to run some test command the result of which I would recognize if HostB was running again (e.g. If I can execute some perl runtest.pl and get OK back I know HostB is alive).
Are there other options? Is there a smarter of way doing this?
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Remote host back online test
by Corion (Patriarch) on Nov 26, 2007 at 18:44 UTC | |
Re: Remote host back online test
by andyford (Curate) on Nov 26, 2007 at 21:39 UTC | |
Re: Remote host back online test
by chrism01 (Friar) on Nov 27, 2007 at 02:01 UTC | |
Re: Remote host back online test
by quester (Vicar) on Nov 27, 2007 at 07:46 UTC |