The olsnodes command does not use keywords, but accepts one or more options. The available options are described in Table C-1.
olsnodes [[-n] [-i] [-s] [-t] [node_name | -l [-p]] | [-c]] [-a] [-g] [-v]
If you issue the olsnodes command without any command parameters, the command returns a listing of the nodes in the cluster:
[root@node1]# olsnodes node1 node2 node3 node4
Table C-1 OLSNODES Command Options
| Command | Description |
|---|---|
|
|
Lists all nodes participating in the cluster and includes the assigned node numbers. |
|
|
Lists all nodes participating in the cluster and includes the Virtual Internet Protocol (VIP) address (or VIP address with the node name) assigned to each node. |
|
|
Displays the status of the node: |
|
|
Displays node type: pinned or unpinned. |
|
|
Displays information for a particular node. |
|
|
Lists the local node and includes the private interconnect for the local node. The |
|
|
Displays the name of the cluster. |
|
|
Displays only active nodes in the cluster with no duplicates. |
|
|
Logs cluster verification information with more details. |
|
|
Logs cluster verification information in verbose mode. Use in debug mode and only at the direction of My Oracle Support. |
Example 1: List the VIP addresses for all nodes currently in the cluster
To list the VIP addresses for each node that is currently a member of the cluster, use the command:
[root@node1]# olsnodes -i node1 168.92.1.1 node2 168.192.2.1 node3 168.192.3.1 node4 168.192.4.1
Example 2: List the node names and node numbers for cluster members
To list the node name and the node number for each node in the cluster, use the command:
[root@node1]# olsnodes -n node1 1 node2 2 node3 3 node4 4
Example 3: Display node roles for cluster members
To list the node roles for each node in the cluster, use the command:
[root@node1]# olsnodes -a node1 Hub node2 Hub node3 Leaf node4 Leaf