If (fails) go

By Paul Murphy, author of The Unix Guide to Defenestration

How often have you found yourself looking at complex failover management software as an option simply to switch one or two processes if some remote machine isn't accessible? Feels like using artillery to swat flies, doesn't it?

There's a simple alternative. Consider a sh script like this:
#!/bin/sh
if (ping qms 1 >>/dev/null 2&1 ) then echo "ok"
else echo "failed"
fi

and just replace "ok" and "failed" with scripts that take whatever action you want.

Notice that I used the Bourne shell. It's not because I like BASIC, it's because you often want to use something like this quite early in a boot sequence (e.g. on a diskless workstation -- see smdiskless ) or on something that isn't running Solaris.