Ronnie Brunner wrote:
>Bear in mind that depending on your setup, a host may
>not respond to a ping but still be able to serve your request
I've seen that with many machines (I usually configure my machines to
not respond to ICMP ECHO requests) and I've also seen the reverse,
where a machine had crashed in a very strange state where the OS kernel
was still alive and responding to pings, but the whole of user-space
from /sbin/init on down was dead to the world. Very strange! The moral
of this story is: don't run tests for things that aren't directly
useful to you (unless you know *exactly* what they mean!) and stick to
doing things that are relevant and handling the errors correctly,
usually with plenty of logging. This rule also applies to file handling
(don't test to see if a file is readable; just try to read it) and a
vast number of other things in a wide variety of asynch systems where
any other approach just invites race conditions or other
difficulties...
Donal.
Received on Sun Apr 30 02:16:18 2006