Re: determine active or passive node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-12-13 at 08:42 -0500, Neil Watson wrote:
> I decided to query the cluster suite directly:
> 
> #!/bin/bash
> 
> HOSTNAME=`hostname`
> SERVICE="db2"
> CLUSTAT=`/usr/sbin/clustat -s ${SERVICE}|tail -n1`
> # Should return: 
> #db2                  your-hostname                 started         
> 
> if [[ ${CLUSTAT} =~
>     ${SERVICE}[[:blank:]]+${HOSTNAME}[[:blank:]]+started ]] ; then
>     exit 0;
> fi
> 
> # Else node is not active.
> exit 255
> 

That looks similar to something someone posted awhile ago -- but I can't
seem to find it...


-- Lon

Attachment: signature.asc
Description: This is a digitally signed message part

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux