Operating System - HP-UX
1752805 Members
5586 Online
108789 Solutions
New Discussion юеВ

Re: Looking for a better way to determine active server instead of bdf

 
SOLVED
Go to solution
Scott Frye_1
Super Advisor

Looking for a better way to determine active server instead of bdf

We have two servers (crhcmax1 and crhcmax2). They are clustered together using ServiceGuard. I'm writing a script to determine which is the active server. Currently I'm doing a bdf and grepping for proddb01 which would not be mounted on the non-active server. Anyone have a better solution?

Thanks

Scott

 

 

-----------------------------------------------

P.S. This thread has been moved from Languages & Scripting to Service Guard - Forum Moderator

4 REPLIES 4
Rick Garland
Honored Contributor
Solution

Re: Looking for a better way to determine active server instead of bdf

Using the cmscancl command would provide a wealth of information about the cluster, what is running, what packages on what nodes, etc.
Rick Garland
Honored Contributor

Re: Looking for a better way to determine active server instead of bdf

Another option - run the cmviewcl -v and grep for "current". This will tell which is the current server.
Sanjay_6
Honored Contributor

Re: Looking for a better way to determine active server instead of bdf

Hi,

Check the output of the cmviewcl.

cmviewcl -p package_name |grep running |awk '{print $5}'

This is the host on which the package "package_name" is currently running. substitute the package_name with the name of the package that contains the filesystem "proddb01"

Hope this helps.

Regds
Scott Frye_1
Super Advisor

Re: Looking for a better way to determine active server instead of bdf

Each response was exactly what I was looking for.

Thanks very much!!!