Perl-Sensitive Sunglasses | |
PerlMonks |
Remote host back online testby RaduH (Scribe) |
on Nov 26, 2007 at 18:39 UTC ( [id://653059]=perlquestion: print w/replies, xml ) | Need Help?? |
RaduH has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, 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!
Back to
Seekers of Perl Wisdom
|
|