Hi all,
Looking for some help, I have written a very simple script to pass to PowerHA to act as an indicator to activate failover required.
Where i get completely lost is I have to create a wait and carry out the grep for the process once every 10 seconds this works but need to embed this within in a loop if the condition fails to find the right process on the third pass then it calls failover
step 1 identify the process if there are 1 to 4 of the processes found
then exit=0
else exit=1
if no processes are found then exit=1 and add one to the fail count
if more than 4 processes are found then exit=1 and add 1 to fail count
if after the third execution you still have any of the failures then hand off to PowerHA to fail cluster over.
My shell scripting is very rusty and trying to figure out how to embed the 1 to 3 attempts into a timed loop to look for the process, I am finding difficult. Any help greatly appreciated.
Thanks Gary