sun.com | docs.sun.com |  | How To Buy | My Sun | Worldwide Sites |

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Maintenance Commands | nhcmmrole(1M)

- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- EXIT STATUS
- EXAMPLES
- ATTRIBUTES

## NAME

> nhcmmrole - get the role of the current node

## SYNOPSIS

> `/opt/SUNWcgha/sbin/nhcmmrole [ -hv ] [ -t timeout ]`

## DESCRIPTION

> The `nhcmmrole` command gets the role of the current node.

> This executable can be used in scripts. Its exit code represents the current role of the node.

## OPTIONS

> The `nhcmmrole` command can be used with the following options:

> -h

>   Provides information about the use of the command.

> -t timeout

>   Sets the timeout in seconds for this call. The default timeout is 5 seconds.

> -v

>   Verbose. This option displays the role of the node, as follows:

>   >     nhcmmrole: current role role

>   The value for role is one of the following: `MASTER`, `VICEMASTER`, `OUT_OF_CLUSTER`, or `IN_CLUSTER`.

## EXIT STATUS

> The following exit values are returned by `nhcmmrole`:

> 255

>   A failure has occurred or the node is not configured in the cluster node table

> 0

>   Out of cluster node

> 1

>   Master node

> 2

>   Vice-master node

> 3

>   In cluster node that is neither master nor vice-master.

## EXAMPLES

> The following example shows how to run `nhcmmrole` to determine the role of a node.

> Example 1. Running `nhcmmrole` to determine if a node is the master

> > - Log in to a node.

> > - Run:

> >   >     # nhcmmrole

> >   >     # echo $?
> >   >     1

> > In this example, the current node is the master node.

## ATTRIBUTES

> See `attributes`(5) for descriptions of the following attributes:

> ATTRIBUTE TYPE | ATTRIBUTE VALUE
> --- | ---
> Architecture | Sparc
> Availability | SUNWnhcmb
> Interface Stability | Evolving

Netra HAS FS 2.1 | Go To Top | Last Changed September 2004

Company Info | Contact | Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.