Hi,
no when we are doing updates on more systems simustaneously and many ssh-terems are on your screen it would be very important, that you know any time who is the master.
I wrote this script:
!/bin/bash
CLUSTER_STATE=$(cphaprob state | grep local | awk '{ print $5 }')
echo Cluster state is: $CLUSTER_STATE
export PS1="\e[41;1;33m [$CLUSTER_STATE] \e[40;0;37m [Expert@$HOSTNAME]#"
echo Prompt is: $PS1
#
## clish -c "set clienv prompt %M"
The final question is, how ca I trigger this script every time a failover occurs. Obiously it is not enaugh to execute script on logon or perodically.
I need a event (member goes up or down) which can execute somethig like a customized action, as alert on management is able to do.
Thanks and kind regards
Adrian