Sun Cluster Scripting

In these days i’m playing with cluster’s command line routine.
Knowing them is useful for scripting. Some example as follow:

( see the cluster name )

scha_cluster_get -O CLUSTERNAME

( see resources of reuters-rg resource group )

/usr/cluster/bin/scha_resourcegroup_get -O RESOURCE_LIST -G reuters-rg
HASP-reuters-dg
reuters

( see the type of resource reuters )

/usr/cluster/bin/scha_resource_get -O TYPE -R reuters
SUNW.LogicalHostname

( see all registered resource types )

/usr/cluster/bin/scha_cluster_get -O ALL_RESOURCETYPES
SUNW.LogicalHostname
SUNW.SharedAddress
SUNW.HAStoragePlus
SUNPS.stds
LGTO.clnt

( see the status of ucp2-rg resource group )

/usr/cluster/bin/scha_resourcegroup_get -O RG_STATE -G ucp2-rg
ONLINE

The are a lot of routine that can be called through command line or script. nice !